Sounds like you're on the right track, if your groups overap (i.e. a
document can be in group A and B), then you should ensure your "groups"
field is multivalued.

If you are searching for "foo" in documents contained in group "A", then it
might be more efficient to use a filter query (fq) like:

q=foo&fq=groups:A

See the wiki page on common query parameters for more info:
http://wiki.apache.org/solr/CommonQueryParameters#head-6522ef80f22d0e50d2f12ec487758577506d6002

cheers,
Piete



On 20/09/2007, mark angelillo <[EMAIL PROTECTED]> wrote:
>
> Hey all,
>
> Let's say I have an index of one hundred documents, and these
> documents are grouped into 4 groups A, B, C, and D. The groups do in
> fact overlap. What would people recommend as the best way to apply a
> search query and return only the documents that are in group A? Also,
> how about if we run the same search query but return only those
> documents in groups A, C and D?
>
> I imagine that I could do this by indexing a text field populated
> with the group names and adding something like "groups:A" to the
> query but I'm wondering if there's a better solution.
>
> Thanks in advance,
> Mark
>
> mark angelillo
> snooth inc.
> o: 646.723.4328
> c: 484.437.9915
> [EMAIL PROTECTED]
> snooth -- 1.7 million ratings and counting...
>
>
>

Reply via email to