java.lang.Object
org.elasticsearch.index.query.InnerHitBuilder
- All Implemented Interfaces:
Writeable
,ToXContent
,ToXContentObject
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.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
FieldsModifier and TypeFieldDescriptionstatic final ParseField
static final int
static final int
static final ParseField
static final ParseField
static final ParseField
Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, 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) boolean
static InnerHitBuilder
fromXContent
(XContentParser parser) Gets the docvalue fields.Gets the fields to load and return as part of the search request.int
getFrom()
getName()
int
getSize()
List
<SortBuilder<?>> getSorts()
Gets the stored fields context.int
hashCode()
boolean
boolean
Whether to include inner hits in the search response hits if required mappings is missingboolean
boolean
boolean
setDocValueFields
(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()
toXContent
(XContentBuilder builder, ToXContent.Params params) void
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
NAME_FIELD
-
IGNORE_UNMAPPED
-
COLLAPSE_FIELD
-
FIELD_FIELD
-
DEFAULT_FROM
public static final int DEFAULT_FROM- See Also:
-
DEFAULT_SIZE
public static final int DEFAULT_SIZE- See Also:
-
-
Constructor Details
-
InnerHitBuilder
public InnerHitBuilder() -
InnerHitBuilder
-
InnerHitBuilder
Read from a stream.- Throws:
IOException
-
-
Method Details
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in 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 XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceToXContent
- Throws:
IOException
-
equals
-
hashCode
public int hashCode() -
fromXContent
- Throws:
IOException
-
toString
-