You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by rachun <ra...@gmail.com> on 2014/02/13 05:35:18 UTC
Limit amount of search result
Dear all gurus,
I would like to limit amount of search result, let's say I have many shop
which is selling shirt. So when I search "white shirt" I want to give a
maximum number per shop (ex. 5).
The result should be like this...
-> Shop A
-> Shop A
-> Shop B
-> Shop B
-> Shop B
-> Shop B
-> Shop B
-> Shop C
-> Shop C
-> Shop C
any suggestion would be very appreciate.
Thank you very much,
Chun.
--
View this message in context: http://lucene.472066.n3.nabble.com/Limit-amount-of-search-result-tp4117062.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Limit amount of search result
Posted by Sameer Maggon <ma...@gmail.com>.
You are welcome!
On Mon, Feb 17, 2014 at 11:07 PM, rachun <ra...@gmail.com> wrote:
> hi Samee,
>
> Thank you very much for your suggestion.
> Now I got it worked now;)
>
> Chun.
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Limit-amount-of-search-result-tp4117062p4117952.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
Re: Limit amount of search result
Posted by rachun <ra...@gmail.com>.
hi Samee,
Thank you very much for your suggestion.
Now I got it worked now;)
Chun.
--
View this message in context: http://lucene.472066.n3.nabble.com/Limit-amount-of-search-result-tp4117062p4117952.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Limit amount of search result
Posted by Sameer Maggon <sa...@measuredsearch.com>.
Chun,
Have you looked at Grouping / Field Collapsing feature in solr?
https://wiki.apache.org/solr/FieldCollapsing
If shop is one of your field, you can use field collapsing on that field
with a maximum of 'n' to return per field value (or group).
Sameer.
--
www.measuredsearch.com
tw: measuredsearch
On Wednesday, February 12, 2014, rachun <ra...@gmail.com> wrote:
> Dear all gurus,
>
>
> I would like to limit amount of search result, let's say I have many shop
> which is selling shirt. So when I search "white shirt" I want to give a
> maximum number per shop (ex. 5).
>
> The result should be like this...
> -> Shop A
> -> Shop A
> -> Shop B
> -> Shop B
> -> Shop B
> -> Shop B
> -> Shop B
> -> Shop C
> -> Shop C
> -> Shop C
>
> any suggestion would be very appreciate.
>
> Thank you very much,
> Chun.
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Limit-amount-of-search-result-tp4117062.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>
--
Sameer Maggon
Founder, Measured Search
m: 310.344.7266
tw: @measuredsearch
w: http://www.measuredsearch.com