[prev in list] [next in list] [prev in thread] [next in thread] 

List:       solr-user
Subject:    Re: searching top matches of each facet
From:       Emmanuel Espina <espinaemmanuel () gmail ! com>
Date:       2012-02-29 20:29:05
Message-ID: CANm_FuciVxf71Atjq1hwH=bSo7MFHSJkYhBSWHyXJcHfU3zE6w () mail ! gmail ! com
[Download RAW message or body]

I think that what you want is FieldCollapsing:

http://wiki.apache.org/solr/FieldCollapsing

For example
&q=my search&group=true&group.field=subject&group.limit=5

Test it to see if that is what you want.

Thanks
Emmanuel


2012/2/29 Paul <paul@nines.org>:
> Let's say that I have a facet named 'subject' that contains one of:
> physics, chemistry, psychology, mathematics, etc....
>
> I'd like to do a search for the top 5 documents in each category. I
> can do this with a separate search for each facet, but it seems like
> there would a way to combine the search. Is there a way?
>
> That is, if the user searches for "my search", I can now search for it
> with the facet of "physics" and rows=5, then do a separate search with
> the facet of "chemistry", etc...
>
> Can I do that in one search to decrease the load on the server? Or,
> when I do the first search, will the results be cached, so that the
> rest of the searches are pretty cheap?
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic