Class MultisearchBody
java.lang.Object
co.elastic.clients.elasticsearch.core.msearch.MultisearchBody
- All Implemented Interfaces:
JsonpSerializable
@JsonpDeserializable public class MultisearchBody extends java.lang.Object implements JsonpSerializable
- See Also:
- API specification
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMultisearchBody.BuilderBuilder forMultisearchBody. -
Field Summary
Fields Modifier and Type Field Description static JsonpDeserializer<MultisearchBody>_DESERIALIZERJson deserializer forMultisearchBody -
Method Summary
Modifier and Type Method Description java.util.Map<java.lang.String,Aggregation>aggregations()API name:aggregationsFieldCollapsecollapse()API name:collapsejava.util.List<FieldAndFormat>docvalueFields()Array of wildcard (*) patterns.java.lang.Booleanexplain()If true, returns detailed information about score computation as part of a hit.java.util.List<FieldAndFormat>fields()Array of wildcard (*) patterns.java.lang.Integerfrom()Starting document offset.Highlighthighlight()API name:highlightjava.util.List<java.util.Map<java.lang.String,java.lang.Double>>indicesBoost()Boosts the _score of documents from specified indices.java.lang.DoubleminScore()Minimum _score for matching documents.static MultisearchBodyof(java.util.function.Function<MultisearchBody.Builder,ObjectBuilder<MultisearchBody>> fn)PointInTimeReferencepit()Limits the search to a point in time (PIT).QuerypostFilter()API name:post_filterjava.lang.Booleanprofile()API name:profileQueryquery()Defines the search definition using the Query DSL.java.util.List<Rescore>rescore()API name:rescorejava.util.Map<java.lang.String,RuntimeField>runtimeMappings()Defines one or more runtime fields in the search request.java.util.Map<java.lang.String,ScriptField>scriptFields()Retrieve a script evaluation (based on different fields) for each hit.java.util.List<java.lang.String>searchAfter()API name:search_afterjava.lang.BooleanseqNoPrimaryTerm()If true, returns sequence number and primary term of the last modification of each hit.voidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)protected static voidsetupMultisearchBodyDeserializer(ObjectDeserializer<MultisearchBody.Builder> op)java.lang.Integersize()The number of hits to return.java.util.List<SortOptions>sort()API name:sortSourceConfigsource()Indicates which source fields are returned for matching documents.java.util.List<java.lang.String>stats()Stats groups to associate with the search.java.util.List<java.lang.String>storedFields()List of stored fields to return as part of a hit.Suggestersuggest()API name:suggestjava.lang.LongterminateAfter()Maximum number of documents to collect for each shard.java.lang.Stringtimeout()Specifies the period of time to wait for a response from each shard.java.lang.StringtoString()java.lang.BooleantrackScores()If true, calculate and return document scores, even if the scores are not used for sorting.TrackHitstrackTotalHits()Number of hits matching the query to count accurately.java.lang.Booleanversion()If true, returns document version as part of a hit.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
_DESERIALIZER
Json deserializer forMultisearchBody
-
-
Method Details
-
of
public static MultisearchBody of(java.util.function.Function<MultisearchBody.Builder,ObjectBuilder<MultisearchBody>> fn) -
aggregations
API name:aggregations -
collapse
API name:collapse -
query
Defines the search definition using the Query DSL.API name:
query -
explain
@Nullable public final java.lang.Boolean explain()If true, returns detailed information about score computation as part of a hit.API name:
explain -
storedFields
public final java.util.List<java.lang.String> storedFields()List of stored fields to return as part of a hit. If no fields are specified, no stored fields are included in the response. If this field is specified, the _source parameter defaults to false. You can pass _source: true to return both source fields and stored fields in the search response.API name:
stored_fields -
docvalueFields
Array of wildcard (*) patterns. The request returns doc values for field names matching these patterns in the hits.fields property of the response.API name:
docvalue_fields -
from
@Nullable public final java.lang.Integer from()Starting document offset. By default, you cannot page through more than 10,000 hits using the from and size parameters. To page through more hits, use the search_after parameter.API name:
from -
highlight
API name:highlight -
indicesBoost
public final java.util.List<java.util.Map<java.lang.String,java.lang.Double>> indicesBoost()Boosts the _score of documents from specified indices.API name:
indices_boost -
minScore
@Nullable public final java.lang.Double minScore()Minimum _score for matching documents. Documents with a lower _score are not included in the search results.API name:
min_score -
postFilter
API name:post_filter -
profile
@Nullable public final java.lang.Boolean profile()API name:profile -
rescore
API name:rescore -
scriptFields
Retrieve a script evaluation (based on different fields) for each hit.API name:
script_fields -
searchAfter
public final java.util.List<java.lang.String> searchAfter()API name:search_after -
size
@Nullable public final java.lang.Integer size()The number of hits to return. By default, you cannot page through more than 10,000 hits using the from and size parameters. To page through more hits, use the search_after parameter.API name:
size -
sort
API name:sort -
source
Indicates which source fields are returned for matching documents. These fields are returned in the hits._source property of the search response.API name:
_source -
fields
Array of wildcard (*) patterns. The request returns values for field names matching these patterns in the hits.fields property of the response.API name:
fields -
terminateAfter
@Nullable public final java.lang.Long terminateAfter()Maximum number of documents to collect for each shard. If a query reaches this limit, Elasticsearch terminates the query early. Elasticsearch collects documents before sorting. Defaults to 0, which does not terminate query execution early.API name:
terminate_after -
stats
public final java.util.List<java.lang.String> stats()Stats groups to associate with the search. Each group maintains a statistics aggregation for its associated searches. You can retrieve these stats using the indices stats API.API name:
stats -
timeout
@Nullable public final java.lang.String timeout()Specifies the period of time to wait for a response from each shard. If no response is received before the timeout expires, the request fails and returns an error. Defaults to no timeout.API name:
timeout -
trackScores
@Nullable public final java.lang.Boolean trackScores()If true, calculate and return document scores, even if the scores are not used for sorting.API name:
track_scores -
trackTotalHits
Number of hits matching the query to count accurately. If true, the exact number of hits is returned at the cost of some performance. If false, the response does not include the total number of hits matching the query. Defaults to 10,000 hits.API name:
track_total_hits -
version
@Nullable public final java.lang.Boolean version()If true, returns document version as part of a hit.API name:
version -
runtimeMappings
Defines one or more runtime fields in the search request. These fields take precedence over mapped fields with the same name.API name:
runtime_mappings -
seqNoPrimaryTerm
@Nullable public final java.lang.Boolean seqNoPrimaryTerm()If true, returns sequence number and primary term of the last modification of each hit. See Optimistic concurrency control.API name:
seq_no_primary_term -
pit
Limits the search to a point in time (PIT). If you provide a PIT, you cannot specify an <index> in the request path.API name:
pit -
suggest
API name:suggest -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
setupMultisearchBodyDeserializer
protected static void setupMultisearchBodyDeserializer(ObjectDeserializer<MultisearchBody.Builder> op)
-