Multiple partial indexes #3284
-
Hi, i have find query like this: '{ and getting error :
Here are my indexes:
and car_org_purged_by_name:
If i use just one index, any of those i don't get that error, problem arises when i want to use both of them |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
@p53 CouchDB only supports using one index per query. The The error is not particularly intuitive, I agree. What's happening is that the query engine is looking for an index in design document |
Beta Was this translation helpful? Give feedback.
@p53 CouchDB only supports using one index per query. The
use_index
parameter only accepts an array to allow the index name to be qualified by a design document name as well (in the case that you have multiple indices with the same name but defined in different design documents).The error is not particularly intuitive, I agree. What's happening is that the query engine is looking for an index in design document
car_org_by_name
namedcar_org_purged_by_name
, not finding one, and then trying to fall back to any valid index that it can find. Partial indexes are excluded from the automatic fallback, so you get an error that there are no valid indexes available for the query.