couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Hahn <m...@boutiquing.com>
Subject Re: Mapping multiple entries in an array field? (like tags)
Date Mon, 23 May 2011 04:07:20 GMT
Use your original method but only with the "hot tags".  Then use my method
for the "cold tags".  Then get the intersection.  I would think you'd be
able to reduce the number of ids to load to log n.

On Sun, May 22, 2011 at 6:57 PM, He Shiming <heshiming@gmail.com> wrote:

> @Mark, hmm... eventually, I'm expecting the number of docs to be in
> the millions. Most of them will be tagged, and the number of tags will
> be in the thousands. Many "hot" tags will return a lot of documents.
> Unlike the single tag situation, which I can put a limit on. Finding
> intersections requires the full list.
>
> I'm trying to use a schedule to pre-fetch content for all the tags.
> But even under this circumstance, I'm looking for a lightweight way.
>
> So far I came to think that my original idea wasn't so bad. Because
> each document will only have like 5 or 10 tags max. The number of
> possible combinations isn't that huge. I think this way, there will be
> less calculation than fetching the full list several times at client
> side. The plus side would be, as long as it's still map/reduce, I can
> use bigcouch to scale the calculation easily.
>
> On Mon, May 23, 2011 at 9:17 AM, Mark Hahn <mark@boutiquing.com> wrote:
> >
> > I'm using the method of emitting a result for each tag in the document
> and
> > I'm not seeing any huge client calculation.  I just get the list of doc
> ids
> > for each tag requested and do an intersection of the results.  Not a big
> > deal.  It isn't as if I have to load all the docs.
> >
> >
> >
> > --
> > Mark Hahn
> > Website Manager
> > mark@boutiquing.com
> > 949-229-1012
> >
>
>
>
> --
> Best regards,
> He Shiming
>



-- 
Mark Hahn
Website Manager
mark@boutiquing.com
949-229-1012

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message