lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Umesh Prasad <umesh.i...@gmail.com>
Subject Re: Shuffle results a little
Date Sun, 03 Aug 2014 02:29:37 GMT
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 <babenis@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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message