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.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Modifier and TypeFieldDescriptionstatic org.elasticsearch.common.xcontent.ParseField
static QueryBuilder
static org.elasticsearch.common.xcontent.ParseField
static org.elasticsearch.common.xcontent.ParseField
static org.elasticsearch.common.xcontent.ParseField
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
-
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(org.elasticsearch.common.xcontent.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()
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.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 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: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 org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException- Specified by:
toXContent
in 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
-