Class InnerHitBuilder

org.elasticsearch.index.query.InnerHitBuilder
All Implemented Interfaces:
Writeable, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentObject

public final class InnerHitBuilder extends implements Writeable, org.elasticsearch.common.xcontent.ToXContentObject
  • Field Details

    • NAME_FIELD

      public static final org.elasticsearch.common.xcontent.ParseField NAME_FIELD
    • IGNORE_UNMAPPED

      public static final org.elasticsearch.common.xcontent.ParseField IGNORE_UNMAPPED
    • DEFAULT_INNER_HIT_QUERY

      public static final QueryBuilder DEFAULT_INNER_HIT_QUERY
    • COLLAPSE_FIELD

      public static final org.elasticsearch.common.xcontent.ParseField COLLAPSE_FIELD
    • FIELD_FIELD

      public static final org.elasticsearch.common.xcontent.ParseField FIELD_FIELD
  • Constructor Details

    • InnerHitBuilder

      public InnerHitBuilder()
    • InnerHitBuilder

      public InnerHitBuilder( name)
    • InnerHitBuilder

      public InnerHitBuilder(StreamInput in) throws
      Read from a stream.
      Throws:
  • Method Details

    • writeTo

      public void writeTo(StreamOutput out) throws
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Throws:
    • getName

      public  getName()
    • setName

      public  name)
    • setIgnoreUnmapped

      public InnerHitBuilder setIgnoreUnmapped(boolean value)
    • isIgnoreUnmapped

      public boolean isIgnoreUnmapped()
      Whether to include inner hits in the search response hits if required mappings is missing
    • getFrom

      public int getFrom()
    • setFrom

      public InnerHitBuilder setFrom(int from)
    • getSize

      public int getSize()
    • setSize

      public InnerHitBuilder setSize(int size)
    • isExplain

      public boolean isExplain()
    • setExplain

      public InnerHitBuilder setExplain(boolean explain)
    • isVersion

      public boolean isVersion()
    • setVersion

      public InnerHitBuilder setVersion(boolean version)
    • isSeqNoAndPrimaryTerm

      public boolean isSeqNoAndPrimaryTerm()
    • setSeqNoAndPrimaryTerm

      public InnerHitBuilder setSeqNoAndPrimaryTerm(boolean seqNoAndPrimaryTerm)
    • isTrackScores

      public boolean isTrackScores()
    • setTrackScores

      public InnerHitBuilder setTrackScores(boolean trackScores)
    • getStoredFieldsContext

      public StoredFieldsContext getStoredFieldsContext()
      Gets the stored fields context.
    • setStoredFieldNames

      public <> fieldNames)
      Sets the stored fields to load and return. If none are specified, the source of the document will be returned.
    • getDocValueFields

      public <FieldAndFormat> getDocValueFields()
      Gets the docvalue fields.
    • setDocValueFields

      public <FieldAndFormat> docValueFields)
      Sets the stored fields to load from the docvalue and return.
    • addDocValueField

      public  field,  format)
      Adds a field to load from the docvalue and return.
    • addDocValueField

      public  field)
      Adds a field to load from doc values and return.
    • getFetchFields

      public <FieldAndFormat> getFetchFields()
      Gets the fields to load and return as part of the search request.
    • setFetchFields

      public <FieldAndFormat> fetchFields)
      Sets the stored fields to load and return as part of the search request.
    • addFetchField

      public  name)
      Adds a field to load and return as part of the search request.
    • addFetchField

      public  name, @Nullable  format)
      Adds a field to load and return as part of the search request.
      Parameters:
      name - the field name.
      format - an optional format string used when formatting values, for example a date format.
    • addFetchField

      public  name, @Nullable  format,  includeUnmapped)
      Adds a field to load and return as part of the search request.
      Parameters:
      name - the field name.
      format - an optional format string used when formatting values, for example a date format.
      includeUnmapped - whether unmapped fields should be returned as well
    • getScriptFields

      public <SearchSourceBuilder.ScriptField> getScriptFields()
    • setScriptFields

      public <SearchSourceBuilder.ScriptField> scriptFields)
    • addScriptField

      public  name, Script script)
    • getFetchSourceContext

      public FetchSourceContext getFetchSourceContext()
    • setFetchSourceContext

      public InnerHitBuilder setFetchSourceContext(FetchSourceContext fetchSourceContext)
    • getSorts

      public <SortBuilder<?>> getSorts()
    • setSorts

      public <SortBuilder<?>> sorts)
    • addSort

      public InnerHitBuilder addSort(SortBuilder<?> sort)
    • getHighlightBuilder

      public HighlightBuilder getHighlightBuilder()
    • setHighlightBuilder

      public InnerHitBuilder setHighlightBuilder(HighlightBuilder highlightBuilder)
    • setInnerCollapse

      public InnerHitBuilder setInnerCollapse(CollapseBuilder innerCollapseBuilder)
    • getInnerCollapseBuilder

      public CollapseBuilder getInnerCollapseBuilder()
    • toXContent

      public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws
      Specified by:
      toXContent in interface org.elasticsearch.common.xcontent.ToXContent
      Throws:
    • equals

      public boolean equals( o)
      Overrides:
       in class 
    • hashCode

      public int hashCode()
      Overrides:
       in class 
    • fromXContent

      public static InnerHitBuilder fromXContent(org.elasticsearch.common.xcontent.XContentParser parser) throws
      Throws:
    • toString

      public  toString()
      Overrides:
       in class