Usage of TermGroupFacetCollector and sorting by field [LUCENE-7675]
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 1.4k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 88
Description
I'm using TermGroupFacetCollector
BooleanQuery.Builder b = new BooleanQuery.Builder();
for (Long id : keywordIds) {
b.add(new TermQuery(LuceneFieldFactory.createTerm(keywordField, id)), BooleanClause.Occur.SHOULD);
result.put(id, 0L);
}
TermGroupFacetCollector c = TermGroupFacetCollector.createTermGroupFacetCollector(sortedIdFieldName, sortedKeywordFieldName, true, null, keywordsSize);
s.search(b.build(), c);
I'm not able to make sort in method "search", because there is no necessary method's signature with Sort and Collector, how can it be solved?
---
Migrated from [LUCENE-7675](https://issues.apache.org/jira/browse/LUCENE-7675) by Alexander Stepanov, updated Feb 10 2017
Contributor guide
Research direction
Start with TermGroupFacetCollector.createTermGroupFacetCollector and the IndexSearcher.search overloads shown in the issue. Check how collectors and Sort are currently combined, then determine the intended API change needed to support sorting with this collector. Done means the requested search can accept both sorting and the collector, with coverage for the relevant usage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- search
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100