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 babenis <ba...@gmail.com> on 2014/07/24 20:51:55 UTC

Re: Shuffle results a little

were you ever able to figure out a way to do this "Shuffling" of the result
set?

I'm looking to do the same thing, but shuffle results not only by brand, but
also by child categories, mainly because we have very dominant categories
and would still like products from other cats to be visible throughout the
site without explicit searches, otherwise it seems like we specialize on a
couple of categories only



--
View this message in context: http://lucene.472066.n3.nabble.com/Shuffle-results-a-little-tp1891206p4149091.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Shuffle results a little

Posted by Umesh Prasad <um...@gmail.com>.
What you are look for is a distribution of search results. One way would be
a two phase search
Phase 1 : Search (with rows =0, No scoring, no grouping)
1. Find the groups (unique combinations) using pivot facets  (won't work in
distributed env yet)
2. Transform those groups as group.queries ..

Phase 2 : Actual search ( with group.queries )

Pros : Readily available and well tested.
Cons :  It will give you exact same number of results for each group, which
may not be desired. Specifically with pagination. And of course, you are
making two searches.

2nd Approach would be to have this logic of distributing along different
dimensions as your own custom component. Solr's PostFilter/delegating
collector can be used for same. Basically TopDocCollector just maintains a
PriorityQueue for matching documents. You can plugin your own collector, so
that it sees all matching documents. Identifies which groups they belong to
(if groups/pivots have been already identified) , maintains the priority
queue for each of them and then finally merges them. Quite a bit of
customization if you ask me, but can be done and it would be most powerful.

PS : We use the 2nd approach.





On 30 July 2014 05:56, babenis <ba...@gmail.com> wrote:

> despite the fact that I upgrade to 4.9.0 - grouping doesn't seem to work on
> multi valued field, ie
>
> i was going to try to group by tags + brand (where tags is a multi-valued
> field) and spread results apart or select unique combinations only
>
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Shuffle-results-a-little-tp1891206p4149973.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
---
Thanks & Regards
Umesh Prasad

Re: Shuffle results a little

Posted by babenis <ba...@gmail.com>.
despite the fact that I upgrade to 4.9.0 - grouping doesn't seem to work on
multi valued field, ie

i was going to try to group by tags + brand (where tags is a multi-valued
field) and spread results apart or select unique combinations only





--
View this message in context: http://lucene.472066.n3.nabble.com/Shuffle-results-a-little-tp1891206p4149973.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Shuffle results a little

Posted by Joel Bernstein <jo...@gmail.com>.
Query ReRanking is built on the RankQuery API. With the RankQuery API you
can build and plugin your own ranking algorithms.

Here's a blog describing the RankQuery API:

http://heliosearch.org/solrs-new-rankquery-feature/

Joel Bernstein
Search Engineer at Heliosearch


On Fri, Jul 25, 2014 at 4:11 AM, babenis <ba...@gmail.com> wrote:

> from what i gather about reranking query is that it would further fine-pick
> results, rather than dispurse similarities, or am i looking at it the wrong
> way?
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Shuffle-results-a-little-tp1891206p4149169.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>

Re: Shuffle results a little

Posted by babenis <ba...@gmail.com>.
from what i gather about reranking query is that it would further fine-pick
results, rather than dispurse similarities, or am i looking at it the wrong
way?



--
View this message in context: http://lucene.472066.n3.nabble.com/Shuffle-results-a-little-tp1891206p4149169.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Shuffle results a little

Posted by Ahmet Arslan <io...@yahoo.com.INVALID>.
Hi Babenis,

https://cwiki.apache.org/confluence/display/solr/Query+Re-RankingĀ 
is a good place to implement such diversity functionality.

There is no stock solution currently other than field collapsing and random fields.

Ahmet



On Thursday, July 24, 2014 10:04 PM, babenis <ba...@gmail.com> wrote:
were you ever able to figure out a way to do this "Shuffling" of the result
set?

I'm looking to do the same thing, but shuffle results not only by brand, but
also by child categories, mainly because we have very dominant categories
and would still like products from other cats to be visible throughout the
site without explicit searches, otherwise it seems like we specialize on a
couple of categories only



--
View this message in context: http://lucene.472066.n3.nabble.com/Shuffle-results-a-little-tp1891206p4149091.html
Sent from the Solr - User mailing list archive at Nabble.com.