As you've seen RankQueries won't currently have any effect on Grouping
queries.

A RankQuery can be combined with Collapse and Expand though. You may want
to review Collapse and Expand and see if it meets your use case.

Joel Bernstein
http://joelsolr.blogspot.com/

On Wed, Jul 15, 2015 at 2:36 PM, Diego Ceccarelli <
diego.ceccare...@gmail.com> wrote:

> Hi Everyone,
>
> I need to use a RankQuery within a grouping [1].
> I did some experiments with RerankQuery [2]  and solr 4.10.2 and it seems
> that
> if you group on a field, the reranking query is completely ignored
> (on the cloud, and on a single instance).
> I would expect to see the results in each group reranked using the
> RerankQuery.
>
> I had a look at the grouping code and documentation and,
> if I correctly understood, the grouping works in two steps:
>
> 1) first the top groups are retrieved
> 2) top documents for each group in the top groups are retrieved.
>
> I thought that the collector generated by a RankQuery could be injected
> in 2), i.e., for each group set a rerank collector... but I'm not sure if
> this solution
> is feasable since the collectors are set in Lucene
> (AbstractSecondPassGroupingCollector)
> and a RankQuery is defined in Solr...
>
> Any suggestion?
>
> Thanks,
> Diego
>
> [1] https://cwiki.apache.org/confluence/display/solr/Result+Grouping
> [2] https://cwiki.apache.org/confluence/display/solr/Query+Re-Ranking
>

Reply via email to