FTS search by id CB server 6.5

I am trying to use fts search for searching by _id. Is there a possibility?
This is my query (as _id is already indexable, it should be searchable, but it is returning 0 hits):


Another try I had: I added to my FTS index definition _id field as well:

and then running query like


And again no results :frowning_face:
Any ideas what is going wrong?

An “_id” field is indexed by the search engine internally to accommodate the doc IDs.
You should be able to use the Doc ID query to access the content of the _id field.

Here’s an example …

{"query": {"ids": ["prs_xxxx1"]}}

Here’s more - DocID Query | Couchbase Docs

1 Like

Thank you abhinav for your quick answer. It is working fine.