Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

In CouchDB, the index used for $elemMatch is a special type of index called a "bitmap index" or "bit index". This type of index is used to efficiently search for documents that contain an array field matching a specific condition, as specified by the $elemMatch operator. The bit index stores a bitmap for each possible value in the array, indicating which documents contain that value. This allows for fast lookups of documents that match complex array queries.