What is qualified indexes in index update life cycle?
Just for setting up context
Index updates life cycle:
Index Lifecycle | Couchbase Docs
- The projector keeps a bucket-level DCP stream open for updates — this limits the number of DCP connections.
- When a document within the collection is updated, the projector utilizes the collection ID available with each mutation, and only evaluates the indexes defined for that collection.
- The projector only sends updated indexed fields for the qualified indexes within the collection.
In above point 3, My main question is what is qualified index?
I have two indexes like
CREATE INDEX G1_Category
ON DevTestDb
.me
.grid_rows
(category
) WHERE ((gridId
= “g1”) and (category
is valued))
CREATE INDEX G2_Category
ON DevTestDb
.me
.grid_rows
(category
) WHERE ((gridId
= “g2”) and (category
is valued))
when i add new record with { “gridId” : “g2” }
For both index, index stats api says
“num_docs_indexed” property incremented,
but “items_count” property increment only in G2_Category index.
So when any mutation happen, it will update all indexes in respective of how they are declared and updates item count for matching condition?
So lets say i have 1000 indexes, so even single record gets updated, then all 1000 indexes will be scan that document?