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
-
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.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic org.elasticsearch.common.xcontent.ParseFieldstatic QueryBuilderstatic org.elasticsearch.common.xcontent.ParseFieldstatic org.elasticsearch.common.xcontent.ParseFieldstatic org.elasticsearch.common.xcontent.ParseFieldFields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddDocValueField(String field)Adds a field to load from doc values and return.addDocValueField(String field, String format)Adds a field to load from the docvalue and return.addFetchField(String name)Adds a field to load and return as part of the search request.addFetchField(String name, String format)Adds a field to load and return as part of the search request.addFetchField(String name, String format, Boolean includeUnmapped)Adds a field to load and return as part of the search request.addScriptField(String name, Script script)addSort(SortBuilder<?> sort)booleanstatic InnerHitBuilderfromXContent(org.elasticsearch.common.xcontent.XContentParser parser)Gets the docvalue fields.Gets the fields to load and return as part of the search request.intgetFrom()getName()intgetSize()List<SortBuilder<?>>getSorts()Gets the stored fields context.inthashCode()booleanbooleanWhether to include inner hits in the search response hits if required mappings is missingbooleanbooleanbooleansetDocValueFields(List<FieldAndFormat> docValueFields)Sets the stored fields to load from the docvalue and return.setExplain(boolean explain)setFetchFields(List<FieldAndFormat> fetchFields)Sets the stored fields to load and return as part of the search request.setFetchSourceContext(FetchSourceContext fetchSourceContext)setFrom(int from)setHighlightBuilder(HighlightBuilder highlightBuilder)setIgnoreUnmapped(boolean value)setInnerCollapse(CollapseBuilder innerCollapseBuilder)setScriptFields(Set<SearchSourceBuilder.ScriptField> scriptFields)setSeqNoAndPrimaryTerm(boolean seqNoAndPrimaryTerm)setSize(int size)setSorts(List<SortBuilder<?>> sorts)setStoredFieldNames(List<String> fieldNames)Sets the stored fields to load and return.setTrackScores(boolean trackScores)setVersion(boolean version)toString()org.elasticsearch.common.xcontent.XContentBuildertoXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)voidwriteTo(StreamOutput out)Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
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
-
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
-
InnerHitBuilder
Read from a stream.- Throws:
IOException
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
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
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. -
getFetchFields
Gets the fields to load and return as part of the search request. -
setFetchFields
Sets the stored fields to load and return as part of the search request. -
addFetchField
Adds a field to load and return as part of the search request. -
addFetchField
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
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
-
setScriptFields
-
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 IOException- Specified by:
toXContentin interfaceorg.elasticsearch.common.xcontent.ToXContent- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
fromXContent
public static InnerHitBuilder fromXContent(org.elasticsearch.common.xcontent.XContentParser parser) throws IOException- Throws:
IOException
-
toString
-