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

Usage of TermGroupFacetCollector and sorting by field

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 6.4
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Lucene Fields:
      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

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

              Dates

              • Created:
                Updated: