incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Schroiff, Klaus" <Kla...@fast.au.fujitsu.com>
Subject question about "complex" range queries
Date Wed, 02 Apr 2014 02:56:17 GMT
Hi,

Let's assume that I have the following view function:

function(doc) { emit([a, b], whatever) } }

In the query I'm running something like
startkey=[a1, b1] & endkey=[a2,b2]
Thus there're TWO explicit ranges here - a1->a2 and b1->b2.

What is the expected result ?

My understanding:
The query is executed in two phases
In the first phase, the index is filtered for qualifying results where the first key ranges
from a1 to a2
In the second phase, these filtered results are filtered once more according to the range
of the second emitted key from b1 to b2.
Thus essentially an "AND" operation.
The filtering is performed using lexicographical rules.

Is that correct ? The doc about complex keys is a bit slim.

Thanks

Klaus


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message