On Apr 20, 2009, at 4:30 PM, Nicolas Clairon wrote:
On Mon, Apr 20, 2009 at 3:39 PM, Wout Mertens
<[email protected]> wrote:
On Apr 20, 2009, at 9:51 AM, Nicolas Clairon wrote:
Hmmm... Remember that reduce results should not grow faster than
log(n) for
n documents. If everyone uses a different tag, that can become a
problem. Of
course, if you're not expecting thousands of tags, that shouldn't
be a real
issue.
I don't expect thousands of tags but it might be possible that each
document is so
different that I can have "nb_results_map" = "nb_results_reduce" (if,
for instance,
the description is different for each document).
How can I handle this issue ?
Err, no that's not an issue. The issue is when a single result row
grows proportionally to the number of documents that are processed in
that result.
Tags are probably ok.
You can also map: emit ([doc.title,doc.tag],1) and reduce:sum(v) to
generate a list tags that a certain document uses and how popular each
tag is. You'd have to query that list separately.
Wout.