> On Sep 22, 2015, at 4:02 AM, Aj <ajithrna...@icloud.com> wrote:
> 
> Now, I'd like to query the exact rows (not a key range) as following
> 
> query.keys = [[university1,degree1,{}],[university2,degree2,{}]]
> 
> I'm fetching all the students (sorted based on their name) that belong to 
> specific degrees and universities. I received 0 results when I tried. 

That’s because the keys you’re giving it aren’t ones that are in the index — 
their 2nd element is an empty dictionary, not a student name. (Empty 
dictionaries aren’t magic wildcards; they’re just values that sort after all 
other data types, which makes them useful for specifying the upper end of a key 
range.)

If you want all the rows for a specific university, you do need to use a key 
range:
        startKey = [university]
        endKey = [university, {}]

Or in 1.1 and later, you can use:
        startKey = endKey = [university]
        prefixMatchLevel = 1

—Jens

-- 
You received this message because you are subscribed to the Google Groups 
"Couchbase Mobile" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mobile-couchbase+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/D67601FF-D6B5-44D7-87AB-DBE6E229D232%40couchbase.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to