Class MultisearchBody.Builder
- All Implemented Interfaces:
WithJson<MultisearchBody.Builder>,ObjectBuilder<MultisearchBody>
- Enclosing class:
- MultisearchBody
MultisearchBody.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal MultisearchBody.Builderaggregations(String key, Aggregation value) API name:aggregationsfinal MultisearchBody.Builderaggregations(String key, AggregationVariant value) API name:aggregationsfinal MultisearchBody.BuilderAPI name:aggregationsfinal MultisearchBody.Builderaggregations(Map<String, Aggregation> map) API name:aggregationsbuild()Builds aMultisearchBody.final MultisearchBody.Buildercollapse(FieldCollapse value) API name:collapsefinal MultisearchBody.BuilderAPI name:collapsefinal MultisearchBody.BuilderdocvalueFields(FieldAndFormat value, FieldAndFormat... values) Array of wildcard (*) patterns.final MultisearchBody.BuilderArray of wildcard (*) patterns.final MultisearchBody.BuilderdocvalueFields(List<FieldAndFormat> list) Array of wildcard (*) patterns.final MultisearchBody.BuilderIf true, returns detailed information about score computation as part of a hit.final MultisearchBody.BuilderConfiguration of search extensions defined by Elasticsearch plugins.final MultisearchBody.BuilderConfiguration of search extensions defined by Elasticsearch plugins.final MultisearchBody.Builderfields(FieldAndFormat value, FieldAndFormat... values) Array of wildcard (*) patterns.final MultisearchBody.BuilderArray of wildcard (*) patterns.final MultisearchBody.Builderfields(List<FieldAndFormat> list) Array of wildcard (*) patterns.final MultisearchBody.BuilderStarting document offset.final MultisearchBody.BuilderAPI name:highlightfinal MultisearchBody.BuilderAPI name:highlightfinal MultisearchBody.BuilderindicesBoost(NamedValue<Double> value, NamedValue<Double>... values) Boosts the _score of documents from specified indices.final MultisearchBody.BuilderindicesBoost(List<NamedValue<Double>> list) Boosts the _score of documents from specified indices.final MultisearchBody.BuilderDefines the approximate kNN search to run.final MultisearchBody.BuilderDefines the approximate kNN search to run.final MultisearchBody.BuilderDefines the approximate kNN search to run.final MultisearchBody.BuilderThe minimum_scorefor matching documents.final MultisearchBody.Builderpit(PointInTimeReference value) Limits the search to a point in time (PIT).final MultisearchBody.BuilderLimits the search to a point in time (PIT).final MultisearchBody.BuilderpostFilter(Query value) API name:post_filterfinal MultisearchBody.BuilderpostFilter(QueryVariant value) API name:post_filterfinal MultisearchBody.BuilderAPI name:post_filterfinal MultisearchBody.BuilderAPI name:profilefinal MultisearchBody.BuilderDefines the search definition using the Query DSL.final MultisearchBody.Builderquery(QueryVariant value) Defines the search definition using the Query DSL.final MultisearchBody.BuilderDefines the search definition using the Query DSL.final MultisearchBody.BuilderAPI name:rescorefinal MultisearchBody.Builderrescore(RescoreVariant value, RescoreVariant... values) API name:rescorefinal MultisearchBody.BuilderAPI name:rescorefinal MultisearchBody.BuilderAPI name:rescorefinal MultisearchBody.BuilderruntimeMappings(String key, RuntimeField value) Defines one or more runtime fields in the search request.final MultisearchBody.BuilderDefines one or more runtime fields in the search request.final MultisearchBody.BuilderruntimeMappings(Map<String, RuntimeField> map) Defines one or more runtime fields in the search request.final MultisearchBody.BuilderscriptFields(String key, ScriptField value) Retrieve a script evaluation (based on different fields) for each hit.final MultisearchBody.BuilderRetrieve a script evaluation (based on different fields) for each hit.final MultisearchBody.BuilderscriptFields(Map<String, ScriptField> map) Retrieve a script evaluation (based on different fields) for each hit.final MultisearchBody.BuildersearchAfter(boolean value, boolean... values) API name:search_afterfinal MultisearchBody.BuildersearchAfter(double value, double... values) API name:search_afterfinal MultisearchBody.BuildersearchAfter(long value, long... values) API name:search_afterfinal MultisearchBody.BuildersearchAfter(FieldValue value, FieldValue... values) API name:search_afterfinal MultisearchBody.BuildersearchAfter(String value, String... values) API name:search_afterfinal MultisearchBody.BuilderAPI name:search_afterfinal MultisearchBody.BuildersearchAfter(List<FieldValue> list) API name:search_afterprotected MultisearchBody.Builderself()final MultisearchBody.BuilderseqNoPrimaryTerm(Boolean value) If true, returns sequence number and primary term of the last modification of each hit.final MultisearchBody.BuilderThe number of hits to return.final MultisearchBody.Buildersort(SortOptions value, SortOptions... values) API name:sortfinal MultisearchBody.BuilderAPI name:sortfinal MultisearchBody.Buildersort(List<SortOptions> list) API name:sortfinal MultisearchBody.Buildersource(SourceConfig value) Indicates which source fields are returned for matching documents.final MultisearchBody.BuilderIndicates which source fields are returned for matching documents.final MultisearchBody.BuilderStats groups to associate with the search.final MultisearchBody.BuilderStats groups to associate with the search.final MultisearchBody.BuilderstoredFields(String value, String... values) List of stored fields to return as part of a hit.final MultisearchBody.BuilderstoredFields(List<String> list) List of stored fields to return as part of a hit.final MultisearchBody.BuilderAPI name:suggestfinal MultisearchBody.BuilderAPI name:suggestfinal MultisearchBody.BuilderterminateAfter(Long value) Maximum number of documents to collect for each shard.final MultisearchBody.BuilderSpecifies the period of time to wait for a response from each shard.final MultisearchBody.BuildertrackScores(Boolean value) If true, calculate and return document scores, even if the scores are not used for sorting.final MultisearchBody.BuildertrackTotalHits(TrackHits value) Number of hits matching the query to count accurately.final MultisearchBody.BuilderNumber of hits matching the query to count accurately.final MultisearchBody.BuilderIf true, returns document version as part of a hit.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBase
withJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase
_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
aggregations
API name:aggregationsAdds all entries of
maptoaggregations. -
aggregations
API name:aggregationsAdds an entry to
aggregations. -
aggregations
API name:aggregationsAdds an entry to
aggregations. -
aggregations
public final MultisearchBody.Builder aggregations(String key, Function<Aggregation.Builder, ObjectBuilder<Aggregation>> fn) API name:aggregationsAdds an entry to
aggregationsusing a builder lambda. -
collapse
API name:collapse -
collapse
public final MultisearchBody.Builder collapse(Function<FieldCollapse.Builder, ObjectBuilder<FieldCollapse>> fn) API name:collapse -
query
Defines the search definition using the Query DSL.API name:
query -
query
Defines the search definition using the Query DSL.API name:
query -
query
Defines the search definition using the Query DSL.API name:
query -
explain
If true, returns detailed information about score computation as part of a hit.API name:
explain -
ext
Configuration of search extensions defined by Elasticsearch plugins.API name:
extAdds all entries of
maptoext. -
ext
Configuration of search extensions defined by Elasticsearch plugins.API name:
extAdds an entry to
ext. -
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_fieldsAdds all elements of
listtostoredFields. -
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_fieldsAdds one or more values to
storedFields. -
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_fieldsAdds all elements of
listtodocvalueFields. -
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_fieldsAdds one or more values to
docvalueFields. -
docvalueFields
public final MultisearchBody.Builder docvalueFields(Function<FieldAndFormat.Builder, ObjectBuilder<FieldAndFormat>> fn) 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_fieldsAdds a value to
docvalueFieldsusing a builder lambda. -
knn
Defines the approximate kNN search to run.API name:
knnAdds all elements of
listtoknn. -
knn
Defines the approximate kNN search to run.API name:
knnAdds one or more values to
knn. -
knn
Defines the approximate kNN search to run.API name:
knnAdds a value to
knnusing a builder lambda. -
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 -
highlight
public final MultisearchBody.Builder highlight(Function<Highlight.Builder, ObjectBuilder<Highlight>> fn) API name:highlight -
indicesBoost
Boosts the _score of documents from specified indices.API name:
indices_boostAdds all elements of
listtoindicesBoost. -
indicesBoost
@SafeVarargs public final MultisearchBody.Builder indicesBoost(NamedValue<Double> value, NamedValue<Double>... values) Boosts the _score of documents from specified indices.API name:
indices_boostAdds one or more values to
indicesBoost. -
minScore
The minimum_scorefor matching documents. Documents with a lower_scoreare not included in search results and results collected by aggregations.API name:
min_score -
postFilter
API name:post_filter -
postFilter
API name:post_filter -
postFilter
API name:post_filter -
profile
API name:profile -
rescore
API name:rescoreAdds all elements of
listtorescore. -
rescore
API name:rescoreAdds one or more values to
rescore. -
rescore
API name:rescoreAdds one or more values to
rescore. -
rescore
API name:rescoreAdds a value to
rescoreusing a builder lambda. -
scriptFields
Retrieve a script evaluation (based on different fields) for each hit.API name:
script_fieldsAdds all entries of
maptoscriptFields. -
scriptFields
Retrieve a script evaluation (based on different fields) for each hit.API name:
script_fieldsAdds an entry to
scriptFields. -
scriptFields
public final MultisearchBody.Builder scriptFields(String key, Function<ScriptField.Builder, ObjectBuilder<ScriptField>> fn) Retrieve a script evaluation (based on different fields) for each hit.API name:
script_fieldsAdds an entry to
scriptFieldsusing a builder lambda. -
searchAfter
API name:search_afterAdds all elements of
listtosearchAfter. -
searchAfter
API name:search_afterAdds one or more values to
searchAfter. -
searchAfter
API name:search_afterAdds one or more values to
searchAfter. -
searchAfter
API name:search_afterAdds one or more values to
searchAfter. -
searchAfter
API name:search_afterAdds one or more values to
searchAfter. -
searchAfter
API name:search_afterAdds one or more values to
searchAfter. -
searchAfter
public final MultisearchBody.Builder searchAfter(Function<FieldValue.Builder, ObjectBuilder<FieldValue>> fn) API name:search_afterAdds a value to
searchAfterusing a builder lambda. -
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:sortAdds all elements of
listtosort. -
sort
API name:sortAdds one or more values to
sort. -
sort
public final MultisearchBody.Builder sort(Function<SortOptions.Builder, ObjectBuilder<SortOptions>> fn) API name:sortAdds a value to
sortusing a builder lambda. -
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 -
source
public final MultisearchBody.Builder source(Function<SourceConfig.Builder, ObjectBuilder<SourceConfig>> fn) 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:
fieldsAdds all elements of
listtofields. -
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:
fieldsAdds one or more values to
fields. -
fields
public final MultisearchBody.Builder fields(Function<FieldAndFormat.Builder, ObjectBuilder<FieldAndFormat>> fn) Array of wildcard (*) patterns. The request returns values for field names matching these patterns in the hits.fields property of the response.API name:
fieldsAdds a value to
fieldsusing a builder lambda. -
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
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:
statsAdds all elements of
listtostats. -
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:
statsAdds one or more values to
stats. -
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
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 -
trackTotalHits
public final MultisearchBody.Builder trackTotalHits(Function<TrackHits.Builder, ObjectBuilder<TrackHits>> fn) 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
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_mappingsAdds all entries of
maptoruntimeMappings. -
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_mappingsAdds an entry to
runtimeMappings. -
runtimeMappings
public final MultisearchBody.Builder runtimeMappings(String key, Function<RuntimeField.Builder, ObjectBuilder<RuntimeField>> fn) Defines one or more runtime fields in the search request. These fields take precedence over mapped fields with the same name.API name:
runtime_mappingsAdds an entry to
runtimeMappingsusing a builder lambda. -
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 -
pit
public final MultisearchBody.Builder pit(Function<PointInTimeReference.Builder, ObjectBuilder<PointInTimeReference>> fn) 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 -
suggest
public final MultisearchBody.Builder suggest(Function<Suggester.Builder, ObjectBuilder<Suggester>> fn) API name:suggest -
self
- Specified by:
selfin classWithJsonObjectBuilderBase<MultisearchBody.Builder>
-
build
Builds aMultisearchBody.- Specified by:
buildin interfaceObjectBuilder<MultisearchBody>- Throws:
NullPointerException- if some of the required fields are null.
-