Package org.elasticsearch.index.query
Class InnerHitBuilder
- java.lang.Object
-
- org.elasticsearch.index.query.InnerHitBuilder
-
- All Implemented Interfaces:
Writeable
,ToXContent
,ToXContentObject
public final class InnerHitBuilder extends java.lang.Object implements Writeable, ToXContentObject
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
-
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
-
Field Summary
Fields Modifier and Type Field Description static ParseField
COLLAPSE_FIELD
static QueryBuilder
DEFAULT_INNER_HIT_QUERY
static ParseField
FIELD_FIELD
static ParseField
IGNORE_UNMAPPED
static ParseField
NAME_FIELD
-
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
-
Constructor Summary
Constructors Constructor Description InnerHitBuilder()
InnerHitBuilder(java.lang.String name)
InnerHitBuilder(StreamInput in)
Read from a stream.
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
-
-
-
Field Detail
-
NAME_FIELD
public static final ParseField NAME_FIELD
-
IGNORE_UNMAPPED
public static final ParseField IGNORE_UNMAPPED
-
DEFAULT_INNER_HIT_QUERY
public static final QueryBuilder DEFAULT_INNER_HIT_QUERY
-
COLLAPSE_FIELD
public static final ParseField COLLAPSE_FIELD
-
FIELD_FIELD
public static final ParseField FIELD_FIELD
-
-
Constructor Detail
-
InnerHitBuilder
public InnerHitBuilder()
-
InnerHitBuilder
public InnerHitBuilder(java.lang.String name)
-
InnerHitBuilder
public InnerHitBuilder(StreamInput in) throws java.io.IOException
Read from a stream.- Throws:
java.io.IOException
-
-
Method Detail
-
writeTo
public void writeTo(StreamOutput out) throws java.io.IOException
Description copied from interface:Writeable
Write this into the StreamOutput.
-
getName
public java.lang.String getName()
-
setName
public InnerHitBuilder setName(java.lang.String 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 InnerHitBuilder setStoredFieldNames(java.util.List<java.lang.String> fieldNames)
Sets the stored fields to load and return. If none are specified, the source of the document will be returned.
-
getDocValueFields
public java.util.List<DocValueFieldsContext.FieldAndFormat> getDocValueFields()
Gets the docvalue fields.
-
setDocValueFields
public InnerHitBuilder setDocValueFields(java.util.List<DocValueFieldsContext.FieldAndFormat> docValueFields)
Sets the stored fields to load from the docvalue and return.
-
addDocValueField
public InnerHitBuilder addDocValueField(java.lang.String field, java.lang.String format)
Adds a field to load from the docvalue and return.
-
addDocValueField
public InnerHitBuilder addDocValueField(java.lang.String field)
Adds a field to load from doc values and return.
-
getScriptFields
public java.util.Set<SearchSourceBuilder.ScriptField> getScriptFields()
-
setScriptFields
public InnerHitBuilder setScriptFields(java.util.Set<SearchSourceBuilder.ScriptField> scriptFields)
-
addScriptField
public InnerHitBuilder addScriptField(java.lang.String name, Script script)
-
getFetchSourceContext
public FetchSourceContext getFetchSourceContext()
-
setFetchSourceContext
public InnerHitBuilder setFetchSourceContext(FetchSourceContext fetchSourceContext)
-
getSorts
public java.util.List<SortBuilder<?>> getSorts()
-
setSorts
public InnerHitBuilder setSorts(java.util.List<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 XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
- Specified by:
toXContent
in interfaceToXContent
- Throws:
java.io.IOException
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
fromXContent
public static InnerHitBuilder fromXContent(XContentParser parser) throws java.io.IOException
- Throws:
java.io.IOException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-