Uploaded image for project: 'Lucene - Core'
  1. Lucene - Core
  2. LUCENE-7675

Usage of TermGroupFacetCollector and sorting by field

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 6.4
    • None
    • None
    • None
    • New

    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?

      Attachments

        Activity

          People

            Unassigned Unassigned
            mayras Alexander Stepanov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: