lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Diego Ceccarelli (JIRA)" <>
Subject [jira] [Commented] (SOLR-8776) Support RankQuery in grouping
Date Mon, 14 Mar 2016 18:55:33 GMT


Diego Ceccarelli commented on SOLR-8776:

Update: I found a way to change the behavior of the collectors without moving RankQuery into
Lucene. This new patch performs the group reranking without changing Lucene. The only difference
is that if the Query is a RankQuery instead of using {{TermSecondPassGroupingCollector}} I'll
use a {{RerankTermSecondPassGroupingCollector}}. The new collector will scan the groups collectors
and wrap them in 'rerank collectors': 

for (SearchGroup<BytesRef> group : groups) {
if (query != null) {
          collector = groupMap.get(group.groupValue).collector;
          collector = query.getTopDocsCollector(collector, groupSort, searcher);
          groupMap.put(group.groupValue, new SearchGroupDocs<BytesRef>(group.groupValue,


> Support RankQuery in grouping
> -----------------------------
>                 Key: SOLR-8776
>                 URL:
>             Project: Solr
>          Issue Type: Improvement
>          Components: search
>    Affects Versions: master
>            Reporter: Diego Ceccarelli
>            Priority: Minor
>             Fix For: master
>         Attachments: 0001-SOLR-8776-Support-RankQuery-in-grouping.patch, 0001-SOLR-8776-Support-RankQuery-in-grouping.patch,
0001-SOLR-8776-Support-RankQuery-in-grouping.patch, 0001-SOLR-8776-Support-RankQuery-in-grouping.patch
> Currently it is not possible to use RankQuery [1] and Grouping [2] together (see also
[3]). In some situations Grouping can be replaced by Collapse and Expand Results [4] (that
supports reranking), but i) collapse cannot guarantee that at least a minimum number of groups
will be returned for a query, and ii) in the Solr Cloud setting you will have constraints
on how to partition the documents among the shards.
> I'm going to start working on supporting RankQuery in grouping. I'll start attaching
a patch with a test that fails because grouping does not support the rank query and then I'll
try to fix the problem, starting from the non distributed setting (GroupingSearch).
> My feeling is that since grouping is mostly performed by Lucene, RankQuery should be
refactored and moved (or partially moved) there. 
> Any feedback is welcome.
> [1] 
> [2]
> [3]
> [4]

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message