When the primary sort of the results is an indexed field, shards get sorted based on minimum and maximum value that they hold for that field. Partial results become available following the sort criteria that was requested.
Warning: Asynchronous search does not support scroll or search requests that include only the suggest section.
By default, Elasticsearch does not allow you to store an async search response larger than 10Mb and an attempt to do this results in an error.
The maximum allowed size for a stored async search response can be set by changing the search.max_async_search_response_size cluster level setting.
Query parameters
-
Blocks and waits until the search is completed up to a certain timeout. When the async search completes within the timeout, the response won’t include the ID as the results are not stored in the cluster.
Values are
-1or0.External documentation -
Specifies how long the async search needs to be available. Ongoing async searches and any saved search results are deleted after this period.
Values are
-1or0.External documentation -
If
true, results are stored for later retrieval when the search completes within thewait_for_completion_timeout. -
Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes
_allstring or when no indices have been specified) -
Indicate if an error should be returned if there is a partial search failure or timeout
-
The analyzer to use for the query string
-
Specify whether wildcard and prefix queries should be analyzed
-
Affects how often partial results become available, which happens whenever shard results are reduced. A partial reduction is performed every time the coordinating node has received a certain number of new shard responses (5 by default).
-
The default value is the only supported value.
-
The default operator for query string query (AND or OR)
Values are
and,AND,or, orOR. -
The field to use as default where no field prefix is given in the query string
-
A comma-separated list of fields to return as the docvalue representation of a field for each hit
-
Whether to expand wildcard expression to concrete indices that are open, closed or both
Values are
all,open,closed,hidden, ornone. -
Specify whether to return detailed information about score computation as part of a hit
-
Whether specified concrete, expanded or aliased indices should be ignored when throttled
-
Whether specified concrete indices should be ignored when unavailable (missing or closed)
-
Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
-
The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests
-
Specify the node or shard the operation should be performed on
-
Specify if request cache should be used for this request or not, defaults to true
-
A comma-separated list of specific routing values
-
Search operation type
Values are
query_then_fetchordfs_query_then_fetch. -
Specific 'tag' of the request for logging and statistical purposes
-
A comma-separated list of stored fields to return as part of a hit
-
Specifies which field to use for suggestions.
-
Specify suggest mode
Values are
missing,popular, oralways. -
How many suggestions to return in response
-
The source text for which the suggestions should be returned.
-
The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early
-
Explicit operation timeout
Values are
-1or0.External documentation -
Indicate if the number of documents that match the query should be tracked. A number can also be specified, to accurately track the total hit count up to the number.
-
Whether to calculate and return scores even if they are not used for sorting
-
Specify whether aggregation and suggester names should be prefixed by their respective types in the response
-
Indicates whether hits.total should be rendered as an integer or an object in the rest search response
-
Specify whether to return document version as part of a hit
-
True or false to return the _source field or not, or a list of fields to return
-
A list of fields to exclude from the returned _source field
-
A list of fields to extract and return from the _source field
-
Specify whether to return sequence number and primary term of the last modification of each hit
-
Query in the Lucene query string syntax
-
Number of hits to return
-
Starting offset
-
A comma-separated list of : pairs
Body
-
Hide collapse attributes Show collapse attributes object
-
The field to collapse the result set on
inner_hits
object | array[object] The number of inner hits and their sort order
One of: Hide attributes Show attributes
-
The name for the particular inner hit definition in the response. Useful when a search request contains multiple inner hits.
-
The maximum number of hits to return per
inner_hits.Default value is
3.0. -
Inner hit starting document offset.
Default value is
0.0. -
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
Default value is
false.
Hide attributes Show attributes object
-
The name for the particular inner hit definition in the response. Useful when a search request contains multiple inner hits.
-
The maximum number of hits to return per
inner_hits.Default value is
3.0. -
Inner hit starting document offset.
Default value is
0.0. -
A reference to a field with formatting instructions on how to return the value
A reference to a field with formatting instructions on how to return the value
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
Default value is
false.
-
-
The number of concurrent requests allowed to retrieve the inner_hits per group
-
-
If true, returns detailed information about score computation as part of a hit.
Default value is
false. -
Configuration of search extensions defined by Elasticsearch plugins.
-
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.
Default value is
0.0. -
Hide highlight attributes Show highlight attributes object
-
A string that contains each boundary character.
Default value is
.,!? \t\n. -
How far to scan for boundary characters.
Default value is
20.0. -
Specifies how to break the highlighted fragments: chars, sentence, or word. Only valid for the unified and fvh highlighters. Defaults to
sentencefor theunifiedhighlighter. Defaults tocharsfor thefvhhighlighter.Values are
chars,sentence, orword. -
Controls which locale is used to search for sentence and word boundaries. This parameter takes a form of a language tag, for example:
"en-US","fr-FR","ja-JP".Default value is
Locale.ROOT. -
Specifies how text should be broken up in highlight snippets:
simpleorspan. Only valid for theplainhighlighter.Values are
simpleorspan. -
The size of the highlighted fragment in characters.
Default value is
100.0. -
Highlight matches for a query other than the search query. This is especially useful if you use a rescore query because those are not taken into account by highlighting by default.
External documentation Hide highlight_query attributes Show highlight_query attributes object
-
Returns documents that contain terms similar to the search term, as measured by a Levenshtein edit distance.
External documentation -
Matches
geo_pointandgeo_shapevalues that intersect a grid cell from a GeoGrid aggregation. -
Returns documents based on the order and proximity of matching terms.
External documentation -
Returns documents that match a provided text, number, date or boolean value. The provided text is analyzed before matching.
External documentation -
Analyzes its input and constructs a
boolquery from the terms. Each term except the last is used in atermquery. The last term is used in a prefix query.External documentation -
Analyzes the text and creates a phrase query out of the analyzed text.
External documentation -
Returns documents that contain the words of a provided text, in the same order as provided. The last term of the provided text is treated as a prefix, matching any words that begin with that term.
External documentation -
Returns documents that contain a specific prefix in a provided field.
External documentation -
Returns documents that contain terms within a provided range.
External documentation -
Returns documents that contain terms matching a regular expression.
External documentation -
Matches spans containing a term.
External documentation -
Returns documents that contain an exact term in a provided field. To return a document, the query term must exactly match the queried field's value, including whitespace and capitalization.
External documentation -
Returns documents that contain a minimum number of exact terms in a provided field. To return a document, a required number of terms must exactly match the field values, including whitespace and capitalization.
External documentation -
Uses a natural language processing model to convert the query text into a list of token-weight pairs which are then used in a query against a sparse vector or rank features field.
External documentation -
Supports returning text_expansion query results by sending in precomputed tokens with the query.
External documentation -
Returns documents that contain terms matching a wildcard pattern.
External documentation
-
If set to a non-negative value, highlighting stops at this defined maximum limit. The rest of the text is not processed, thus not highlighted and no error is returned The
max_analyzed_offsetquery setting does not override theindex.highlight.max_analyzed_offsetsetting, which prevails when it’s set to lower value than the query setting. -
The amount of text you want to return from the beginning of the field if there are no matching fragments to highlight.
Default value is
0.0. -
The maximum number of fragments to return. If the number of fragments is set to
0, no fragments are returned. Instead, the entire field contents are highlighted and returned. This can be handy when you need to highlight short texts such as a title or address, but fragmentation is not required. Ifnumber_of_fragmentsis0,fragment_sizeis ignored.Default value is
5.0. -
Sorts highlighted fragments by score when set to
score. By default, fragments will be output in the order they appear in the field (order:none). Setting this option toscorewill output the most relevant fragments first. Each highlighter applies its own logic to compute relevancy scores.Value is
score. -
Controls the number of matching phrases in a document that are considered. Prevents the
fvhhighlighter from analyzing too many phrases and consuming too much memory. When usingmatched_fields,phrase_limitphrases per matched field are considered. Raising the limit increases query time and consumes more memory. Only supported by thefvhhighlighter.Default value is
256.0. -
Use in conjunction with
pre_tagsto define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>and</em>tags. -
Use in conjunction with
post_tagsto define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>and</em>tags. -
By default, only fields that contains a query match are highlighted. Set to
falseto highlight all fields.Default value is
true. -
Set to
styledto use the built-in tag schema.Value is
styled. -
Values are
defaultorhtml.
-
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.
-
Boosts the _score of documents from specified indices.
-
Array of wildcard (*) patterns. The request returns doc values for field names matching these patterns in the hits.fields property of the response.
Hide docvalue_fields attributes Show docvalue_fields attributes object
knn
object | array[object] Generally available; Added in 8.4.0 Defines the approximate kNN search to run.
One of: Hide attributes Show attributes
-
The name of the vector field to search against
-
The query vector
-
The query vector builder. You must provide a query_vector_builder or query_vector, but not both.
Hide query_vector_builder attribute Show query_vector_builder attribute object
-
The final number of nearest neighbors to return as top hits
-
The number of nearest neighbor candidates to consider per shard
-
The percentage of vectors to explore per shard while doing knn search with bbq_disk
-
Boost value to apply to kNN scores
filter
object | array[object] Filters for the kNN search query
One of: An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
External documentation Hide attributes Show attributes
-
Returns documents that contain terms similar to the search term, as measured by a Levenshtein edit distance.
External documentation -
Matches
geo_pointandgeo_shapevalues that intersect a grid cell from a GeoGrid aggregation. -
Returns documents based on the order and proximity of matching terms.
External documentation -
Returns documents that match a provided text, number, date or boolean value. The provided text is analyzed before matching.
External documentation -
Analyzes its input and constructs a
boolquery from the terms. Each term except the last is used in atermquery. The last term is used in a prefix query.External documentation -
Analyzes the text and creates a phrase query out of the analyzed text.
External documentation -
Returns documents that contain the words of a provided text, in the same order as provided. The last term of the provided text is treated as a prefix, matching any words that begin with that term.
External documentation -
Returns documents that contain a specific prefix in a provided field.
External documentation -
Returns documents that contain terms within a provided range.
External documentation -
Returns documents that contain terms matching a regular expression.
External documentation -
Matches spans containing a term.
External documentation -
Returns documents that contain an exact term in a provided field. To return a document, the query term must exactly match the queried field's value, including whitespace and capitalization.
External documentation -
Returns documents that contain a minimum number of exact terms in a provided field. To return a document, a required number of terms must exactly match the field values, including whitespace and capitalization.
External documentation -
Uses a natural language processing model to convert the query text into a list of token-weight pairs which are then used in a query against a sparse vector or rank features field.
External documentation -
Supports returning text_expansion query results by sending in precomputed tokens with the query.
External documentation -
Returns documents that contain terms matching a wildcard pattern.
External documentation
Hide attributes Show attributes object
An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
External documentation -
Returns documents that contain terms similar to the search term, as measured by a Levenshtein edit distance.
External documentation -
Matches
geo_pointandgeo_shapevalues that intersect a grid cell from a GeoGrid aggregation. -
Returns documents based on the order and proximity of matching terms.
External documentation -
Returns documents that match a provided text, number, date or boolean value. The provided text is analyzed before matching.
External documentation -
Analyzes its input and constructs a
boolquery from the terms. Each term except the last is used in atermquery. The last term is used in a prefix query.External documentation -
Analyzes the text and creates a phrase query out of the analyzed text.
External documentation -
Returns documents that contain the words of a provided text, in the same order as provided. The last term of the provided text is treated as a prefix, matching any words that begin with that term.
External documentation -
Returns documents that contain a specific prefix in a provided field.
External documentation -
Returns documents that contain terms within a provided range.
External documentation -
Returns documents that contain terms matching a regular expression.
External documentation -
Matches spans containing a term.
External documentation -
Returns documents that contain an exact term in a provided field. To return a document, the query term must exactly match the queried field's value, including whitespace and capitalization.
External documentation -
Returns documents that contain a minimum number of exact terms in a provided field. To return a document, a required number of terms must exactly match the field values, including whitespace and capitalization.
External documentation -
Uses a natural language processing model to convert the query text into a list of token-weight pairs which are then used in a query against a sparse vector or rank features field.
External documentation -
Supports returning text_expansion query results by sending in precomputed tokens with the query.
External documentation -
Returns documents that contain terms matching a wildcard pattern.
External documentation
-
The minimum similarity for a vector to be considered a match
-
If defined, each search hit will contain inner hits.
External documentation Hide inner_hits attributes Show inner_hits attributes object
-
The name for the particular inner hit definition in the response. Useful when a search request contains multiple inner hits.
-
The maximum number of hits to return per
inner_hits.Default value is
3.0. -
Inner hit starting document offset.
Default value is
0.0. -
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
Default value is
false.
-
-
Apply oversampling and rescoring to quantized vectors
Hide attributes Show attributes object
-
The name of the vector field to search against
-
The query vector
-
The query vector builder. You must provide a query_vector_builder or query_vector, but not both.
-
The final number of nearest neighbors to return as top hits
-
The number of nearest neighbor candidates to consider per shard
-
The percentage of vectors to explore per shard while doing knn search with bbq_disk
-
Boost value to apply to kNN scores
filter
object | array[object] Filters for the kNN search query
One of: An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
External documentation Hide attributes Show attributes
-
Returns documents that contain terms similar to the search term, as measured by a Levenshtein edit distance.
External documentation -
Matches
geo_pointandgeo_shapevalues that intersect a grid cell from a GeoGrid aggregation. -
Returns documents based on the order and proximity of matching terms.
External documentation -
Returns documents that match a provided text, number, date or boolean value. The provided text is analyzed before matching.
External documentation -
Analyzes its input and constructs a
boolquery from the terms. Each term except the last is used in atermquery. The last term is used in a prefix query.External documentation -
Analyzes the text and creates a phrase query out of the analyzed text.
External documentation -
Returns documents that contain the words of a provided text, in the same order as provided. The last term of the provided text is treated as a prefix, matching any words that begin with that term.
External documentation -
Returns documents that contain a specific prefix in a provided field.
External documentation -
Returns documents that contain terms within a provided range.
External documentation -
Returns documents that contain terms matching a regular expression.
External documentation -
Matches spans containing a term.
External documentation -
Returns documents that contain an exact term in a provided field. To return a document, the query term must exactly match the queried field's value, including whitespace and capitalization.
External documentation -
Returns documents that contain a minimum number of exact terms in a provided field. To return a document, a required number of terms must exactly match the field values, including whitespace and capitalization.
External documentation -
Uses a natural language processing model to convert the query text into a list of token-weight pairs which are then used in a query against a sparse vector or rank features field.
External documentation -
Supports returning text_expansion query results by sending in precomputed tokens with the query.
External documentation -
Returns documents that contain terms matching a wildcard pattern.
External documentation
Hide attributes Show attributes object
An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
External documentation -
Returns documents that contain terms similar to the search term, as measured by a Levenshtein edit distance.
-
Matches
geo_pointandgeo_shapevalues that intersect a grid cell from a GeoGrid aggregation. -
Returns documents based on the order and proximity of matching terms.
-
Returns documents that match a provided text, number, date or boolean value. The provided text is analyzed before matching.
-
Analyzes its input and constructs a
boolquery from the terms. Each term except the last is used in atermquery. The last term is used in a prefix query. -
Analyzes the text and creates a phrase query out of the analyzed text.
-
Returns documents that contain the words of a provided text, in the same order as provided. The last term of the provided text is treated as a prefix, matching any words that begin with that term.
-
Returns documents that contain a specific prefix in a provided field.
-
Returns documents that contain terms within a provided range.
-
Returns documents that contain terms matching a regular expression.
-
Matches spans containing a term.
-
Returns documents that contain an exact term in a provided field. To return a document, the query term must exactly match the queried field's value, including whitespace and capitalization.
-
Returns documents that contain a minimum number of exact terms in a provided field. To return a document, a required number of terms must exactly match the field values, including whitespace and capitalization.
-
Uses a natural language processing model to convert the query text into a list of token-weight pairs which are then used in a query against a sparse vector or rank features field.
-
Supports returning text_expansion query results by sending in precomputed tokens with the query.
-
Returns documents that contain terms matching a wildcard pattern.
-
The minimum similarity for a vector to be considered a match
-
If defined, each search hit will contain inner hits.
External documentation Hide inner_hits attributes Show inner_hits attributes object
-
The name for the particular inner hit definition in the response. Useful when a search request contains multiple inner hits.
-
The maximum number of hits to return per
inner_hits.Default value is
3.0. -
Inner hit starting document offset.
Default value is
0.0. -
A reference to a field with formatting instructions on how to return the value
A reference to a field with formatting instructions on how to return the value
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
Default value is
false.
-
-
Apply oversampling and rescoring to quantized vectors
-
-
Minimum _score for matching documents. Documents with a lower _score are not included in search results and results collected by aggregations.
-
An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
External documentation Hide post_filter attributes Show post_filter attributes object
-
matches documents matching boolean combinations of other queries.
External documentation Hide bool attributes Show bool attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0.
-
-
Returns documents matching a
positivequery while reducing the relevance score of documents that also match anegativequery.External documentation Hide boosting attributes Show boosting attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Floating point number between 0 and 1.0 used to decrease the relevance scores of documents matching the
negativequery. -
Query used to decrease the relevance score of matching documents.
-
Any returned documents must match this query.
-
-
The
combined_fieldsquery supports searching multiple text fields as if their contents had been indexed into one combined field.External documentation Hide combined_fields attributes Show combined_fields attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
List of fields to search. Field wildcard patterns are allowed. Only
textfields are supported, and they must all have the same searchanalyzer. -
Text to search for in the provided
fields. Thecombined_fieldsquery analyzes the provided text before performing a search. -
If true, match phrase queries are automatically created for multi-term synonyms.
Default value is
true. -
Boolean logic used to interpret text in the query value.
Values are
ororand. -
Indicates whether no documents are returned if the analyzer removes all tokens, such as when using a
stopfilter.Values are
noneorall.
-
-
Wraps a filter query and returns every matching document with a relevance score equal to the
boostparameter value.External documentation Hide constant_score attributes Show constant_score attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Filter query you wish to run. Any returned documents must match this query. Filter queries do not calculate relevance scores. To speed up performance, Elasticsearch automatically caches frequently used filter queries.
-
-
Returns documents matching one or more wrapped queries, called query clauses or clauses. If a returned document matches multiple query clauses, the
dis_maxquery assigns the document the highest relevance score from any matching clause, plus a tie breaking increment for any additional matching subqueries.External documentation Hide dis_max attributes Show dis_max attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
One or more query clauses. Returned documents must match one or more of these queries. If a document matches multiple queries, Elasticsearch uses the highest relevance score.
An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
-
Floating point number between 0 and 1.0 used to increase the relevance scores of documents matching multiple query clauses.
Default value is
0.0.
-
distance_feature
object Required Boosts the relevance score of documents closer to a provided origin date or point. For example, you can use this query to give more weight to documents closer to a certain date or location.
External documentation -
Returns documents that contain an indexed value for a field.
External documentation Hide exists attributes Show exists attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Name of the field you wish to search.
-
-
The
function_scoreenables you to modify the score of documents that are retrieved by a query.External documentation Hide function_score attributes Show function_score attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Defines how he newly computed score is combined with the score of the query
Values are
multiply,replace,sum,avg,max, ormin. -
One or more functions that compute a new score for each document returned by the query.
-
Restricts the new score to not exceed the provided limit.
-
Excludes documents that do not meet the provided score threshold.
-
A query that determines the documents for which a new score is computed.
-
Specifies how the computed scores are combined
Values are
multiply,sum,avg,first,max, ormin.
-
-
Returns documents that contain terms similar to the search term, as measured by a Levenshtein edit distance.
External documentation -
Matches geo_point and geo_shape values that intersect a bounding box.
External documentation Hide geo_bounding_box attributes Show geo_bounding_box attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Values are
memoryorindexed. -
Set to
IGNORE_MALFORMEDto accept geo points with invalid latitude or longitude. Set toCOERCEto also try to infer correct latitude or longitude.Values are
coerce,ignore_malformed, orstrict. -
Set to
trueto ignore an unmapped field and not match any documents for this query. Set tofalseto throw an exception if the field is not mapped.Default value is
false.
-
-
Matches
geo_pointandgeo_shapevalues within a given distance of a geopoint.External documentation Hide geo_distance attributes Show geo_distance attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
The radius of the circle centred on the specified location. Points which fall into this circle are considered to be matches.
-
How to compute the distance. Set to
planefor a faster calculation that's inaccurate on long distances and close to the poles.Values are
arcorplane. -
Set to
IGNORE_MALFORMEDto accept geo points with invalid latitude or longitude. Set toCOERCEto also try to infer correct latitude or longitude.Values are
coerce,ignore_malformed, orstrict. -
Set to
trueto ignore an unmapped field and not match any documents for this query. Set tofalseto throw an exception if the field is not mapped.Default value is
false.
-
-
Matches
geo_pointandgeo_shapevalues that intersect a grid cell from a GeoGrid aggregation. -
Hide geo_polygon attributes Show geo_polygon attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Values are
coerce,ignore_malformed, orstrict.
-
-
Filter documents indexed using either the
geo_shapeor thegeo_pointtype.External documentation Hide geo_shape attributes Show geo_shape attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Set to
trueto ignore an unmapped field and not match any documents for this query. Set tofalseto throw an exception if the field is not mapped.Default value is
false.
-
-
Returns parent documents whose joined child documents match a provided query.
External documentation Hide has_child attributes Show has_child attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Indicates whether to ignore an unmapped
typeand not return any documents instead of an error.Default value is
false. -
If defined, each search hit will contain inner hits.
-
Maximum number of child documents that match the query allowed for a returned parent document. If the parent document exceeds this limit, it is excluded from the search results.
-
Minimum number of child documents that match the query required to match the query for a returned parent document. If the parent document does not meet this limit, it is excluded from the search results.
-
Query you wish to run on child documents of the
typefield. If a child document matches the search, the query returns the parent document. -
Indicates how scores for matching child documents affect the root parent document’s relevance score.
Values are
none,avg,sum,max, ormin. -
Name of the child relationship mapped for the
joinfield.
-
-
Returns child documents whose joined parent document matches a provided query.
External documentation Hide has_parent attributes Show has_parent attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Indicates whether to ignore an unmapped
parent_typeand not return any documents instead of an error. You can use this parameter to query multiple indices that may not contain theparent_type.Default value is
false. -
If defined, each search hit will contain inner hits.
-
Name of the parent relationship mapped for the
joinfield. -
Query you wish to run on parent documents of the
parent_typefield. If a parent document matches the search, the query returns its child documents. -
Indicates whether the relevance score of a matching parent document is aggregated into its child documents.
Default value is
false.
-
-
Returns documents based on their IDs. This query uses document IDs stored in the
_idfield.External documentation Hide ids attributes Show ids attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0.
-
-
Returns documents based on the order and proximity of matching terms.
External documentation -
Finds the k nearest vectors to a query vector, as measured by a similarity metric. knn query finds nearest vectors through approximate search on indexed dense_vectors.
External documentation Hide knn attributes Show knn attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
The name of the vector field to search against
-
The query vector
-
The query vector builder. You must provide a query_vector_builder or query_vector, but not both.
-
The number of nearest neighbor candidates to consider per shard
-
The percentage of vectors to explore per shard while doing knn search with bbq_disk
-
The final number of nearest neighbors to return as top hits
-
The minimum similarity for a vector to be considered a match
-
Apply oversampling and rescoring to quantized vectors
-
-
Returns documents that match a provided text, number, date or boolean value. The provided text is analyzed before matching.
External documentation -
Matches all documents, giving them all a
_scoreof 1.0.External documentation Hide match_all attributes Show match_all attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0.
-
-
Analyzes its input and constructs a
boolquery from the terms. Each term except the last is used in atermquery. The last term is used in a prefix query.External documentation -
Matches no documents.
External documentation Hide match_none attributes Show match_none attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0.
-
-
Analyzes the text and creates a phrase query out of the analyzed text.
External documentation -
Returns documents that contain the words of a provided text, in the same order as provided. The last term of the provided text is treated as a prefix, matching any words that begin with that term.
External documentation -
Returns documents that are "like" a given set of documents.
External documentation Hide more_like_this attributes Show more_like_this attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
The analyzer that is used to analyze the free form text. Defaults to the analyzer associated with the first field in fields.
External documentation -
Each term in the formed query could be further boosted by their tf-idf score. This sets the boost factor to use when using this feature. Defaults to deactivated (0).
Default value is
0.0. -
Controls whether the query should fail (throw an exception) if any of the specified fields are not of the supported types (
textorkeyword).Default value is
true. -
A list of fields to fetch and analyze the text from. Defaults to the
index.query.default_fieldindex setting, which has a default value of*. -
Specifies whether the input documents should also be included in the search results returned.
Default value is
false. -
The maximum document frequency above which the terms are ignored from the input document.
-
The maximum number of query terms that can be selected.
Default value is
25.0. -
The maximum word length above which the terms are ignored. Defaults to unbounded (
0).Default value is
0.0. -
The minimum document frequency below which the terms are ignored from the input document.
Default value is
5.0. -
The minimum term frequency below which the terms are ignored from the input document.
Default value is
2.0. -
The minimum word length below which the terms are ignored.
Default value is
0.0. -
Values are
internal,external, orexternal_gte.
-
-
Enables you to search for a provided text, number, date or boolean value across multiple fields. The provided text is analyzed before matching.
External documentation Hide multi_match attributes Show multi_match attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Analyzer used to convert the text in the query value into tokens.
-
If
true, match phrase queries are automatically created for multi-term synonyms.Default value is
true. -
The fields to be queried. Defaults to the
index.query.default_fieldindex settings, which in turn defaults to*. -
Method used to rewrite the query.
-
If
true, edits for fuzzy matching include transpositions of two adjacent characters (for example,abtoba). Can be applied to the term subqueries constructed for all terms but the final term.Default value is
true. -
If
true, format-based errors, such as providing a text query value for a numeric field, are ignored.Default value is
false. -
Maximum number of terms to which the query will expand.
Default value is
50.0. -
Boolean logic used to interpret text in the query value.
Values are
and,AND,or, orOR. -
Number of beginning characters left unchanged for fuzzy matching.
Default value is
0.0. -
Text, number, boolean value or date you wish to find in the provided field.
-
Maximum number of positions allowed between matching tokens.
Default value is
0.0. -
Determines how scores for each per-term blended query and scores across groups are combined.
Default value is
0.0. -
How
themulti_match query is executed internally.Values are
best_fields,most_fields,cross_fields,phrase,phrase_prefix, orbool_prefix. -
Indicates whether no documents are returned if the
analyzerremoves all tokens, such as when using astopfilter.Values are
allornone.
-
-
Wraps another query to search nested fields. If an object matches the search, the nested query returns the root parent document.
External documentation Hide nested attributes Show nested attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Indicates whether to ignore an unmapped path and not return any documents instead of an error.
Default value is
false. -
If defined, each search hit will contain inner hits.
-
Path to the nested object you wish to search.
-
Query you wish to run on nested objects in the path.
-
How scores for matching child objects affect the root parent document’s relevance score.
Values are
none,avg,sum,max, ormin.
-
-
Returns child documents joined to a specific parent document.
External documentation Hide parent_id attributes Show parent_id attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
ID of the parent document.
-
Indicates whether to ignore an unmapped
typeand not return any documents instead of an error.Default value is
false. -
Name of the child relationship mapped for the
joinfield.
-
-
Matches queries stored in an index.
External documentation Hide percolate attributes Show percolate attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
The source of the document being percolated.
-
An array of sources of the documents being percolated.
-
Field that holds the indexed queries. The field must use the
percolatormapping type. -
The ID of a stored document to percolate.
-
The index of a stored document to percolate.
-
The suffix used for the
_percolator_document_slotfield when multiplepercolatequeries are specified. -
Preference used to fetch document to percolate.
-
Routing used to fetch document to percolate.
-
The expected version of a stored document to percolate.
-
-
Promotes selected documents to rank higher than those matching a given query.
External documentation Hide pinned attributes Show pinned attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Document IDs listed in the order they are to appear in results. Required if
docsis not specified. -
Documents listed in the order they are to appear in results. Required if
idsis not specified.
-
-
Returns documents that contain a specific prefix in a provided field.
External documentation -
Returns documents based on a provided query string, using a parser with a strict syntax.
External documentation Hide query_string attributes Show query_string attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
If
true, the wildcard characters*and?are allowed as the first character of the query string.Default value is
true. -
Analyzer used to convert text in the query string into tokens.
-
If
true, the query attempts to analyze wildcard terms in the query string.Default value is
false. -
If
true, match phrase queries are automatically created for multi-term synonyms.Default value is
true. -
Default field to search if no field is provided in the query string. Supports wildcards (
*). Defaults to theindex.query.default_fieldindex setting, which has a default value of*. -
Default boolean logic used to interpret text in the query string if no operators are specified.
Values are
and,AND,or, orOR. -
If
true, enable position increments in queries constructed from aquery_stringsearch.Default value is
true. -
Default value is
false. -
Array of fields to search. Supports wildcards (
*). -
Maximum number of terms to which the query expands for fuzzy matching.
Default value is
50.0. -
Number of beginning characters left unchanged for fuzzy matching.
Default value is
0.0. -
Method used to rewrite the query.
-
If
true, edits for fuzzy matching include transpositions of two adjacent characters (for example,abtoba).Default value is
true. -
If
true, format-based errors, such as providing a text value for a numeric field, are ignored.Default value is
false. -
Maximum number of automaton states required for the query.
Default value is
10000.0. -
Maximum number of positions allowed between matching tokens for phrases.
Default value is
0.0. -
Query string you wish to parse and use for search.
-
Analyzer used to convert quoted text in the query string into tokens. For quoted text, this parameter overrides the analyzer specified in the
analyzerparameter. -
Suffix appended to quoted text in the query string. You can use this suffix to use a different analysis method for exact matches.
-
Method used to rewrite the query.
-
How to combine the queries generated from the individual search terms in the resulting
dis_maxquery. -
Coordinated Universal Time (UTC) offset or IANA time zone used to convert date values in the query string to UTC.
-
Determines how the query matches and scores documents.
Values are
best_fields,most_fields,cross_fields,phrase,phrase_prefix, orbool_prefix.
-
-
Returns documents that contain terms within a provided range.
External documentation -
Boosts the relevance score of documents based on the numeric value of a
rank_featureorrank_featuresfield.External documentation Hide rank_feature attributes Show rank_feature attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
rank_featureorrank_featuresfield used to boost relevance scores.
-
-
Returns documents that contain terms matching a regular expression.
External documentation -
Hide rule attributes Show rule attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
-
-
Filters documents based on a provided script. The script query is typically used in a filter context.
External documentation Hide script attributes Show script attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Contains a script to run as a query. This script must return a boolean value,
trueorfalse.
-
-
Uses a script to provide a custom score for returned documents.
External documentation Hide script_score attributes Show script_score attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Documents with a score lower than this floating point number are excluded from the search results.
-
Query used to return documents.
-
Script used to compute the score of documents returned by the query. Important: final relevance scores from the
script_scorequery cannot be negative.
-
-
A semantic query to semantic_text field types
Hide semantic attributes Show semantic attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
The field to query, which must be a semantic_text field type
-
The query text
-
-
Queries documents that contain fields indexed using the
shapetype.External documentation Hide shape attributes Show shape attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
When set to
truethe query ignores an unmapped field and will not match any documents.
-
-
Returns documents based on a provided query string, using a parser with a limited but fault-tolerant syntax.
External documentation Hide simple_query_string attributes Show simple_query_string attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Analyzer used to convert text in the query string into tokens.
-
If
true, the query attempts to analyze wildcard terms in the query string.Default value is
false. -
If
true, the parser creates a match_phrase query for each multi-position token.Default value is
true. -
Default boolean logic used to interpret text in the query string if no operators are specified.
Values are
and,AND,or, orOR. -
Array of fields you wish to search. Accepts wildcard expressions. You also can boost relevance scores for matches to particular fields using a caret (
^) notation. Defaults to theindex.query.default_field indexsetting, which has a default value of*. -
Maximum number of terms to which the query expands for fuzzy matching.
Default value is
50.0. -
Number of beginning characters left unchanged for fuzzy matching.
Default value is
0.0. -
If
true, edits for fuzzy matching include transpositions of two adjacent characters (for example,abtoba). -
If
true, format-based errors, such as providing a text value for a numeric field, are ignored.Default value is
false. -
Query string in the simple query string syntax you wish to parse and use for search.
-
Suffix appended to quoted text in the query string.
-
-
Returns matches which enclose another span query.
External documentation Hide span_containing attributes Show span_containing attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Can be any span query. Matching spans from
bigthat contain matches fromlittleare returned. -
Can be any span query. Matching spans from
bigthat contain matches fromlittleare returned.
-
-
Wrapper to allow span queries to participate in composite single-field span queries by lying about their search field.
External documentation Hide span_field_masking attributes Show span_field_masking attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
-
Matches spans near the beginning of a field.
External documentation Hide span_first attributes Show span_first attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Controls the maximum end position permitted in a match.
-
Can be any other span type query.
-
-
Allows you to wrap a multi term query (one of
wildcard,fuzzy,prefix,range, orregexpquery) as aspanquery, so it can be nested.External documentation Hide span_multi attributes Show span_multi attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Should be a multi term query (one of
wildcard,fuzzy,prefix,range, orregexpquery).
-
-
Matches spans which are near one another. You can specify
slop, the maximum number of intervening unmatched positions, as well as whether matches are required to be in-order.External documentation Hide span_near attributes Show span_near attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Array of one or more other span type queries.
-
Controls whether matches are required to be in-order.
-
Controls the maximum number of intervening unmatched positions permitted.
-
-
Removes matches which overlap with another span query or which are within x tokens before (controlled by the parameter
pre) or y tokens after (controlled by the parameterpost) another span query.External documentation Hide span_not attributes Show span_not attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
The number of tokens from within the include span that can’t have overlap with the exclude span. Equivalent to setting both
preandpost. -
Span query whose matches must not overlap those returned.
-
Span query whose matches are filtered.
-
The number of tokens after the include span that can’t have overlap with the exclude span.
Default value is
0.0. -
The number of tokens before the include span that can’t have overlap with the exclude span.
Default value is
0.0.
-
-
Matches the union of its span clauses.
External documentation Hide span_or attributes Show span_or attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Array of one or more other span type queries.
-
-
Matches spans containing a term.
External documentation -
Returns matches which are enclosed inside another span query.
External documentation Hide span_within attributes Show span_within attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Can be any span query. Matching spans from
littlethat are enclosed withinbigare returned. -
Can be any span query. Matching spans from
littlethat are enclosed withinbigare returned.
-
-
Using input query vectors or a natural language processing model to convert a query into a list of token-weight pairs, queries against a sparse vector field.
External documentation Hide sparse_vector attributes Show sparse_vector attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
The query text you want to use for search. If inference_id is specified, query must also be specified.
-
Whether to perform pruning, omitting the non-significant tokens from the query to improve query performance. If prune is true but the pruning_config is not specified, pruning will occur but default values will be used. Default: false
-
Dictionary of precomputed sparse vectors and their associated weights. Only one of inference_id or query_vector may be supplied in a request.
-
-
Returns documents that contain an exact term in a provided field. To return a document, the query term must exactly match the queried field's value, including whitespace and capitalization.
External documentation -
Returns documents that contain one or more exact terms in a provided field. To return a document, one or more terms must exactly match a field value, including whitespace and capitalization.
External documentation Hide terms attributes Show terms attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0.
-
-
Returns documents that contain a minimum number of exact terms in a provided field. To return a document, a required number of terms must exactly match the field values, including whitespace and capitalization.
External documentation -
Uses a natural language processing model to convert the query text into a list of token-weight pairs which are then used in a query against a sparse vector or rank features field.
External documentation -
Supports returning text_expansion query results by sending in precomputed tokens with the query.
External documentation -
Returns documents that contain terms matching a wildcard pattern.
External documentation -
A query that accepts any other query as base64 encoded string.
External documentation Hide wrapper attributes Show wrapper attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
A base64 encoded query. The binary data format can be any of JSON, YAML, CBOR or SMILE encodings
-
-
Hide type attributes Show type attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0.
-
-
-
Defines the search definition using the Query DSL.
External documentation Hide query attributes Show query attributes object
-
matches documents matching boolean combinations of other queries.
External documentation Hide bool attributes Show bool attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0.
-
-
Returns documents matching a
positivequery while reducing the relevance score of documents that also match anegativequery.External documentation Hide boosting attributes Show boosting attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Floating point number between 0 and 1.0 used to decrease the relevance scores of documents matching the
negativequery. -
Query used to decrease the relevance score of matching documents.
-
Any returned documents must match this query.
-
-
The
combined_fieldsquery supports searching multiple text fields as if their contents had been indexed into one combined field.External documentation Hide combined_fields attributes Show combined_fields attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
List of fields to search. Field wildcard patterns are allowed. Only
textfields are supported, and they must all have the same searchanalyzer. -
Text to search for in the provided
fields. Thecombined_fieldsquery analyzes the provided text before performing a search. -
If true, match phrase queries are automatically created for multi-term synonyms.
Default value is
true. -
Boolean logic used to interpret text in the query value.
Values are
ororand. -
Indicates whether no documents are returned if the analyzer removes all tokens, such as when using a
stopfilter.Values are
noneorall.
-
-
Wraps a filter query and returns every matching document with a relevance score equal to the
boostparameter value.External documentation Hide constant_score attributes Show constant_score attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Filter query you wish to run. Any returned documents must match this query. Filter queries do not calculate relevance scores. To speed up performance, Elasticsearch automatically caches frequently used filter queries.
-
-
Returns documents matching one or more wrapped queries, called query clauses or clauses. If a returned document matches multiple query clauses, the
dis_maxquery assigns the document the highest relevance score from any matching clause, plus a tie breaking increment for any additional matching subqueries.External documentation Hide dis_max attributes Show dis_max attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
One or more query clauses. Returned documents must match one or more of these queries. If a document matches multiple queries, Elasticsearch uses the highest relevance score.
An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
-
Floating point number between 0 and 1.0 used to increase the relevance scores of documents matching multiple query clauses.
Default value is
0.0.
-
distance_feature
object Required Boosts the relevance score of documents closer to a provided origin date or point. For example, you can use this query to give more weight to documents closer to a certain date or location.
External documentation -
Returns documents that contain an indexed value for a field.
External documentation Hide exists attributes Show exists attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Name of the field you wish to search.
-
-
The
function_scoreenables you to modify the score of documents that are retrieved by a query.External documentation Hide function_score attributes Show function_score attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Defines how he newly computed score is combined with the score of the query
Values are
multiply,replace,sum,avg,max, ormin. -
One or more functions that compute a new score for each document returned by the query.
-
Restricts the new score to not exceed the provided limit.
-
Excludes documents that do not meet the provided score threshold.
-
A query that determines the documents for which a new score is computed.
-
Specifies how the computed scores are combined
Values are
multiply,sum,avg,first,max, ormin.
-
-
Returns documents that contain terms similar to the search term, as measured by a Levenshtein edit distance.
External documentation -
Matches geo_point and geo_shape values that intersect a bounding box.
External documentation Hide geo_bounding_box attributes Show geo_bounding_box attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Values are
memoryorindexed. -
Set to
IGNORE_MALFORMEDto accept geo points with invalid latitude or longitude. Set toCOERCEto also try to infer correct latitude or longitude.Values are
coerce,ignore_malformed, orstrict. -
Set to
trueto ignore an unmapped field and not match any documents for this query. Set tofalseto throw an exception if the field is not mapped.Default value is
false.
-
-
Matches
geo_pointandgeo_shapevalues within a given distance of a geopoint.External documentation Hide geo_distance attributes Show geo_distance attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
The radius of the circle centred on the specified location. Points which fall into this circle are considered to be matches.
-
How to compute the distance. Set to
planefor a faster calculation that's inaccurate on long distances and close to the poles.Values are
arcorplane. -
Set to
IGNORE_MALFORMEDto accept geo points with invalid latitude or longitude. Set toCOERCEto also try to infer correct latitude or longitude.Values are
coerce,ignore_malformed, orstrict. -
Set to
trueto ignore an unmapped field and not match any documents for this query. Set tofalseto throw an exception if the field is not mapped.Default value is
false.
-
-
Matches
geo_pointandgeo_shapevalues that intersect a grid cell from a GeoGrid aggregation. -
Hide geo_polygon attributes Show geo_polygon attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Values are
coerce,ignore_malformed, orstrict.
-
-
Filter documents indexed using either the
geo_shapeor thegeo_pointtype.External documentation Hide geo_shape attributes Show geo_shape attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Set to
trueto ignore an unmapped field and not match any documents for this query. Set tofalseto throw an exception if the field is not mapped.Default value is
false.
-
-
Returns parent documents whose joined child documents match a provided query.
External documentation Hide has_child attributes Show has_child attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Indicates whether to ignore an unmapped
typeand not return any documents instead of an error.Default value is
false. -
If defined, each search hit will contain inner hits.
-
Maximum number of child documents that match the query allowed for a returned parent document. If the parent document exceeds this limit, it is excluded from the search results.
-
Minimum number of child documents that match the query required to match the query for a returned parent document. If the parent document does not meet this limit, it is excluded from the search results.
-
Query you wish to run on child documents of the
typefield. If a child document matches the search, the query returns the parent document. -
Indicates how scores for matching child documents affect the root parent document’s relevance score.
Values are
none,avg,sum,max, ormin. -
Name of the child relationship mapped for the
joinfield.
-
-
Returns child documents whose joined parent document matches a provided query.
External documentation Hide has_parent attributes Show has_parent attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Indicates whether to ignore an unmapped
parent_typeand not return any documents instead of an error. You can use this parameter to query multiple indices that may not contain theparent_type.Default value is
false. -
If defined, each search hit will contain inner hits.
-
Name of the parent relationship mapped for the
joinfield. -
Query you wish to run on parent documents of the
parent_typefield. If a parent document matches the search, the query returns its child documents. -
Indicates whether the relevance score of a matching parent document is aggregated into its child documents.
Default value is
false.
-
-
Returns documents based on their IDs. This query uses document IDs stored in the
_idfield.External documentation Hide ids attributes Show ids attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0.
-
-
Returns documents based on the order and proximity of matching terms.
External documentation -
Finds the k nearest vectors to a query vector, as measured by a similarity metric. knn query finds nearest vectors through approximate search on indexed dense_vectors.
External documentation Hide knn attributes Show knn attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
The name of the vector field to search against
-
The query vector
-
The query vector builder. You must provide a query_vector_builder or query_vector, but not both.
-
The number of nearest neighbor candidates to consider per shard
-
The percentage of vectors to explore per shard while doing knn search with bbq_disk
-
The final number of nearest neighbors to return as top hits
-
The minimum similarity for a vector to be considered a match
-
Apply oversampling and rescoring to quantized vectors
-
-
Returns documents that match a provided text, number, date or boolean value. The provided text is analyzed before matching.
External documentation -
Matches all documents, giving them all a
_scoreof 1.0.External documentation Hide match_all attributes Show match_all attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0.
-
-
Analyzes its input and constructs a
boolquery from the terms. Each term except the last is used in atermquery. The last term is used in a prefix query.External documentation -
Matches no documents.
External documentation Hide match_none attributes Show match_none attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0.
-
-
Analyzes the text and creates a phrase query out of the analyzed text.
External documentation -
Returns documents that contain the words of a provided text, in the same order as provided. The last term of the provided text is treated as a prefix, matching any words that begin with that term.
External documentation -
Returns documents that are "like" a given set of documents.
External documentation Hide more_like_this attributes Show more_like_this attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
The analyzer that is used to analyze the free form text. Defaults to the analyzer associated with the first field in fields.
External documentation -
Each term in the formed query could be further boosted by their tf-idf score. This sets the boost factor to use when using this feature. Defaults to deactivated (0).
Default value is
0.0. -
Controls whether the query should fail (throw an exception) if any of the specified fields are not of the supported types (
textorkeyword).Default value is
true. -
A list of fields to fetch and analyze the text from. Defaults to the
index.query.default_fieldindex setting, which has a default value of*. -
Specifies whether the input documents should also be included in the search results returned.
Default value is
false. -
The maximum document frequency above which the terms are ignored from the input document.
-
The maximum number of query terms that can be selected.
Default value is
25.0. -
The maximum word length above which the terms are ignored. Defaults to unbounded (
0).Default value is
0.0. -
The minimum document frequency below which the terms are ignored from the input document.
Default value is
5.0. -
The minimum term frequency below which the terms are ignored from the input document.
Default value is
2.0. -
The minimum word length below which the terms are ignored.
Default value is
0.0. -
Values are
internal,external, orexternal_gte.
-
-
Enables you to search for a provided text, number, date or boolean value across multiple fields. The provided text is analyzed before matching.
External documentation Hide multi_match attributes Show multi_match attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Analyzer used to convert the text in the query value into tokens.
-
If
true, match phrase queries are automatically created for multi-term synonyms.Default value is
true. -
The fields to be queried. Defaults to the
index.query.default_fieldindex settings, which in turn defaults to*. -
Method used to rewrite the query.
-
If
true, edits for fuzzy matching include transpositions of two adjacent characters (for example,abtoba). Can be applied to the term subqueries constructed for all terms but the final term.Default value is
true. -
If
true, format-based errors, such as providing a text query value for a numeric field, are ignored.Default value is
false. -
Maximum number of terms to which the query will expand.
Default value is
50.0. -
Boolean logic used to interpret text in the query value.
Values are
and,AND,or, orOR. -
Number of beginning characters left unchanged for fuzzy matching.
Default value is
0.0. -
Text, number, boolean value or date you wish to find in the provided field.
-
Maximum number of positions allowed between matching tokens.
Default value is
0.0. -
Determines how scores for each per-term blended query and scores across groups are combined.
Default value is
0.0. -
How
themulti_match query is executed internally.Values are
best_fields,most_fields,cross_fields,phrase,phrase_prefix, orbool_prefix. -
Indicates whether no documents are returned if the
analyzerremoves all tokens, such as when using astopfilter.Values are
allornone.
-
-
Wraps another query to search nested fields. If an object matches the search, the nested query returns the root parent document.
External documentation Hide nested attributes Show nested attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Indicates whether to ignore an unmapped path and not return any documents instead of an error.
Default value is
false. -
If defined, each search hit will contain inner hits.
-
Path to the nested object you wish to search.
-
Query you wish to run on nested objects in the path.
-
How scores for matching child objects affect the root parent document’s relevance score.
Values are
none,avg,sum,max, ormin.
-
-
Returns child documents joined to a specific parent document.
External documentation Hide parent_id attributes Show parent_id attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
ID of the parent document.
-
Indicates whether to ignore an unmapped
typeand not return any documents instead of an error.Default value is
false. -
Name of the child relationship mapped for the
joinfield.
-
-
Matches queries stored in an index.
External documentation Hide percolate attributes Show percolate attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
The source of the document being percolated.
-
An array of sources of the documents being percolated.
-
Field that holds the indexed queries. The field must use the
percolatormapping type. -
The ID of a stored document to percolate.
-
The index of a stored document to percolate.
-
The suffix used for the
_percolator_document_slotfield when multiplepercolatequeries are specified. -
Preference used to fetch document to percolate.
-
Routing used to fetch document to percolate.
-
The expected version of a stored document to percolate.
-
-
Promotes selected documents to rank higher than those matching a given query.
External documentation Hide pinned attributes Show pinned attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Document IDs listed in the order they are to appear in results. Required if
docsis not specified. -
Documents listed in the order they are to appear in results. Required if
idsis not specified.
-
-
Returns documents that contain a specific prefix in a provided field.
External documentation -
Returns documents based on a provided query string, using a parser with a strict syntax.
External documentation Hide query_string attributes Show query_string attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
If
true, the wildcard characters*and?are allowed as the first character of the query string.Default value is
true. -
Analyzer used to convert text in the query string into tokens.
-
If
true, the query attempts to analyze wildcard terms in the query string.Default value is
false. -
If
true, match phrase queries are automatically created for multi-term synonyms.Default value is
true. -
Default field to search if no field is provided in the query string. Supports wildcards (
*). Defaults to theindex.query.default_fieldindex setting, which has a default value of*. -
Default boolean logic used to interpret text in the query string if no operators are specified.
Values are
and,AND,or, orOR. -
If
true, enable position increments in queries constructed from aquery_stringsearch.Default value is
true. -
Default value is
false. -
Array of fields to search. Supports wildcards (
*). -
Maximum number of terms to which the query expands for fuzzy matching.
Default value is
50.0. -
Number of beginning characters left unchanged for fuzzy matching.
Default value is
0.0. -
Method used to rewrite the query.
-
If
true, edits for fuzzy matching include transpositions of two adjacent characters (for example,abtoba).Default value is
true. -
If
true, format-based errors, such as providing a text value for a numeric field, are ignored.Default value is
false. -
Maximum number of automaton states required for the query.
Default value is
10000.0. -
Maximum number of positions allowed between matching tokens for phrases.
Default value is
0.0. -
Query string you wish to parse and use for search.
-
Analyzer used to convert quoted text in the query string into tokens. For quoted text, this parameter overrides the analyzer specified in the
analyzerparameter. -
Suffix appended to quoted text in the query string. You can use this suffix to use a different analysis method for exact matches.
-
Method used to rewrite the query.
-
How to combine the queries generated from the individual search terms in the resulting
dis_maxquery. -
Coordinated Universal Time (UTC) offset or IANA time zone used to convert date values in the query string to UTC.
-
Determines how the query matches and scores documents.
Values are
best_fields,most_fields,cross_fields,phrase,phrase_prefix, orbool_prefix.
-
-
Returns documents that contain terms within a provided range.
External documentation -
Boosts the relevance score of documents based on the numeric value of a
rank_featureorrank_featuresfield.External documentation Hide rank_feature attributes Show rank_feature attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
rank_featureorrank_featuresfield used to boost relevance scores.
-
-
Returns documents that contain terms matching a regular expression.
External documentation -
Hide rule attributes Show rule attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
-
-
Filters documents based on a provided script. The script query is typically used in a filter context.
External documentation Hide script attributes Show script attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Contains a script to run as a query. This script must return a boolean value,
trueorfalse.
-
-
Uses a script to provide a custom score for returned documents.
External documentation Hide script_score attributes Show script_score attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Documents with a score lower than this floating point number are excluded from the search results.
-
Query used to return documents.
-
Script used to compute the score of documents returned by the query. Important: final relevance scores from the
script_scorequery cannot be negative.
-
-
A semantic query to semantic_text field types
Hide semantic attributes Show semantic attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
The field to query, which must be a semantic_text field type
-
The query text
-
-
Queries documents that contain fields indexed using the
shapetype.External documentation Hide shape attributes Show shape attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
When set to
truethe query ignores an unmapped field and will not match any documents.
-
-
Returns documents based on a provided query string, using a parser with a limited but fault-tolerant syntax.
External documentation Hide simple_query_string attributes Show simple_query_string attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Analyzer used to convert text in the query string into tokens.
-
If
true, the query attempts to analyze wildcard terms in the query string.Default value is
false. -
If
true, the parser creates a match_phrase query for each multi-position token.Default value is
true. -
Default boolean logic used to interpret text in the query string if no operators are specified.
Values are
and,AND,or, orOR. -
Array of fields you wish to search. Accepts wildcard expressions. You also can boost relevance scores for matches to particular fields using a caret (
^) notation. Defaults to theindex.query.default_field indexsetting, which has a default value of*. -
Maximum number of terms to which the query expands for fuzzy matching.
Default value is
50.0. -
Number of beginning characters left unchanged for fuzzy matching.
Default value is
0.0. -
If
true, edits for fuzzy matching include transpositions of two adjacent characters (for example,abtoba). -
If
true, format-based errors, such as providing a text value for a numeric field, are ignored.Default value is
false. -
Query string in the simple query string syntax you wish to parse and use for search.
-
Suffix appended to quoted text in the query string.
-
-
Returns matches which enclose another span query.
External documentation Hide span_containing attributes Show span_containing attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Can be any span query. Matching spans from
bigthat contain matches fromlittleare returned. -
Can be any span query. Matching spans from
bigthat contain matches fromlittleare returned.
-
-
Wrapper to allow span queries to participate in composite single-field span queries by lying about their search field.
External documentation Hide span_field_masking attributes Show span_field_masking attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
-
Matches spans near the beginning of a field.
External documentation Hide span_first attributes Show span_first attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Controls the maximum end position permitted in a match.
-
Can be any other span type query.
-
-
Allows you to wrap a multi term query (one of
wildcard,fuzzy,prefix,range, orregexpquery) as aspanquery, so it can be nested.External documentation Hide span_multi attributes Show span_multi attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Should be a multi term query (one of
wildcard,fuzzy,prefix,range, orregexpquery).
-
-
Matches spans which are near one another. You can specify
slop, the maximum number of intervening unmatched positions, as well as whether matches are required to be in-order.External documentation Hide span_near attributes Show span_near attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Array of one or more other span type queries.
-
Controls whether matches are required to be in-order.
-
Controls the maximum number of intervening unmatched positions permitted.
-
-
Removes matches which overlap with another span query or which are within x tokens before (controlled by the parameter
pre) or y tokens after (controlled by the parameterpost) another span query.External documentation Hide span_not attributes Show span_not attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
The number of tokens from within the include span that can’t have overlap with the exclude span. Equivalent to setting both
preandpost. -
Span query whose matches must not overlap those returned.
-
Span query whose matches are filtered.
-
The number of tokens after the include span that can’t have overlap with the exclude span.
Default value is
0.0. -
The number of tokens before the include span that can’t have overlap with the exclude span.
Default value is
0.0.
-
-
Matches the union of its span clauses.
External documentation Hide span_or attributes Show span_or attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Array of one or more other span type queries.
-
-
Matches spans containing a term.
External documentation -
Returns matches which are enclosed inside another span query.
External documentation Hide span_within attributes Show span_within attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
Can be any span query. Matching spans from
littlethat are enclosed withinbigare returned. -
Can be any span query. Matching spans from
littlethat are enclosed withinbigare returned.
-
-
Using input query vectors or a natural language processing model to convert a query into a list of token-weight pairs, queries against a sparse vector field.
External documentation Hide sparse_vector attributes Show sparse_vector attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
The query text you want to use for search. If inference_id is specified, query must also be specified.
-
Whether to perform pruning, omitting the non-significant tokens from the query to improve query performance. If prune is true but the pruning_config is not specified, pruning will occur but default values will be used. Default: false
-
Dictionary of precomputed sparse vectors and their associated weights. Only one of inference_id or query_vector may be supplied in a request.
-
-
Returns documents that contain an exact term in a provided field. To return a document, the query term must exactly match the queried field's value, including whitespace and capitalization.
External documentation -
Returns documents that contain one or more exact terms in a provided field. To return a document, one or more terms must exactly match a field value, including whitespace and capitalization.
External documentation Hide terms attributes Show terms attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0.
-
-
Returns documents that contain a minimum number of exact terms in a provided field. To return a document, a required number of terms must exactly match the field values, including whitespace and capitalization.
External documentation -
Uses a natural language processing model to convert the query text into a list of token-weight pairs which are then used in a query against a sparse vector or rank features field.
External documentation -
Supports returning text_expansion query results by sending in precomputed tokens with the query.
External documentation -
Returns documents that contain terms matching a wildcard pattern.
External documentation -
A query that accepts any other query as base64 encoded string.
External documentation Hide wrapper attributes Show wrapper attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0. -
A base64 encoded query. The binary data format can be any of JSON, YAML, CBOR or SMILE encodings
-
-
Hide type attributes Show type attributes object
-
Floating point number used to decrease or increase the relevance scores of the query. Boost values are relative to the default value of 1.0. A boost value between 0 and 1.0 decreases the relevance score. A value greater than 1.0 increases the relevance score.
Default value is
1.0.
-
-
rescore
object | array[object] One of: Hide attributes Show attributes
-
Hide query attributes Show query attributes object
-
The query to use for rescoring. This query is only run on the Top-K results returned by the
queryandpost_filterphases. -
Relative importance of the original query versus the rescore query.
Default value is
1.0. -
Relative importance of the rescore query versus the original query.
Default value is
1.0. -
Determines how scores are combined.
Values are
avg,max,min,multiply, ortotal.
-
-
Hide learning_to_rank attributes Show learning_to_rank attributes object
Hide attributes Show attributes object
-
Retrieve a script evaluation (based on different fields) for each hit.
Hide script_fields attribute Show script_fields attribute object
-
Hide * attributes Show * attributes object
-
Hide script attributes Show script attributes object
-
-
-
A field value.
-
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.
Default value is
10.0. _source
boolean | object Indicates which source fields are returned for matching documents. These fields are returned in the hits._source property of the search response.
One of: Hide attributes Show attributes
-
If
true, vector fields are excluded from the returned source.This option takes precedence over
includes: any vector field will remain excluded even if it matches anincludesrule. -
A list of fields to exclude from the returned source.
-
A list of fields to include in the returned source.
-
-
Array of wildcard (*) patterns. The request returns values for field names matching these patterns in the hits.fields property of the response.
Hide fields attributes Show fields attributes object
-
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.
Default value is
0.0. -
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.
-
If true, calculate and return document scores, even if the scores are not used for sorting.
Default value is
false. -
If true, returns document version as part of a hit.
Default value is
false. -
If true, returns sequence number and primary term of the last modification of each hit. See Optimistic concurrency control.
-
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.
-
Limits the search to a point in time (PIT). If you provide a PIT, you cannot specify an in the request path.
Hide pit attributes Show pit attributes object
-
A duration. Units can be
nanos,micros,ms(milliseconds),s(seconds),m(minutes),h(hours) andd(days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.External documentation
-
Defines one or more runtime fields in the search request. These fields take precedence over mapped fields with the same name.
Hide runtime_mappings attribute Show runtime_mappings attribute object
-
Hide * attributes Show * attributes object
-
For type
composite -
For type
lookup -
A custom format for
datetype runtime fields. -
For type
lookup -
For type
lookup -
For type
lookup -
Painless script executed at query time.
Hide script attributes Show script attributes object
-
The
idfor a stored script. -
Specifies any named parameters that are passed into the script as variables. Use parameters instead of hard-coded values to decrease compile time.
-
Field type, which can be:
boolean,composite,date,double,geo_point,ip,keyword,long, orlookup.Values are
boolean,composite,date,double,geo_point,geo_shape,ip,keyword,long, orlookup.
-
-
-
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.
Responses
-
Hide response attributes Show response attributes object
-
When the query is no longer running, this property indicates whether the search failed or was successfully completed on all shards. While the query is running,
is_partialis always set totrue. -
Indicates whether the search is still running or has completed.
If the search failed after some shards returned their results or the node that is coordinating the async search dies, results may be partial even though
is_runningisfalse. -
Time unit for milliseconds
-
Time unit for milliseconds
-
Time unit for milliseconds
-
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Hide error attributes Show error attributes object
-
The type of error
-
The server stack trace. Present only if the
error_trace=trueparameter was sent with the request. -
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
-
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
-
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
-
-
Hide response attributes Show response attributes object
-
Partial aggregations results, coming from the shards that have already completed running the query.
-
Indicates how many reductions of the results have been performed. If this number increases compared to the last retrieved results for a get asynch search request, you can expect additional results included in the search response.
-
Indicates how many shards have run the query. Note that in order for shard results to be included in the search response, they need to be reduced first.
-
curl \
--request POST 'http://api.example.com/_async_search' \
--header "Content-Type: application/json" \
--data '"{\n \"sort\": [\n { \"date\": { \"order\": \"asc\" } }\n ],\n \"aggs\": {\n \"sale_date\": {\n \"date_histogram\": {\n \"field\": \"date\",\n \"calendar_interval\": \"1d\"\n }\n }\n }\n}"'
{
"sort": [
{ "date": { "order": "asc" } }
],
"aggs": {
"sale_date": {
"date_histogram": {
"field": "date",
"calendar_interval": "1d"
}
}
}
}
{
"id" : "FmRldE8zREVEUzA2ZVpUeGs2ejJFUFEaMkZ5QTVrSTZSaVN3WlNFVmtlWHJsdzoxMDc=",
"is_partial" : true,
"is_running" : true,
"start_time_in_millis" : 1583945890986,
"expiration_time_in_millis" : 1584377890986,
"response" : {
"took" : 1122,
"timed_out" : false,
"num_reduce_phases" : 0,
"_shards" : {
"total" : 562,
"successful" : 3,
"skipped" : 0,
"failed" : 0
},
"hits" : {
"total" : {
"value" : 157483,
"relation" : "gte"
},
"max_score" : null,
"hits" : [ ]
}
}
}