Class CollapseContext

java.lang.Object
org.elasticsearch.search.collapse.CollapseContext

public class CollapseContext
extends java.lang.Object
Context used for field collapsing
  • Constructor Summary

    Constructors
    Constructor Description
    CollapseContext​(java.lang.String fieldName, MappedFieldType fieldType, java.util.List<InnerHitBuilder> innerHits)  
  • Method Summary

    Modifier and Type Method Description
    CollapsingTopDocsCollector<?> createTopDocs​(org.apache.lucene.search.Sort sort, int topN)  
    java.lang.String getFieldName()
    The requested field name to collapse on.
    MappedFieldType getFieldType()
    The field type used for collapsing
    java.util.List<InnerHitBuilder> getInnerHit()
    The inner hit options to expand the collapsed results

    Methods inherited from class java.lang.Object

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

  • Method Details

    • getFieldName

      public java.lang.String getFieldName()
      The requested field name to collapse on.
    • getFieldType

      public MappedFieldType getFieldType()
      The field type used for collapsing
    • getInnerHit

      public java.util.List<InnerHitBuilder> getInnerHit()
      The inner hit options to expand the collapsed results
    • createTopDocs

      public CollapsingTopDocsCollector<?> createTopDocs​(org.apache.lucene.search.Sort sort, int topN)