Skip to content

is it possible to query design document views with multiple-indices? #4969

Answered by nickva
fangq asked this question in General
Discussion options

You must be logged in to vote

I see a number of posts suggesting to create different design documents one for each search key, but again, when using startkey/endkey to query each design document, it can only handle a single condition, not a joint condition.

You're right. Both the map-reduce views and _find queries operate on one underlying b-tree index at a time. It won't work to do arbitrary AND or OR queries on 2+ indices and combine them automatically.

If you go with having multiple design documents, each with a different view, you might be able to make your index a bit more efficient by putting multiple views in the same design document. That way they'll update together when the index updates (but they'll also i…

Replies: 1 comment 1 reply

Comment options

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

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