Couchbase Questions: MapReduce

Have a Question? Get it answered by our community

mliu's picture
Asked 2 weeks 1 day ago
Latest activity 2 weeks 18 hours ago

map-reduce grouping with compound keys

I'm having trouble figuring out the best way to accomplish a simple query within a date range:

Given an emit like so:

emit([text1, text2, year, mon, day], null)

and using the...

amir_maman's picture
Asked 6 months 9 hours ago
Latest activity 5 months 3 weeks ago

Dangerous Reduce is not protected

Hey,

So i tried to following reduce function for testing the fail over system with couchdb:

function (doc)
{
emit(doc.date,1);
}

Well this is not working , but its also crash all server at the cluster completly!!

Although using devlopment view with a...

amir_maman's picture
Asked 6 months 3 days ago
Latest activity 6 months 1 day ago

How To work with values at reduce functions?

Hey,

I am trying to learn how to use map reduce functions with couch base. until now i created reports engines based on SQL using Where with multi terms (adding and subtracting terms) and to modify the group part.

I am trying to create this report engine using views.

my...

abov's picture
Asked 8 months 1 week ago
Latest activity 8 months 1 week ago

MapReduce: grouping and filtering.

I have the following task: got all users from `site` and where timestamp from `X` to `Y` and has events "Proposal start", "Proposal end" also group them by the timestamp.

So I wrote the following map function:

...
abov's picture
Asked 8 months 1 week ago
Latest activity 8 months 1 week ago

Limitation of the reduce function.

I develop a web analytics service (http://bitscup.com) based on Couchbase. One of the problems I encountered this is limitation of reduce function.

reason: error (Reduction too large (66762 bytes))

I need to get a structure where...

abov's picture
Asked 8 months 2 weeks ago
Latest activity 8 months 2 weeks ago

What is the best way to calculate the median of the array?

Should I return an array of data and compute the median in my application or is there a right way to do it in the Couchbase?

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

Map reduce - need to use sha1 javascript function

Hi,

While writing Map Reduce in Couchbase, I have encountered an issue that while emitting key,value from MAP function has very long key and hence i want to convert the key to unique hash using SHA1 function. I do know that couchbase internally uses sha1 JS libraries but somehow I am not...