Package org.elasticsearch.index.query
Class InnerHitBuilder
java.lang.Object
org.elasticsearch.index.query.InnerHitBuilder
- All Implemented Interfaces:
Writeable
,org.elasticsearch.common.xcontent.ToXContent
,org.elasticsearch.common.xcontent.ToXContentObject
public final class InnerHitBuilder extends java.lang.Object implements Writeable, org.elasticsearch.common.xcontent.ToXContentObject
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.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 org.elasticsearch.common.ParseField
COLLAPSE_FIELD
static QueryBuilder
DEFAULT_INNER_HIT_QUERY
static org.elasticsearch.common.ParseField
FIELD_FIELD
static org.elasticsearch.common.ParseField
IGNORE_UNMAPPED
static org.elasticsearch.common.ParseField
NAME_FIELD
-
Constructor Summary
Constructors Constructor Description InnerHitBuilder()
InnerHitBuilder(java.lang.String name)
InnerHitBuilder(StreamInput in)
Read from a stream. -
Method Summary
Modifier and Type Method Description InnerHitBuilder
addDocValueField(java.lang.String field)
Adds a field to load from doc values and return.InnerHitBuilder
addDocValueField(java.lang.String field, java.lang.String format)
Adds a field to load from the docvalue and return.InnerHitBuilder
addScriptField(java.lang.String name, Script script)
InnerHitBuilder
addSort(SortBuilder<?> sort)
boolean
equals(java.lang.Object o)
static InnerHitBuilder
fromXContent(org.elasticsearch.common.xcontent.XContentParser parser)
java.util.List<FetchDocValuesContext.FieldAndFormat>
getDocValueFields()
Gets the docvalue fields.FetchSourceContext
getFetchSourceContext()
int
getFrom()
HighlightBuilder
getHighlightBuilder()
CollapseBuilder
getInnerCollapseBuilder()
java.lang.String
getName()
java.util.Set<SearchSourceBuilder.ScriptField>
getScriptFields()
int
getSize()
java.util.List<SortBuilder<?>>
getSorts()
StoredFieldsContext
getStoredFieldsContext()
Gets the stored fields context.int
hashCode()
boolean
isExplain()
boolean
isIgnoreUnmapped()
Whether to include inner hits in the search response hits if required mappings is missingboolean
isSeqNoAndPrimaryTerm()
boolean
isTrackScores()
boolean
isVersion()
InnerHitBuilder
setDocValueFields(java.util.List<FetchDocValuesContext.FieldAndFormat> docValueFields)
Sets the stored fields to load from the docvalue and return.InnerHitBuilder
setExplain(boolean explain)
InnerHitBuilder
setFetchSourceContext(FetchSourceContext fetchSourceContext)
InnerHitBuilder
setFrom(int from)
InnerHitBuilder
setHighlightBuilder(HighlightBuilder highlightBuilder)
InnerHitBuilder
setIgnoreUnmapped(boolean value)
InnerHitBuilder
setInnerCollapse(CollapseBuilder innerCollapseBuilder)
InnerHitBuilder
setName(java.lang.String name)
InnerHitBuilder
setScriptFields(java.util.Set<SearchSourceBuilder.ScriptField> scriptFields)
InnerHitBuilder
setSeqNoAndPrimaryTerm(boolean seqNoAndPrimaryTerm)
InnerHitBuilder
setSize(int size)
InnerHitBuilder
setSorts(java.util.List<SortBuilder<?>> sorts)
InnerHitBuilder
setStoredFieldNames(java.util.List<java.lang.String> fieldNames)
Sets the stored fields to load and return.InnerHitBuilder
setTrackScores(boolean trackScores)
InnerHitBuilder
setVersion(boolean version)
java.lang.String
toString()
org.elasticsearch.common.xcontent.XContentBuilder
toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
void
writeTo(StreamOutput out)
Write this into the StreamOutput.
-
Field Details
-
NAME_FIELD
public static final org.elasticsearch.common.ParseField NAME_FIELD -
IGNORE_UNMAPPED
public static final org.elasticsearch.common.ParseField IGNORE_UNMAPPED -
DEFAULT_INNER_HIT_QUERY
-
COLLAPSE_FIELD
public static final org.elasticsearch.common.ParseField COLLAPSE_FIELD -
FIELD_FIELD
public static final org.elasticsearch.common.ParseField FIELD_FIELD
-
-
Constructor Details
-
InnerHitBuilder
public InnerHitBuilder() -
InnerHitBuilder
public InnerHitBuilder(java.lang.String name) -
InnerHitBuilder
Read from a stream.- Throws:
java.io.IOException
-
-
Method Details
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput. -
getName
public java.lang.String getName() -
setName
-
setIgnoreUnmapped
-
isIgnoreUnmapped
public boolean isIgnoreUnmapped()Whether to include inner hits in the search response hits if required mappings is missing -
getFrom
public int getFrom() -
setFrom
-
getSize
public int getSize() -
setSize
-
isExplain
public boolean isExplain() -
setExplain
-
isVersion
public boolean isVersion() -
setVersion
-
isSeqNoAndPrimaryTerm
public boolean isSeqNoAndPrimaryTerm() -
setSeqNoAndPrimaryTerm
-
isTrackScores
public boolean isTrackScores() -
setTrackScores
-
getStoredFieldsContext
Gets the stored fields context. -
setStoredFieldNames
Sets the stored fields to load and return. If none are specified, the source of the document will be returned. -
getDocValueFields
Gets the docvalue fields. -
setDocValueFields
public InnerHitBuilder setDocValueFields(java.util.List<FetchDocValuesContext.FieldAndFormat> docValueFields)Sets the stored fields to load from the docvalue and return. -
addDocValueField
Adds a field to load from the docvalue and return. -
addDocValueField
Adds a field to load from doc values and return. -
getScriptFields
-
setScriptFields
public InnerHitBuilder setScriptFields(java.util.Set<SearchSourceBuilder.ScriptField> scriptFields) -
addScriptField
-
getFetchSourceContext
-
setFetchSourceContext
-
getSorts
-
setSorts
-
addSort
-
getHighlightBuilder
-
setHighlightBuilder
-
setInnerCollapse
-
getInnerCollapseBuilder
-
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws java.io.IOException- Specified by:
toXContent
in interfaceorg.elasticsearch.common.xcontent.ToXContent
- 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(org.elasticsearch.common.xcontent.XContentParser parser) throws java.io.IOException- Throws:
java.io.IOException
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-