Class CollapseTopFieldDocs

java.lang.Object
org.apache.lucene.search.TopDocs
org.apache.lucene.search.TopFieldDocs
org.apache.lucene.search.grouping.CollapseTopFieldDocs

public final class CollapseTopFieldDocs extends org.apache.lucene.search.TopFieldDocs
Represents hits returned by CollapsingTopDocsCollector.getTopDocs().
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The collapse value for each top doc
    The field used for collapsing

    Fields inherited from class org.apache.lucene.search.TopFieldDocs

    fields

    Fields inherited from class org.apache.lucene.search.TopDocs

    scoreDocs, totalHits
  • Constructor Summary

    Constructors
    Constructor
    Description
    CollapseTopFieldDocs​(String field, org.apache.lucene.search.TotalHits totalHits, org.apache.lucene.search.ScoreDoc[] scoreDocs, org.apache.lucene.search.SortField[] sortFields, Object[] values)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    merge​(org.apache.lucene.search.Sort sort, int start, int size, CollapseTopFieldDocs[] shardHits, boolean setShardIndex)
    Returns a new CollapseTopDocs, containing topN collapsed results across the provided CollapseTopDocs, sorting by score.

    Methods inherited from class org.apache.lucene.search.TopDocs

    merge, merge, merge, merge

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • field

      public final String field
      The field used for collapsing
    • collapseValues

      public final Object[] collapseValues
      The collapse value for each top doc
  • Constructor Details

    • CollapseTopFieldDocs

      public CollapseTopFieldDocs(String field, org.apache.lucene.search.TotalHits totalHits, org.apache.lucene.search.ScoreDoc[] scoreDocs, org.apache.lucene.search.SortField[] sortFields, Object[] values)
  • Method Details

    • merge

      public static CollapseTopFieldDocs merge(org.apache.lucene.search.Sort sort, int start, int size, CollapseTopFieldDocs[] shardHits, boolean setShardIndex)
      Returns a new CollapseTopDocs, containing topN collapsed results across the provided CollapseTopDocs, sorting by score. Each CollapseTopFieldDocs instance must be sorted.