Skip to content

Multiple partial indexes #3284

Answered by willholley
p53 asked this question in Q&A
Nov 30, 2020 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

@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 named car_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.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@p53
Comment options

Answer selected by kocolosk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants