Couchbase Questions: Map

Have a Question? Get it answered by our community

acpadhi's picture
Asked 2 months 3 days ago

Best way to get results - Sort by 2 columns, one in ascending and other in descending

Data structure :
{
"id": "2919220",
"country_code": "US",
"ascii_city_name": "downey",
"city_name": "Downey",
"region": "CA",
"population": "111862",
"latitude": "33.9400000",
"longitude": "-118.1316667",
"...

Matzz's picture
Asked 9 months 3 weeks ago
Latest activity 9 months 3 weeks ago

When rereduce is triggered

I play with couchbbase beer-sample. I use views to get list of cities in state.
My map/reduce functions work quite well but I wonder when rereduce is triggered.
It looks like after adding new document to bucket whole view is processed again from the begining. Even if I remove...

mwkarl's picture
Asked 11 months 2 weeks ago
Latest activity 11 months 1 week ago

View Map to return Key/Value pairs as Value

Is it possible to return Key/Value pairs in emit() using cb.query() in a similar way to the return value of cb.get() ?

cb.get() returns the complete object, however a cb.query() returns an indexed array as per the array ([ doc.x, doc.y , doc.z]) format of the emit() return value.

...