FTS: Index only certain documents in Bucket

When an index is created based on a certain field mapped say in type=hotel in travel-sample bucket. Why does the doc count always the entire document in the bucket and not just the filtered hotel document.
When the FTS happens is all document scanned or only the document type hotel? Although in search result i am seeing the query is happening for only that set of documents.


there is nothing wrong in seeing the whole document count as against the index, It is actually the total number of documents in the bucket that have been processed by the FTS index.
Every document gets “processed” at some level during the indexing process and that progress of the indexing can be tracked here.

Searching the forum questions might help at times too.
The same query had already been answered a couple of times in this forum.


Thank you @Sreeks . So that count is not related to the number of documents that will be searched on the index at runtime. Even if the bucket is huge , the index at search process will always lookup for certain type of documents. The “doc-count” only refers to the document it scanned in order to create the bucket.

That’s right!
The “doc-count” only refers to the number of documents from the bucket that the FTS has scanned to create the index.