couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From He Shiming <heshim...@gmail.com>
Subject Re: Mapping multiple entries in an array field? (like tags)
Date Mon, 23 May 2011 08:08:31 GMT
I'm experimenting with lucene, and it appears rather easy to do.
@Mark, actually it's not a bad idea to split hot and cold tags. I'll
try this approach too.

@Patrick. The number of combination isn't that scary, given tags are sorted.

For a 2-tag query, 2-tag documents will have 1 combination only, and 3
for 3-tag docs. 45 combinations for 10-tag docs.

For a 3-tag query, 10-tag docs will have 36 combinations.

Compared to just having to emit at least 10 docs for a single-tag
query on 10-tag docs, this is not so bad. Theoretically, no matter
what I do, more computing time has to be spent on those docs with more
tags.

However, based on what you've said. I'm under the impression that
calling ``emit`` this many times per doc is a bad idea. I'm not
familiar with the underlying mechanisms of lucene. But are you saying
emitting just several dozen times per doc will definitely be much
slower than lucene?

On Mon, May 23, 2011 at 12:07 PM, Mark Hahn <mark@boutiquing.com> wrote:
> 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.
>
>
>
>
> --
> Mark Hahn
> Website Manager
> mark@boutiquing.com
> 949-229-1012
>



-- 
Best regards,
He Shiming

Mime
View raw message