I think I got it - 

I have to emit (price, location, moveindate) //descending = NO

& then 

query.startKey = @[startPrice,@"Marina Bay"];
query.endKey = @[endPrice,@[@"Marina Bay",@"Pasir Ris",@{}],{}]; //In 
ascending order


On Saturday, March 8, 2014 5:12:11 PM UTC+8, archit agarwal wrote:
>
> Hey Jens!
>
> Getting around the map - reduce to query is kinda giving me a hard time. 
> Any docs you can recommend on this?
>
> In this instance I am trying to narrow down some properties based on the 
> following criteria - 
>
> 1. location (Can choose multiple)
> 2. Price (range)
> 3. move in date (range)
>
> The emit function I have is as follows - 
>
> emit (price, location, moveindate) => Is this the best approach or should 
> it be emit(location,price,moveindate)?
> How can I possibly send in arrays to reduce this efficiently in the 
> query.startKeys & query.endKeys ?
>
>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/mobile-couchbase/ad546919-2686-4e40-a7c6-6d8c7c39ec2a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to