public final class InnerHitBuilder extends ToXContentToBytes implements Writeable
Writeable.Reader<V>, Writeable.Writer<V>
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
static QueryBuilder |
DEFAULT_INNER_HIT_QUERY |
static ParseField |
IGNORE_UNMAPPED |
static ParseField |
NAME_FIELD |
EMPTY_PARAMS
Constructor and Description |
---|
InnerHitBuilder() |
InnerHitBuilder(StreamInput in)
Read from a stream.
|
InnerHitBuilder(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
InnerHitBuilder |
addDocValueField(java.lang.String field)
Adds a field to load from the docvalue and return.
|
InnerHitBuilder |
addFieldDataField(java.lang.String field)
Deprecated.
Use
addDocValueField(String) instead. |
InnerHitBuilder |
addScriptField(java.lang.String name,
Script script) |
InnerHitBuilder |
addSort(SortBuilder<?> sort) |
boolean |
equals(java.lang.Object o) |
static InnerHitBuilder |
fromXContent(QueryParseContext context) |
java.util.List<java.lang.String> |
getDocValueFields()
Gets the docvalue fields.
|
FetchSourceContext |
getFetchSourceContext() |
java.util.List<java.lang.String> |
getFieldDataFields()
Deprecated.
Use
getDocValueFields() instead. |
java.util.List<java.lang.String> |
getFieldNames()
Deprecated.
Use
getStoredFieldsContext() instead. |
int |
getFrom() |
HighlightBuilder |
getHighlightBuilder() |
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 missing
|
boolean |
isTrackScores() |
boolean |
isVersion() |
InnerHitBuilder |
setDocValueFields(java.util.List<java.lang.String> docValueFields)
Sets the stored fields to load from the docvalue and return.
|
InnerHitBuilder |
setExplain(boolean explain) |
InnerHitBuilder |
setFetchSourceContext(FetchSourceContext fetchSourceContext) |
InnerHitBuilder |
setFieldDataFields(java.util.List<java.lang.String> fieldDataFields)
Deprecated.
Use
setDocValueFields(List) instead. |
InnerHitBuilder |
setFieldNames(java.util.List<java.lang.String> fieldNames)
Deprecated.
Use
setStoredFieldNames(List) instead. |
InnerHitBuilder |
setFrom(int from) |
InnerHitBuilder |
setHighlightBuilder(HighlightBuilder highlightBuilder) |
InnerHitBuilder |
setIgnoreUnmapped(boolean value) |
InnerHitBuilder |
setName(java.lang.String name) |
InnerHitBuilder |
setScriptFields(java.util.Set<SearchSourceBuilder.ScriptField> scriptFields) |
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) |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
void |
writeTo(StreamOutput out)
Write this into the StreamOutput.
|
void |
writeToCollapseBWC(StreamOutput out)
BWC serialization for collapsing
InnerHitBuilder . |
protected void |
writeToNestedBWC(StreamOutput out,
QueryBuilder query,
java.lang.String nestedPath)
BWC serialization for nested
InnerHitBuilder . |
void |
writeToParentChildBWC(StreamOutput out,
QueryBuilder query,
java.lang.String parentChildPath)
BWC serialization for parent/child
InnerHitBuilder . |
buildAsBytes, buildAsBytes, toString, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
isFragment
public static final ParseField NAME_FIELD
public static final ParseField IGNORE_UNMAPPED
public static final QueryBuilder DEFAULT_INNER_HIT_QUERY
public InnerHitBuilder()
public InnerHitBuilder(java.lang.String name)
public InnerHitBuilder(StreamInput in) throws java.io.IOException
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Writeable
protected void writeToNestedBWC(StreamOutput out, QueryBuilder query, java.lang.String nestedPath) throws java.io.IOException
InnerHitBuilder
.
Should only be used to send nested inner hits to nodes pre 5.5.java.io.IOException
public void writeToCollapseBWC(StreamOutput out) throws java.io.IOException
InnerHitBuilder
.
Should only be used to send collapsing inner hits to nodes pre 5.5.java.io.IOException
public void writeToParentChildBWC(StreamOutput out, QueryBuilder query, java.lang.String parentChildPath) throws java.io.IOException
InnerHitBuilder
.
Should only be used to send hasParent or hasChild inner hits to nodes pre 5.5.java.io.IOException
public java.lang.String getName()
public InnerHitBuilder setName(java.lang.String name)
public InnerHitBuilder setIgnoreUnmapped(boolean value)
public boolean isIgnoreUnmapped()
public int getFrom()
public InnerHitBuilder setFrom(int from)
public int getSize()
public InnerHitBuilder setSize(int size)
public boolean isExplain()
public InnerHitBuilder setExplain(boolean explain)
public boolean isVersion()
public InnerHitBuilder setVersion(boolean version)
public boolean isTrackScores()
public InnerHitBuilder setTrackScores(boolean trackScores)
@Deprecated public java.util.List<java.lang.String> getFieldNames()
getStoredFieldsContext()
instead.@Deprecated public InnerHitBuilder setFieldNames(java.util.List<java.lang.String> fieldNames)
setStoredFieldNames(List)
instead.public StoredFieldsContext getStoredFieldsContext()
public InnerHitBuilder setStoredFieldNames(java.util.List<java.lang.String> fieldNames)
@Deprecated public java.util.List<java.lang.String> getFieldDataFields()
getDocValueFields()
instead.@Deprecated public InnerHitBuilder setFieldDataFields(java.util.List<java.lang.String> fieldDataFields)
setDocValueFields(List)
instead.@Deprecated public InnerHitBuilder addFieldDataField(java.lang.String field)
addDocValueField(String)
instead.public java.util.List<java.lang.String> getDocValueFields()
public InnerHitBuilder setDocValueFields(java.util.List<java.lang.String> docValueFields)
public InnerHitBuilder addDocValueField(java.lang.String field)
public java.util.Set<SearchSourceBuilder.ScriptField> getScriptFields()
public InnerHitBuilder setScriptFields(java.util.Set<SearchSourceBuilder.ScriptField> scriptFields)
public InnerHitBuilder addScriptField(java.lang.String name, Script script)
public FetchSourceContext getFetchSourceContext()
public InnerHitBuilder setFetchSourceContext(FetchSourceContext fetchSourceContext)
public java.util.List<SortBuilder<?>> getSorts()
public InnerHitBuilder setSorts(java.util.List<SortBuilder<?>> sorts)
public InnerHitBuilder addSort(SortBuilder<?> sort)
public HighlightBuilder getHighlightBuilder()
public InnerHitBuilder setHighlightBuilder(HighlightBuilder highlightBuilder)
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent
in interface ToXContent
java.io.IOException
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public static InnerHitBuilder fromXContent(QueryParseContext context) throws java.io.IOException
java.io.IOException