Runs a search request asynchronously
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, hence partial results become available following the sort criteria that was requested.
Warning: Async search does not support scroll nor search requests that only include the suggest section.
By default, Elasticsearch doesn’t 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.
Path parameters
-
A comma-separated list of index names to search; use
_all
or empty string to perform the operation on all indices
Query parameters
-
wait_for_completion_timeout string
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.
-
keep_on_completion boolean
If
true
, results are stored for later retrieval when the search completes within thewait_for_completion_timeout
. -
keep_alive string
Specifies how long the async search needs to be available. Ongoing async searches and any saved search results are deleted after this period.
-
allow_no_indices boolean
Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes
_all
string or when no indices have been specified) -
allow_partial_search_results boolean
Indicate if an error should be returned if there is a partial search failure or timeout
-
analyzer string
The analyzer to use for the query string
-
analyze_wildcard boolean
Specify whether wildcard and prefix queries should be analyzed (default: false)
-
batched_reduce_size number
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).
-
ccs_minimize_roundtrips boolean
The default value is the only supported value.
-
default_operator string
The default operator for query string query (AND or OR)
Values are
and
,AND
,or
, orOR
. -
df string
The field to use as default where no field prefix is given in the query string
-
docvalue_fields string | array[string]
A comma-separated list of fields to return as the docvalue representation of a field for each hit
-
expand_wildcards string | array[string]
Whether to expand wildcard expression to concrete indices that are open, closed or both.
-
explain boolean
Specify whether to return detailed information about score computation as part of a hit
-
ignore_throttled boolean
Whether specified concrete, expanded or aliased indices should be ignored when throttled
-
ignore_unavailable boolean
Whether specified concrete indices should be ignored when unavailable (missing or closed)
-
lenient boolean
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
-
min_compatible_shard_node string
-
preference string
Specify the node or shard the operation should be performed on (default: random)
-
pre_filter_shard_size number
The default value cannot be changed, which enforces the execution of a pre-filter roundtrip to retrieve statistics from each shard so that the ones that surely don’t hold any document matching the query get skipped.
-
request_cache boolean
Specify if request cache should be used for this request or not, defaults to true
-
routing string
A comma-separated list of specific routing values
-
scroll string
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. -
search_type string
Search operation type
Values are
query_then_fetch
ordfs_query_then_fetch
. -
stats array[string]
Specific 'tag' of the request for logging and statistical purposes
-
stored_fields string | array[string]
A comma-separated list of stored fields to return as part of a hit
-
suggest_field string
Specifies which field to use for suggestions.
-
suggest_mode string
Specify suggest mode
Values are
missing
,popular
, oralways
. -
suggest_size number
How many suggestions to return in response
-
suggest_text string
The source text for which the suggestions should be returned.
-
terminate_after number
The maximum number of documents to collect for each shard, upon reaching which the query execution will terminate early.
-
timeout string
Explicit operation timeout
-
track_total_hits boolean | number
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.
-
track_scores boolean
Whether to calculate and return scores even if they are not used for sorting
-
typed_keys boolean
Specify whether aggregation and suggester names should be prefixed by their respective types in the response
-
rest_total_hits_as_int boolean
-
version boolean
Specify whether to return document version as part of a hit
-
_source boolean | string | array[string]
True or false to return the _source field or not, or a list of fields to return
-
_source_excludes string | array[string]
A list of fields to exclude from the returned _source field
-
_source_includes string | array[string]
A list of fields to extract and return from the _source field
-
seq_no_primary_term boolean
Specify whether to return sequence number and primary term of the last modification of each hit
-
q string
Query in the Lucene query string syntax
-
size number
Number of hits to return (default: 10)
-
from number
Starting offset (default: 0)
-
sort string | array[string]
A comma-separated list of
: pairs
Body
-
aggregations object
-
collapse object
Hide collapse attributes Show collapse attributes object
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
inner_hits object | array[object]
The number of inner hits and their sort order
One of: Hide attributes Show attributes
-
name string
-
size number
The maximum number of hits to return per
inner_hits
. -
from number
Inner hit starting document offset.
-
collapse object
-
docvalue_fields array[object]
Hide docvalue_fields attributes Show docvalue_fields attributes object
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
format string
Format in which the values are returned.
-
include_unmapped boolean
-
-
explain boolean
-
highlight object
Hide highlight attributes Show highlight attributes object
-
boundary_chars string
A string that contains each boundary character.
-
boundary_max_scan number
How far to scan for boundary characters.
-
boundary_scanner string
Values are
chars
,sentence
, orword
. -
boundary_scanner_locale string
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"
. -
fragmenter string
Values are
simple
orspan
. -
fragment_size number
The size of the highlighted fragment in characters.
-
highlight_filter boolean
-
highlight_query object
Hide highlight_query attributes Show highlight_query attributes object
-
fuzzy object
Returns documents that contain terms similar to the search term, as measured by a Levenshtein edit distance.
-
intervals object
Returns documents based on the order and proximity of matching terms.
-
match object
Returns documents that match a provided text, number, date or boolean value. The provided text is analyzed before matching.
-
match_bool_prefix object
Analyzes its input and constructs a
bool
query from the terms. Each term except the last is used in aterm
query. The last term is used in a prefix query. -
match_phrase object
Analyzes the text and creates a phrase query out of the analyzed text.
-
match_phrase_prefix object
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.
-
prefix object
Returns documents that contain a specific prefix in a provided field.
-
range object
Returns documents that contain terms within a provided range.
-
regexp object
Returns documents that contain terms matching a regular expression.
-
span_term object
Matches spans containing a term.
-
term object
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.
-
terms_set object
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.
-
wildcard object
Returns documents that contain terms matching a wildcard pattern.
-
max_fragment_length number
-
max_analyzed_offset number
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_offset
query setting does not override theindex.highlight.max_analyzed_offset
setting, which prevails when it’s set to lower value than the query setting. -
no_match_size number
The amount of text you want to return from the beginning of the field if there are no matching fragments to highlight.
-
number_of_fragments number
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_fragments
is0
,fragment_size
is ignored. -
options object
Hide options attributes Show options attributes object
-
key object
-
order string
Value is
score
. -
phrase_limit number
Controls the number of matching phrases in a document that are considered. Prevents the
fvh
highlighter from analyzing too many phrases and consuming too much memory. When usingmatched_fields
,phrase_limit
phrases per matched field are considered. Raising the limit increases query time and consumes more memory. Only supported by thefvh
highlighter. -
post_tags array[string]
Use in conjunction with
pre_tags
to define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>
and</em>
tags. -
pre_tags array[string]
Use in conjunction with
post_tags
to define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>
and</em>
tags. -
require_field_match boolean
By default, only fields that contains a query match are highlighted. Set to
false
to highlight all fields. -
tags_schema string
Value is
styled
. -
encoder string
Values are
default
orhtml
.
-
ignore_unmapped boolean
-
script_fields object
Hide script_fields attributes Show script_fields attributes object
-
ignore_failure boolean
-
seq_no_primary_term boolean
-
fields string | array[string]
sort string | object | array[string | object]
One of: Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
Hide attributes Show attributes
-
_score object
-
_doc object
-
_geo_distance object
-
_script object
One of: Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
-
stored_fields string | array[string]
-
track_scores boolean
-
version boolean
Hide attributes Show attributes object
-
name string
-
size number
The maximum number of hits to return per
inner_hits
. -
from number
Inner hit starting document offset.
-
collapse object
-
docvalue_fields array[object]
Hide docvalue_fields attributes Show docvalue_fields attributes object
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
format string
Format in which the values are returned.
-
include_unmapped boolean
-
-
explain boolean
-
highlight object
Hide highlight attributes Show highlight attributes object
-
boundary_chars string
A string that contains each boundary character.
-
boundary_max_scan number
How far to scan for boundary characters.
-
boundary_scanner string
Values are
chars
,sentence
, orword
. -
boundary_scanner_locale string
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"
. -
fragmenter string
Values are
simple
orspan
. -
fragment_size number
The size of the highlighted fragment in characters.
-
highlight_filter boolean
-
highlight_query object
-
max_fragment_length number
-
max_analyzed_offset number
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_offset
query setting does not override theindex.highlight.max_analyzed_offset
setting, which prevails when it’s set to lower value than the query setting. -
no_match_size number
The amount of text you want to return from the beginning of the field if there are no matching fragments to highlight.
-
number_of_fragments number
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_fragments
is0
,fragment_size
is ignored. -
options object
-
order string
Value is
score
. -
phrase_limit number
Controls the number of matching phrases in a document that are considered. Prevents the
fvh
highlighter from analyzing too many phrases and consuming too much memory. When usingmatched_fields
,phrase_limit
phrases per matched field are considered. Raising the limit increases query time and consumes more memory. Only supported by thefvh
highlighter. -
post_tags array[string]
Use in conjunction with
pre_tags
to define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>
and</em>
tags. -
pre_tags array[string]
Use in conjunction with
post_tags
to define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>
and</em>
tags. -
require_field_match boolean
By default, only fields that contains a query match are highlighted. Set to
false
to highlight all fields. -
tags_schema string
Value is
styled
. -
encoder string
Values are
default
orhtml
.
-
ignore_unmapped boolean
-
script_fields object
Hide script_fields attributes Show script_fields attributes object
-
ignore_failure boolean
-
seq_no_primary_term boolean
-
fields string | array[string]
-
stored_fields string | array[string]
-
track_scores boolean
-
version boolean
-
-
The number of concurrent requests allowed to retrieve the inner_hits per group
-
collapse object
-
-
explain boolean
If true, returns detailed information about score computation as part of a hit.
-
ext object
Configuration of search extensions defined by Elasticsearch plugins.
Hide ext attributes Show ext attributes object
-
key object
-
from number
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.
-
highlight object
Hide highlight attributes Show highlight attributes object
-
boundary_chars string
A string that contains each boundary character.
-
boundary_max_scan number
How far to scan for boundary characters.
-
boundary_scanner string
Values are
chars
,sentence
, orword
. -
boundary_scanner_locale string
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"
. -
fragmenter string
Values are
simple
orspan
. -
fragment_size number
The size of the highlighted fragment in characters.
-
highlight_filter boolean
-
highlight_query object
Hide highlight_query attributes Show highlight_query attributes object
-
bool object
Hide bool attributes Show bool attributes object
-
boost number
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.
-
_name string
filter object | array[object]
The clause (query) must appear in matching documents. However, unlike
must
, the score of the query will be ignored.minimum_should_match number | string
The minimum number of terms that should match as integer, percentage or range
must object | array[object]
The clause (query) must appear in matching documents and will contribute to the score.
must_not object | array[object]
The clause (query) must not appear in the matching documents. Because scoring is ignored, a score of
0
is returned for all documents.should object | array[object]
The clause (query) should appear in the matching document.
-
-
boosting object
Hide boosting attributes Show boosting attributes object
-
boost number
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.
-
_name string
-
Floating point number between 0 and 1.0 used to decrease the relevance scores of documents matching the
negative
query.
-
-
combined_fields object
Hide combined_fields attributes Show combined_fields attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
Text to search for in the provided
fields
. Thecombined_fields
query analyzes the provided text before performing a search. -
If true, match phrase queries are automatically created for multi-term synonyms.
-
operator string
Values are
or
orand
. minimum_should_match number | string
The minimum number of terms that should match as integer, percentage or range
-
zero_terms_query string
Values are
none
orall
.
-
-
constant_score object
Hide constant_score attributes Show constant_score attributes object
-
dis_max object
Hide dis_max attributes Show dis_max attributes object
-
boost number
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.
-
_name string
-
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.
-
tie_breaker number
Floating point number between 0 and 1.0 used to increase the relevance scores of documents matching multiple query clauses.
-
-
exists object
Hide exists attributes Show exists attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
-
function_score object
Hide function_score attributes Show function_score attributes object
-
boost number
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.
-
_name string
-
boost_mode string
Values are
multiply
,replace
,sum
,avg
,max
, ormin
. -
functions array[object]
One or more functions that compute a new score for each document returned by the query.
-
max_boost number
Restricts the new score to not exceed the provided limit.
-
min_score number
Excludes documents that do not meet the provided score threshold.
-
query object
-
score_mode string
Values are
multiply
,sum
,avg
,first
,max
, ormin
.
-
-
fuzzy object
Returns documents that contain terms similar to the search term, as measured by a Levenshtein edit distance.
-
geo_bounding_box object
Hide geo_bounding_box attributes Show geo_bounding_box attributes object
-
boost number
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.
-
_name string
-
type string
Values are
memory
orindexed
. -
validation_method string
Values are
coerce
,ignore_malformed
, orstrict
. -
ignore_unmapped boolean
Set to
true
to ignore an unmapped field and not match any documents for this query. Set tofalse
to throw an exception if the field is not mapped.
-
-
geo_distance object
Hide geo_distance attributes Show geo_distance attributes object
-
boost number
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.
-
_name string
-
distance_type string
Values are
arc
orplane
. -
validation_method string
Values are
coerce
,ignore_malformed
, orstrict
. -
ignore_unmapped boolean
Set to
true
to ignore an unmapped field and not match any documents for this query. Set tofalse
to throw an exception if the field is not mapped.
-
-
geo_polygon object
Hide geo_polygon attributes Show geo_polygon attributes object
-
boost number
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.
-
_name string
-
validation_method string
Values are
coerce
,ignore_malformed
, orstrict
. -
ignore_unmapped boolean
-
-
geo_shape object
Hide geo_shape attributes Show geo_shape attributes object
-
boost number
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.
-
_name string
-
ignore_unmapped boolean
Set to
true
to ignore an unmapped field and not match any documents for this query. Set tofalse
to throw an exception if the field is not mapped.
-
-
has_child object
Hide has_child attributes Show has_child attributes object
-
boost number
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.
-
_name string
-
ignore_unmapped boolean
Indicates whether to ignore an unmapped
type
and not return any documents instead of an error. -
inner_hits object
Hide inner_hits attributes Show inner_hits attributes object
-
name string
-
size number
The maximum number of hits to return per
inner_hits
. -
from number
Inner hit starting document offset.
-
collapse object
-
docvalue_fields array[object]
-
explain boolean
-
ignore_unmapped boolean
-
seq_no_primary_term boolean
-
fields string | array[string]
-
stored_fields string | array[string]
-
track_scores boolean
-
version boolean
-
-
max_children number
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.
-
min_children number
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.
-
score_mode string
Values are
none
,avg
,sum
,max
, ormin
.
-
-
has_parent object
Hide has_parent attributes Show has_parent attributes object
-
boost number
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.
-
_name string
-
ignore_unmapped boolean
Indicates whether to ignore an unmapped
parent_type
and not return any documents instead of an error. You can use this parameter to query multiple indices that may not contain theparent_type
. -
inner_hits object
Hide inner_hits attributes Show inner_hits attributes object
-
name string
-
size number
The maximum number of hits to return per
inner_hits
. -
from number
Inner hit starting document offset.
-
collapse object
-
docvalue_fields array[object]
-
explain boolean
-
ignore_unmapped boolean
-
seq_no_primary_term boolean
-
fields string | array[string]
-
stored_fields string | array[string]
-
track_scores boolean
-
version boolean
-
-
score boolean
Indicates whether the relevance score of a matching parent document is aggregated into its child documents.
-
-
ids object
Hide ids attributes Show ids attributes object
-
boost number
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.
-
_name string
values string | array[string]
-
-
intervals object
Returns documents based on the order and proximity of matching terms.
-
knn object
Hide knn attributes Show knn attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
query_vector array[number]
-
query_vector_builder object
Hide query_vector_builder attribute Show query_vector_builder attribute object
-
text_embedding object
-
-
num_candidates number
The number of nearest neighbor candidates to consider per shard
-
k number
The final number of nearest neighbors to return as top hits
filter object | array[object]
Filters for the kNN search query
-
similarity number
The minimum similarity for a vector to be considered a match
-
-
match object
Returns documents that match a provided text, number, date or boolean value. The provided text is analyzed before matching.
-
match_all object
Hide match_all attributes Show match_all attributes object
-
match_bool_prefix object
Analyzes its input and constructs a
bool
query from the terms. Each term except the last is used in aterm
query. The last term is used in a prefix query. -
match_none object
Hide match_none attributes Show match_none attributes object
-
match_phrase object
Analyzes the text and creates a phrase query out of the analyzed text.
-
match_phrase_prefix object
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.
-
more_like_this object
Hide more_like_this attributes Show more_like_this attributes object
-
boost number
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.
-
_name string
-
analyzer string
The analyzer that is used to analyze the free form text. Defaults to the analyzer associated with the first field in fields.
-
boost_terms number
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).
-
fail_on_unsupported_field boolean
Controls whether the query should fail (throw an exception) if any of the specified fields are not of the supported types (
text
orkeyword
). -
fields array[string]
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
include boolean
Specifies whether the input documents should also be included in the search results returned.
-
max_doc_freq number
The maximum document frequency above which the terms are ignored from the input document.
-
max_query_terms number
The maximum number of query terms that can be selected.
-
max_word_length number
The maximum word length above which the terms are ignored. Defaults to unbounded (
0
). -
min_doc_freq number
The minimum document frequency below which the terms are ignored from the input document.
minimum_should_match number | string
The minimum number of terms that should match as integer, percentage or range
-
min_term_freq number
The minimum term frequency below which the terms are ignored from the input document.
-
min_word_length number
The minimum word length below which the terms are ignored.
-
routing string
stop_words string | array[string]
Language value, such as arabic or thai. Defaults to english. Each language value corresponds to a predefined list of stop words in Lucene. See Stop words by language for supported language values and their stop words. Also accepts an array of stop words.
-
unlike array[string | object]
-
version number
-
version_type string
Values are
internal
,external
,external_gte
, orforce
.
-
-
multi_match object
Hide multi_match attributes Show multi_match attributes object
-
boost number
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.
-
_name string
-
analyzer string
Analyzer used to convert the text in the query value into tokens.
-
If
true
, match phrase queries are automatically created for multi-term synonyms. -
fields string | array[string]
fuzziness string | number
-
fuzzy_rewrite string
-
fuzzy_transpositions boolean
If
true
, edits for fuzzy matching include transpositions of two adjacent characters (for example,ab
toba
). Can be applied to the term subqueries constructed for all terms but the final term. -
lenient boolean
If
true
, format-based errors, such as providing a text query value for a numeric field, are ignored. -
max_expansions number
Maximum number of terms to which the query will expand.
minimum_should_match number | string
The minimum number of terms that should match as integer, percentage or range
-
operator string
Values are
and
,AND
,or
, orOR
. -
prefix_length number
Number of beginning characters left unchanged for fuzzy matching.
-
Text, number, boolean value or date you wish to find in the provided field.
-
slop number
Maximum number of positions allowed between matching tokens.
-
tie_breaker number
Determines how scores for each per-term blended query and scores across groups are combined.
-
type string
Values are
best_fields
,most_fields
,cross_fields
,phrase
,phrase_prefix
, orbool_prefix
. -
zero_terms_query string
Values are
all
ornone
.
-
-
nested object
Hide nested attributes Show nested attributes object
-
boost number
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.
-
_name string
-
ignore_unmapped boolean
Indicates whether to ignore an unmapped path and not return any documents instead of an error.
-
inner_hits object
Hide inner_hits attributes Show inner_hits attributes object
-
name string
-
size number
The maximum number of hits to return per
inner_hits
. -
from number
Inner hit starting document offset.
-
collapse object
-
docvalue_fields array[object]
-
explain boolean
-
ignore_unmapped boolean
-
seq_no_primary_term boolean
-
fields string | array[string]
-
stored_fields string | array[string]
-
track_scores boolean
-
version boolean
-
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
score_mode string
Values are
none
,avg
,sum
,max
, ormin
.
-
-
parent_id object
Hide parent_id attributes Show parent_id attributes object
-
boost number
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.
-
_name string
-
id string
-
ignore_unmapped boolean
Indicates whether to ignore an unmapped
type
and not return any documents instead of an error. -
type string
-
-
percolate object
Hide percolate attributes Show percolate attributes object
-
boost number
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.
-
_name string
-
document object
The source of the document being percolated.
-
documents array[object]
An array of sources of the documents being percolated.
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
id string
-
index string
-
name string
The suffix used for the
_percolator_document_slot
field when multiplepercolate
queries are specified. -
preference string
Preference used to fetch document to percolate.
-
routing string
-
version number
-
-
pinned object
Hide pinned attributes Show pinned attributes object
-
boost number
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.
-
_name string
-
ids array[string]
Document IDs listed in the order they are to appear in results. Required if
docs
is not specified. -
docs array[object]
Documents listed in the order they are to appear in results. Required if
ids
is not specified.
-
-
prefix object
Returns documents that contain a specific prefix in a provided field.
-
query_string object
Hide query_string attributes Show query_string attributes object
-
boost number
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.
-
_name string
-
allow_leading_wildcard boolean
If
true
, the wildcard characters*
and?
are allowed as the first character of the query string. -
analyzer string
Analyzer used to convert text in the query string into tokens.
-
analyze_wildcard boolean
If
true
, the query attempts to analyze wildcard terms in the query string. -
If
true
, match phrase queries are automatically created for multi-term synonyms. -
default_field string
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
default_operator string
Values are
and
,AND
,or
, orOR
. -
enable_position_increments boolean
If
true
, enable position increments in queries constructed from aquery_string
search. -
escape boolean
-
fields array[string]
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
fuzziness string | number
-
fuzzy_max_expansions number
Maximum number of terms to which the query expands for fuzzy matching.
-
fuzzy_prefix_length number
Number of beginning characters left unchanged for fuzzy matching.
-
fuzzy_rewrite string
-
fuzzy_transpositions boolean
If
true
, edits for fuzzy matching include transpositions of two adjacent characters (for example,ab
toba
). -
lenient boolean
If
true
, format-based errors, such as providing a text value for a numeric field, are ignored. -
max_determinized_states number
Maximum number of automaton states required for the query.
minimum_should_match number | string
The minimum number of terms that should match as integer, percentage or range
-
phrase_slop number
Maximum number of positions allowed between matching tokens for phrases.
-
Query string you wish to parse and use for search.
-
quote_analyzer string
Analyzer used to convert quoted text in the query string into tokens. For quoted text, this parameter overrides the analyzer specified in the
analyzer
parameter. -
quote_field_suffix string
Suffix appended to quoted text in the query string. You can use this suffix to use a different analysis method for exact matches.
-
rewrite string
-
tie_breaker number
How to combine the queries generated from the individual search terms in the resulting
dis_max
query. -
time_zone string
-
type string
Values are
best_fields
,most_fields
,cross_fields
,phrase
,phrase_prefix
, orbool_prefix
.
-
-
range object
Returns documents that contain terms within a provided range.
-
rank_feature object
Hide rank_feature attributes Show rank_feature attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
saturation object
-
log object
-
linear object
-
sigmoid object
-
-
regexp object
Returns documents that contain terms matching a regular expression.
-
rule object
Hide rule attributes Show rule attributes object
-
script object
Hide script attributes Show script attributes object
-
script_score object
Hide script_score attributes Show script_score attributes object
-
boost number
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.
-
_name string
-
min_score number
Documents with a score lower than this floating point number are excluded from the search results.
-
-
semantic object
Hide semantic attributes Show semantic attributes object
-
boost number
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.
-
_name string
-
The field to query, which must be a semantic_text field type
-
The query text
-
-
shape object
Hide shape attributes Show shape attributes object
-
boost number
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.
-
_name string
-
ignore_unmapped boolean
When set to
true
the query ignores an unmapped field and will not match any documents.
-
-
simple_query_string object
Hide simple_query_string attributes Show simple_query_string attributes object
-
boost number
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.
-
_name string
-
analyzer string
Analyzer used to convert text in the query string into tokens.
-
analyze_wildcard boolean
If
true
, the query attempts to analyze wildcard terms in the query string. -
If
true
, the parser creates a match_phrase query for each multi-position token. -
default_operator string
Values are
and
,AND
,or
, orOR
. -
fields array[string]
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
fuzzy_max_expansions number
Maximum number of terms to which the query expands for fuzzy matching.
-
fuzzy_prefix_length number
Number of beginning characters left unchanged for fuzzy matching.
-
fuzzy_transpositions boolean
If
true
, edits for fuzzy matching include transpositions of two adjacent characters (for example,ab
toba
). -
lenient boolean
If
true
, format-based errors, such as providing a text value for a numeric field, are ignored. minimum_should_match number | string
The minimum number of terms that should match as integer, percentage or range
-
Query string in the simple query string syntax you wish to parse and use for search.
-
quote_field_suffix string
Suffix appended to quoted text in the query string.
-
-
span_containing object
Hide span_containing attributes Show span_containing attributes object
-
boost number
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.
-
_name string
-
Hide big attributes Show big attributes object
-
Hide little attributes Show little attributes object
-
-
span_field_masking object
Hide span_field_masking attributes Show span_field_masking attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
Hide query attributes Show query attributes object
-
-
span_first object
Hide span_first attributes Show span_first attributes object
-
boost number
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.
-
_name string
-
Controls the maximum end position permitted in a match.
-
Hide match attributes Show match attributes object
-
-
span_multi object
Hide span_multi attributes Show span_multi attributes object
-
span_near object
Hide span_near attributes Show span_near attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
in_order boolean
Controls whether matches are required to be in-order.
-
slop number
Controls the maximum number of intervening unmatched positions permitted.
-
-
span_not object
Hide span_not attributes Show span_not attributes object
-
boost number
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.
-
_name string
-
dist number
The number of tokens from within the include span that can’t have overlap with the exclude span. Equivalent to setting both
pre
andpost
. -
Hide exclude attributes Show exclude attributes object
-
Hide include attributes Show include attributes object
-
post number
The number of tokens after the include span that can’t have overlap with the exclude span.
-
pre number
The number of tokens before the include span that can’t have overlap with the exclude span.
-
-
span_or object
Hide span_or attributes Show span_or attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
-
span_term object
Matches spans containing a term.
-
span_within object
Hide span_within attributes Show span_within attributes object
-
boost number
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.
-
_name string
-
Hide big attributes Show big attributes object
-
Hide little attributes Show little attributes object
-
-
sparse_vector object
Hide sparse_vector attributes Show sparse_vector attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
query string
The query text you want to use for search. If inference_id is specified, query must also be specified.
-
prune boolean
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
-
pruning_config object
-
query_vector object
Dictionary of precomputed sparse vectors and their associated weights. Only one of inference_id or query_vector may be supplied in a request.
-
inference_id string
-
-
term object
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.
-
terms object
Hide terms attributes Show terms attributes object
-
terms_set object
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.
-
wildcard object
Returns documents that contain terms matching a wildcard pattern.
-
wrapper object
Hide wrapper attributes Show wrapper attributes object
-
boost number
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.
-
_name string
-
A base64 encoded query. The binary data format can be any of JSON, YAML, CBOR or SMILE encodings
-
-
type object
Hide type attributes Show type attributes object
-
-
max_fragment_length number
-
max_analyzed_offset number
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_offset
query setting does not override theindex.highlight.max_analyzed_offset
setting, which prevails when it’s set to lower value than the query setting. -
no_match_size number
The amount of text you want to return from the beginning of the field if there are no matching fragments to highlight.
-
number_of_fragments number
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_fragments
is0
,fragment_size
is ignored. -
options object
Hide options attributes Show options attributes object
-
key object
-
order string
Value is
score
. -
phrase_limit number
Controls the number of matching phrases in a document that are considered. Prevents the
fvh
highlighter from analyzing too many phrases and consuming too much memory. When usingmatched_fields
,phrase_limit
phrases per matched field are considered. Raising the limit increases query time and consumes more memory. Only supported by thefvh
highlighter. -
post_tags array[string]
Use in conjunction with
pre_tags
to define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>
and</em>
tags. -
pre_tags array[string]
Use in conjunction with
post_tags
to define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>
and</em>
tags. -
require_field_match boolean
By default, only fields that contains a query match are highlighted. Set to
false
to highlight all fields. -
tags_schema string
Value is
styled
. -
encoder string
Values are
default
orhtml
.
-
track_total_hits boolean | number
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.
-
indices_boost array[object]
Boosts the _score of documents from specified indices.
Hide indices_boost attributes Show indices_boost attributes object
-
key number
-
docvalue_fields array[object]
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
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
format string
Format in which the values are returned.
-
include_unmapped boolean
-
knn object | array[object]
Defines the approximate kNN search to run.
One of: Hide attributes Show attributes
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
query_vector array[number]
-
query_vector_builder object
Hide query_vector_builder attribute Show query_vector_builder attribute object
-
text_embedding object
Hide text_embedding attributes Show text_embedding attributes object
-
-
k number
The final number of nearest neighbors to return as top hits
-
num_candidates number
The number of nearest neighbor candidates to consider per shard
-
boost number
Boost value to apply to kNN scores
filter object | array[object]
Filters for the kNN search query
One of: Hide attributes Show attributes
-
bool object
Hide bool attributes Show bool attributes object
-
boosting object
Hide boosting attributes Show boosting attributes object
-
boost number
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.
-
_name string
-
Floating point number between 0 and 1.0 used to decrease the relevance scores of documents matching the
negative
query.
-
-
combined_fields object
Hide combined_fields attributes Show combined_fields attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
Text to search for in the provided
fields
. Thecombined_fields
query analyzes the provided text before performing a search. -
If true, match phrase queries are automatically created for multi-term synonyms.
-
operator string
Values are
or
orand
. -
zero_terms_query string
Values are
none
orall
.
-
-
constant_score object
Hide constant_score attributes Show constant_score attributes object
-
dis_max object
Hide dis_max attributes Show dis_max attributes object
-
boost number
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.
-
_name string
-
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.
-
tie_breaker number
Floating point number between 0 and 1.0 used to increase the relevance scores of documents matching multiple query clauses.
-
-
exists object
Hide exists attributes Show exists attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
-
function_score object
Hide function_score attributes Show function_score attributes object
-
boost number
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.
-
_name string
-
boost_mode string
Values are
multiply
,replace
,sum
,avg
,max
, ormin
. -
functions array[object]
One or more functions that compute a new score for each document returned by the query.
-
max_boost number
Restricts the new score to not exceed the provided limit.
-
min_score number
Excludes documents that do not meet the provided score threshold.
-
query object
-
score_mode string
Values are
multiply
,sum
,avg
,first
,max
, ormin
.
-
-
fuzzy object
Returns documents that contain terms similar to the search term, as measured by a Levenshtein edit distance.
-
geo_bounding_box object
Hide geo_bounding_box attributes Show geo_bounding_box attributes object
-
boost number
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.
-
_name string
-
type string
Values are
memory
orindexed
. -
validation_method string
Values are
coerce
,ignore_malformed
, orstrict
. -
ignore_unmapped boolean
Set to
true
to ignore an unmapped field and not match any documents for this query. Set tofalse
to throw an exception if the field is not mapped.
-
-
geo_distance object
Hide geo_distance attributes Show geo_distance attributes object
-
boost number
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.
-
_name string
-
distance_type string
Values are
arc
orplane
. -
validation_method string
Values are
coerce
,ignore_malformed
, orstrict
. -
ignore_unmapped boolean
Set to
true
to ignore an unmapped field and not match any documents for this query. Set tofalse
to throw an exception if the field is not mapped.
-
-
geo_polygon object
Hide geo_polygon attributes Show geo_polygon attributes object
-
boost number
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.
-
_name string
-
validation_method string
Values are
coerce
,ignore_malformed
, orstrict
. -
ignore_unmapped boolean
-
-
geo_shape object
Hide geo_shape attributes Show geo_shape attributes object
-
boost number
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.
-
_name string
-
ignore_unmapped boolean
Set to
true
to ignore an unmapped field and not match any documents for this query. Set tofalse
to throw an exception if the field is not mapped.
-
-
has_child object
Hide has_child attributes Show has_child attributes object
-
boost number
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.
-
_name string
-
ignore_unmapped boolean
Indicates whether to ignore an unmapped
type
and not return any documents instead of an error. -
inner_hits object
-
max_children number
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.
-
min_children number
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.
-
score_mode string
Values are
none
,avg
,sum
,max
, ormin
.
-
-
has_parent object
Hide has_parent attributes Show has_parent attributes object
-
boost number
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.
-
_name string
-
ignore_unmapped boolean
Indicates whether to ignore an unmapped
parent_type
and not return any documents instead of an error. You can use this parameter to query multiple indices that may not contain theparent_type
. -
inner_hits object
-
score boolean
Indicates whether the relevance score of a matching parent document is aggregated into its child documents.
-
-
ids object
Hide ids attributes Show ids attributes object
-
intervals object
Returns documents based on the order and proximity of matching terms.
-
knn object
Hide knn attributes Show knn attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
query_vector array[number]
-
query_vector_builder object
-
num_candidates number
The number of nearest neighbor candidates to consider per shard
-
k number
The final number of nearest neighbors to return as top hits
-
similarity number
The minimum similarity for a vector to be considered a match
-
-
match object
Returns documents that match a provided text, number, date or boolean value. The provided text is analyzed before matching.
-
match_all object
Hide match_all attributes Show match_all attributes object
-
match_bool_prefix object
Analyzes its input and constructs a
bool
query from the terms. Each term except the last is used in aterm
query. The last term is used in a prefix query. -
match_none object
Hide match_none attributes Show match_none attributes object
-
match_phrase object
Analyzes the text and creates a phrase query out of the analyzed text.
-
match_phrase_prefix object
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.
-
more_like_this object
Hide more_like_this attributes Show more_like_this attributes object
-
boost number
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.
-
_name string
-
analyzer string
The analyzer that is used to analyze the free form text. Defaults to the analyzer associated with the first field in fields.
-
boost_terms number
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).
-
fail_on_unsupported_field boolean
Controls whether the query should fail (throw an exception) if any of the specified fields are not of the supported types (
text
orkeyword
). -
fields array[string]
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
include boolean
Specifies whether the input documents should also be included in the search results returned.
-
max_doc_freq number
The maximum document frequency above which the terms are ignored from the input document.
-
max_query_terms number
The maximum number of query terms that can be selected.
-
max_word_length number
The maximum word length above which the terms are ignored. Defaults to unbounded (
0
). -
min_doc_freq number
The minimum document frequency below which the terms are ignored from the input document.
-
min_term_freq number
The minimum term frequency below which the terms are ignored from the input document.
-
min_word_length number
The minimum word length below which the terms are ignored.
-
routing string
-
version number
-
version_type string
Values are
internal
,external
,external_gte
, orforce
.
-
-
multi_match object
Hide multi_match attributes Show multi_match attributes object
-
boost number
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.
-
_name string
-
analyzer string
Analyzer used to convert the text in the query value into tokens.
-
If
true
, match phrase queries are automatically created for multi-term synonyms. -
fields string | array[string]
-
fuzzy_rewrite string
-
fuzzy_transpositions boolean
If
true
, edits for fuzzy matching include transpositions of two adjacent characters (for example,ab
toba
). Can be applied to the term subqueries constructed for all terms but the final term. -
lenient boolean
If
true
, format-based errors, such as providing a text query value for a numeric field, are ignored. -
max_expansions number
Maximum number of terms to which the query will expand.
-
operator string
Values are
and
,AND
,or
, orOR
. -
prefix_length number
Number of beginning characters left unchanged for fuzzy matching.
-
Text, number, boolean value or date you wish to find in the provided field.
-
slop number
Maximum number of positions allowed between matching tokens.
-
tie_breaker number
Determines how scores for each per-term blended query and scores across groups are combined.
-
type string
Values are
best_fields
,most_fields
,cross_fields
,phrase
,phrase_prefix
, orbool_prefix
. -
zero_terms_query string
Values are
all
ornone
.
-
-
nested object
Hide nested attributes Show nested attributes object
-
boost number
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.
-
_name string
-
ignore_unmapped boolean
Indicates whether to ignore an unmapped path and not return any documents instead of an error.
-
inner_hits object
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
score_mode string
Values are
none
,avg
,sum
,max
, ormin
.
-
-
parent_id object
Hide parent_id attributes Show parent_id attributes object
-
boost number
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.
-
_name string
-
id string
-
ignore_unmapped boolean
Indicates whether to ignore an unmapped
type
and not return any documents instead of an error. -
type string
-
-
percolate object
Hide percolate attributes Show percolate attributes object
-
boost number
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.
-
_name string
-
document object
The source of the document being percolated.
-
documents array[object]
An array of sources of the documents being percolated.
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
id string
-
index string
-
name string
The suffix used for the
_percolator_document_slot
field when multiplepercolate
queries are specified. -
preference string
Preference used to fetch document to percolate.
-
routing string
-
version number
-
-
pinned object
Hide pinned attributes Show pinned attributes object
-
prefix object
Returns documents that contain a specific prefix in a provided field.
-
query_string object
Hide query_string attributes Show query_string attributes object
-
boost number
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.
-
_name string
-
allow_leading_wildcard boolean
If
true
, the wildcard characters*
and?
are allowed as the first character of the query string. -
analyzer string
Analyzer used to convert text in the query string into tokens.
-
analyze_wildcard boolean
If
true
, the query attempts to analyze wildcard terms in the query string. -
If
true
, match phrase queries are automatically created for multi-term synonyms. -
default_field string
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
default_operator string
Values are
and
,AND
,or
, orOR
. -
enable_position_increments boolean
If
true
, enable position increments in queries constructed from aquery_string
search. -
escape boolean
-
fields array[string]
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
fuzzy_max_expansions number
Maximum number of terms to which the query expands for fuzzy matching.
-
fuzzy_prefix_length number
Number of beginning characters left unchanged for fuzzy matching.
-
fuzzy_rewrite string
-
fuzzy_transpositions boolean
If
true
, edits for fuzzy matching include transpositions of two adjacent characters (for example,ab
toba
). -
lenient boolean
If
true
, format-based errors, such as providing a text value for a numeric field, are ignored. -
max_determinized_states number
Maximum number of automaton states required for the query.
-
phrase_slop number
Maximum number of positions allowed between matching tokens for phrases.
-
Query string you wish to parse and use for search.
-
quote_analyzer string
Analyzer used to convert quoted text in the query string into tokens. For quoted text, this parameter overrides the analyzer specified in the
analyzer
parameter. -
quote_field_suffix string
Suffix appended to quoted text in the query string. You can use this suffix to use a different analysis method for exact matches.
-
rewrite string
-
tie_breaker number
How to combine the queries generated from the individual search terms in the resulting
dis_max
query. -
time_zone string
-
type string
Values are
best_fields
,most_fields
,cross_fields
,phrase
,phrase_prefix
, orbool_prefix
.
-
-
range object
Returns documents that contain terms within a provided range.
-
rank_feature object
Hide rank_feature attributes Show rank_feature attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
-
regexp object
Returns documents that contain terms matching a regular expression.
-
rule object
Hide rule attributes Show rule attributes object
-
script object
Hide script attributes Show script attributes object
-
script_score object
Hide script_score attributes Show script_score attributes object
-
boost number
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.
-
_name string
-
min_score number
Documents with a score lower than this floating point number are excluded from the search results.
-
-
semantic object
Hide semantic attributes Show semantic attributes object
-
boost number
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.
-
_name string
-
The field to query, which must be a semantic_text field type
-
The query text
-
-
shape object
Hide shape attributes Show shape attributes object
-
boost number
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.
-
_name string
-
ignore_unmapped boolean
When set to
true
the query ignores an unmapped field and will not match any documents.
-
-
simple_query_string object
Hide simple_query_string attributes Show simple_query_string attributes object
-
boost number
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.
-
_name string
-
analyzer string
Analyzer used to convert text in the query string into tokens.
-
analyze_wildcard boolean
If
true
, the query attempts to analyze wildcard terms in the query string. -
If
true
, the parser creates a match_phrase query for each multi-position token. -
default_operator string
Values are
and
,AND
,or
, orOR
. -
fields array[string]
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
fuzzy_max_expansions number
Maximum number of terms to which the query expands for fuzzy matching.
-
fuzzy_prefix_length number
Number of beginning characters left unchanged for fuzzy matching.
-
fuzzy_transpositions boolean
If
true
, edits for fuzzy matching include transpositions of two adjacent characters (for example,ab
toba
). -
lenient boolean
If
true
, format-based errors, such as providing a text value for a numeric field, are ignored. -
Query string in the simple query string syntax you wish to parse and use for search.
-
quote_field_suffix string
Suffix appended to quoted text in the query string.
-
-
span_containing object
Hide span_containing attributes Show span_containing attributes object
-
span_field_masking object
Hide span_field_masking attributes Show span_field_masking attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
-
span_first object
Hide span_first attributes Show span_first attributes object
-
boost number
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.
-
_name string
-
Controls the maximum end position permitted in a match.
-
-
span_multi object
Hide span_multi attributes Show span_multi attributes object
-
span_near object
Hide span_near attributes Show span_near attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
in_order boolean
Controls whether matches are required to be in-order.
-
slop number
Controls the maximum number of intervening unmatched positions permitted.
-
-
span_not object
Hide span_not attributes Show span_not attributes object
-
boost number
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.
-
_name string
-
dist number
The number of tokens from within the include span that can’t have overlap with the exclude span. Equivalent to setting both
pre
andpost
. -
post number
The number of tokens after the include span that can’t have overlap with the exclude span.
-
pre number
The number of tokens before the include span that can’t have overlap with the exclude span.
-
-
span_or object
Hide span_or attributes Show span_or attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
-
span_term object
Matches spans containing a term.
-
span_within object
Hide span_within attributes Show span_within attributes object
-
sparse_vector object
Hide sparse_vector attributes Show sparse_vector attributes object
-
term object
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.
-
terms object
Hide terms attributes Show terms attributes object
-
terms_set object
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.
-
wildcard object
Returns documents that contain terms matching a wildcard pattern.
-
wrapper object
Hide wrapper attributes Show wrapper attributes object
-
boost number
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.
-
_name string
-
A base64 encoded query. The binary data format can be any of JSON, YAML, CBOR or SMILE encodings
-
-
type object
Hide type attributes Show type attributes object
Hide attributes Show attributes object
-
bool object
-
boosting object
-
combined_fields object
-
constant_score object
-
dis_max object
-
exists object
-
function_score object
-
fuzzy object
Returns documents that contain terms similar to the search term, as measured by a Levenshtein edit distance.
-
geo_bounding_box object
-
geo_distance object
-
geo_polygon object
-
geo_shape object
-
has_child object
-
has_parent object
-
ids object
-
intervals object
Returns documents based on the order and proximity of matching terms.
-
knn object
-
match object
Returns documents that match a provided text, number, date or boolean value. The provided text is analyzed before matching.
-
match_all object
-
match_bool_prefix object
Analyzes its input and constructs a
bool
query from the terms. Each term except the last is used in aterm
query. The last term is used in a prefix query. -
match_none object
-
match_phrase object
Analyzes the text and creates a phrase query out of the analyzed text.
-
match_phrase_prefix object
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.
-
more_like_this object
-
multi_match object
-
nested object
-
parent_id object
-
percolate object
-
prefix object
Returns documents that contain a specific prefix in a provided field.
-
query_string object
-
range object
Returns documents that contain terms within a provided range.
-
rank_feature object
-
regexp object
Returns documents that contain terms matching a regular expression.
-
rule object
-
script object
-
script_score object
-
semantic object
-
shape object
-
simple_query_string object
-
span_containing object
-
span_field_masking object
-
span_first object
-
span_multi object
-
span_near object
-
span_not object
-
span_or object
-
span_term object
Matches spans containing a term.
-
span_within object
-
term object
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.
-
terms object
-
terms_set object
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.
-
wildcard object
Returns documents that contain terms matching a wildcard pattern.
-
wrapper object
-
type object
-
-
similarity number
The minimum similarity for a vector to be considered a match
-
inner_hits object
Hide inner_hits attributes Show inner_hits attributes object
-
name string
-
size number
The maximum number of hits to return per
inner_hits
. -
from number
Inner hit starting document offset.
-
collapse object
Hide collapse attributes Show collapse attributes object
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
inner_hits object | array[object]
The number of inner hits and their sort order
-
The number of concurrent requests allowed to retrieve the inner_hits per group
-
collapse object
-
-
docvalue_fields array[object]
Hide docvalue_fields attributes Show docvalue_fields attributes object
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
format string
Format in which the values are returned.
-
include_unmapped boolean
-
-
explain boolean
-
highlight object
Hide highlight attributes Show highlight attributes object
-
boundary_chars string
A string that contains each boundary character.
-
boundary_max_scan number
How far to scan for boundary characters.
-
boundary_scanner string
Values are
chars
,sentence
, orword
. -
boundary_scanner_locale string
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"
. -
fragmenter string
Values are
simple
orspan
. -
fragment_size number
The size of the highlighted fragment in characters.
-
highlight_filter boolean
-
highlight_query object
Hide highlight_query attributes Show highlight_query attributes object
-
fuzzy object
Returns documents that contain terms similar to the search term, as measured by a Levenshtein edit distance.
-
intervals object
Returns documents based on the order and proximity of matching terms.
-
match object
Returns documents that match a provided text, number, date or boolean value. The provided text is analyzed before matching.
-
match_bool_prefix object
Analyzes its input and constructs a
bool
query from the terms. Each term except the last is used in aterm
query. The last term is used in a prefix query. -
match_phrase object
Analyzes the text and creates a phrase query out of the analyzed text.
-
match_phrase_prefix object
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.
-
prefix object
Returns documents that contain a specific prefix in a provided field.
-
range object
Returns documents that contain terms within a provided range.
-
regexp object
Returns documents that contain terms matching a regular expression.
-
span_term object
Matches spans containing a term.
-
term object
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.
-
terms_set object
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.
-
wildcard object
Returns documents that contain terms matching a wildcard pattern.
-
max_fragment_length number
-
max_analyzed_offset number
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_offset
query setting does not override theindex.highlight.max_analyzed_offset
setting, which prevails when it’s set to lower value than the query setting. -
no_match_size number
The amount of text you want to return from the beginning of the field if there are no matching fragments to highlight.
-
number_of_fragments number
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_fragments
is0
,fragment_size
is ignored. -
options object
Hide options attributes Show options attributes object
-
key object
-
order string
Value is
score
. -
phrase_limit number
Controls the number of matching phrases in a document that are considered. Prevents the
fvh
highlighter from analyzing too many phrases and consuming too much memory. When usingmatched_fields
,phrase_limit
phrases per matched field are considered. Raising the limit increases query time and consumes more memory. Only supported by thefvh
highlighter. -
post_tags array[string]
Use in conjunction with
pre_tags
to define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>
and</em>
tags. -
pre_tags array[string]
Use in conjunction with
post_tags
to define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>
and</em>
tags. -
require_field_match boolean
By default, only fields that contains a query match are highlighted. Set to
false
to highlight all fields. -
tags_schema string
Value is
styled
. -
encoder string
Values are
default
orhtml
.
-
ignore_unmapped boolean
-
script_fields object
Hide script_fields attributes Show script_fields attributes object
-
ignore_failure boolean
-
seq_no_primary_term boolean
-
fields string | array[string]
sort string | object | array[string | object]
One of: Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
Hide attributes Show attributes
-
_score object
-
_doc object
-
_geo_distance object
-
_script object
One of: Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
-
stored_fields string | array[string]
-
track_scores boolean
-
version boolean
-
Hide attributes Show attributes object
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
query_vector array[number]
-
query_vector_builder object
Hide query_vector_builder attribute Show query_vector_builder attribute object
-
text_embedding object
Hide text_embedding attributes Show text_embedding attributes object
-
-
k number
The final number of nearest neighbors to return as top hits
-
num_candidates number
The number of nearest neighbor candidates to consider per shard
-
boost number
Boost value to apply to kNN scores
filter object | array[object]
Filters for the kNN search query
One of: Hide attributes Show attributes
-
bool object
-
boosting object
-
combined_fields object
-
constant_score object
-
dis_max object
-
exists object
-
function_score object
-
fuzzy object
Returns documents that contain terms similar to the search term, as measured by a Levenshtein edit distance.
-
geo_bounding_box object
-
geo_distance object
-
geo_polygon object
-
geo_shape object
-
has_child object
-
has_parent object
-
ids object
-
intervals object
Returns documents based on the order and proximity of matching terms.
-
knn object
-
match object
Returns documents that match a provided text, number, date or boolean value. The provided text is analyzed before matching.
-
match_all object
-
match_bool_prefix object
Analyzes its input and constructs a
bool
query from the terms. Each term except the last is used in aterm
query. The last term is used in a prefix query. -
match_none object
-
match_phrase object
Analyzes the text and creates a phrase query out of the analyzed text.
-
match_phrase_prefix object
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.
-
more_like_this object
-
multi_match object
-
nested object
-
parent_id object
-
percolate object
-
prefix object
Returns documents that contain a specific prefix in a provided field.
-
query_string object
-
range object
Returns documents that contain terms within a provided range.
-
rank_feature object
-
regexp object
Returns documents that contain terms matching a regular expression.
-
rule object
-
script object
-
script_score object
-
semantic object
-
shape object
-
simple_query_string object
-
span_containing object
-
span_field_masking object
-
span_first object
-
span_multi object
-
span_near object
-
span_not object
-
span_or object
-
span_term object
Matches spans containing a term.
-
span_within object
-
term object
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.
-
terms object
-
terms_set object
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.
-
wildcard object
Returns documents that contain terms matching a wildcard pattern.
-
wrapper object
-
type object
Hide attributes Show attributes object
-
fuzzy object
Returns documents that contain terms similar to the search term, as measured by a Levenshtein edit distance.
-
intervals object
Returns documents based on the order and proximity of matching terms.
-
match object
Returns documents that match a provided text, number, date or boolean value. The provided text is analyzed before matching.
-
match_bool_prefix object
Analyzes its input and constructs a
bool
query from the terms. Each term except the last is used in aterm
query. The last term is used in a prefix query. -
match_phrase object
Analyzes the text and creates a phrase query out of the analyzed text.
-
match_phrase_prefix object
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.
-
prefix object
Returns documents that contain a specific prefix in a provided field.
-
range object
Returns documents that contain terms within a provided range.
-
regexp object
Returns documents that contain terms matching a regular expression.
-
span_term object
Matches spans containing a term.
-
term object
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.
-
terms_set object
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.
-
wildcard object
Returns documents that contain terms matching a wildcard pattern.
-
-
similarity number
The minimum similarity for a vector to be considered a match
-
inner_hits object
Hide inner_hits attributes Show inner_hits attributes object
-
name string
-
size number
The maximum number of hits to return per
inner_hits
. -
from number
Inner hit starting document offset.
-
collapse object
Hide collapse attributes Show collapse attributes object
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
inner_hits object | array[object]
The number of inner hits and their sort order
-
The number of concurrent requests allowed to retrieve the inner_hits per group
-
collapse object
-
-
docvalue_fields array[object]
Hide docvalue_fields attributes Show docvalue_fields attributes object
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
format string
Format in which the values are returned.
-
include_unmapped boolean
-
-
explain boolean
-
highlight object
Hide highlight attributes Show highlight attributes object
-
boundary_chars string
A string that contains each boundary character.
-
boundary_max_scan number
How far to scan for boundary characters.
-
boundary_scanner string
Values are
chars
,sentence
, orword
. -
boundary_scanner_locale string
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"
. -
fragmenter string
Values are
simple
orspan
. -
fragment_size number
The size of the highlighted fragment in characters.
-
highlight_filter boolean
-
highlight_query object
-
max_fragment_length number
-
max_analyzed_offset number
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_offset
query setting does not override theindex.highlight.max_analyzed_offset
setting, which prevails when it’s set to lower value than the query setting. -
no_match_size number
The amount of text you want to return from the beginning of the field if there are no matching fragments to highlight.
-
number_of_fragments number
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_fragments
is0
,fragment_size
is ignored. -
options object
-
order string
Value is
score
. -
phrase_limit number
Controls the number of matching phrases in a document that are considered. Prevents the
fvh
highlighter from analyzing too many phrases and consuming too much memory. When usingmatched_fields
,phrase_limit
phrases per matched field are considered. Raising the limit increases query time and consumes more memory. Only supported by thefvh
highlighter. -
post_tags array[string]
Use in conjunction with
pre_tags
to define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>
and</em>
tags. -
pre_tags array[string]
Use in conjunction with
post_tags
to define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>
and</em>
tags. -
require_field_match boolean
By default, only fields that contains a query match are highlighted. Set to
false
to highlight all fields. -
tags_schema string
Value is
styled
. -
encoder string
Values are
default
orhtml
.
-
ignore_unmapped boolean
-
script_fields object
Hide script_fields attributes Show script_fields attributes object
-
ignore_failure boolean
-
seq_no_primary_term boolean
-
fields string | array[string]
-
stored_fields string | array[string]
-
track_scores boolean
-
version boolean
-
-
-
min_score number
Minimum _score for matching documents. Documents with a lower _score are not included in the search results.
-
post_filter object
Hide post_filter attributes Show post_filter attributes object
-
bool object
Hide bool attributes Show bool attributes object
-
boost number
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.
-
_name string
filter object | array[object]
The clause (query) must appear in matching documents. However, unlike
must
, the score of the query will be ignored.minimum_should_match number | string
The minimum number of terms that should match as integer, percentage or range
must object | array[object]
The clause (query) must appear in matching documents and will contribute to the score.
must_not object | array[object]
The clause (query) must not appear in the matching documents. Because scoring is ignored, a score of
0
is returned for all documents.should object | array[object]
The clause (query) should appear in the matching document.
-
-
boosting object
Hide boosting attributes Show boosting attributes object
-
boost number
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.
-
_name string
-
Floating point number between 0 and 1.0 used to decrease the relevance scores of documents matching the
negative
query.
-
-
combined_fields object
Hide combined_fields attributes Show combined_fields attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
Text to search for in the provided
fields
. Thecombined_fields
query analyzes the provided text before performing a search. -
If true, match phrase queries are automatically created for multi-term synonyms.
-
operator string
Values are
or
orand
. minimum_should_match number | string
The minimum number of terms that should match as integer, percentage or range
-
zero_terms_query string
Values are
none
orall
.
-
-
constant_score object
Hide constant_score attributes Show constant_score attributes object
-
dis_max object
Hide dis_max attributes Show dis_max attributes object
-
boost number
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.
-
_name string
-
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.
-
tie_breaker number
Floating point number between 0 and 1.0 used to increase the relevance scores of documents matching multiple query clauses.
-
distance_feature object
One of: Hide attributes Show attributes
-
boost number
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.
-
_name string
-
Date or point of origin used to calculate distances. If the
field
value is adate
ordate_nanos
field, theorigin
value must be a date. Date Math, such asnow-1h
, is supported. If the field value is ageo_point
field, theorigin
value must be a geopoint. -
Distance from the
origin
at which relevance scores receive half of theboost
value. If thefield
value is adate
ordate_nanos
field, thepivot
value must be a time unit, such as1h
or10d
. If thefield
value is ageo_point
field, thepivot
value must be a distance unit, such as1km
or12m
. -
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
Hide attributes Show attributes
-
boost number
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.
-
_name string
origin object | array[number] | string Required
A latitude/longitude as a 2 dimensional point. It can be represented in various ways:
- as a
{lat, long}
object - as a geo hash value
- as a
[lon, lat]
array - as a string in
"<lat>, <lon>"
or WKT point formats
- as a
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
Hide attributes Show attributes
-
boost number
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.
-
_name string
-
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. -
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
-
exists object
Hide exists attributes Show exists attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
-
function_score object
Hide function_score attributes Show function_score attributes object
-
boost number
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.
-
_name string
-
boost_mode string
Values are
multiply
,replace
,sum
,avg
,max
, ormin
. -
functions array[object]
One or more functions that compute a new score for each document returned by the query.
Hide functions attributes Show functions attributes object
-
filter object
-
weight number
-
field_value_factor object
-
random_score object
-
script_score object
-
-
max_boost number
Restricts the new score to not exceed the provided limit.
-
min_score number
Excludes documents that do not meet the provided score threshold.
-
query object
-
score_mode string
Values are
multiply
,sum
,avg
,first
,max
, ormin
.
-
-
fuzzy object
Returns documents that contain terms similar to the search term, as measured by a Levenshtein edit distance.
-
geo_bounding_box object
Hide geo_bounding_box attributes Show geo_bounding_box attributes object
-
boost number
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.
-
_name string
-
type string
Values are
memory
orindexed
. -
validation_method string
Values are
coerce
,ignore_malformed
, orstrict
. -
ignore_unmapped boolean
Set to
true
to ignore an unmapped field and not match any documents for this query. Set tofalse
to throw an exception if the field is not mapped.
-
-
geo_distance object
Hide geo_distance attributes Show geo_distance attributes object
-
boost number
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.
-
_name string
-
distance_type string
Values are
arc
orplane
. -
validation_method string
Values are
coerce
,ignore_malformed
, orstrict
. -
ignore_unmapped boolean
Set to
true
to ignore an unmapped field and not match any documents for this query. Set tofalse
to throw an exception if the field is not mapped.
-
-
geo_polygon object
Hide geo_polygon attributes Show geo_polygon attributes object
-
boost number
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.
-
_name string
-
validation_method string
Values are
coerce
,ignore_malformed
, orstrict
. -
ignore_unmapped boolean
-
-
geo_shape object
Hide geo_shape attributes Show geo_shape attributes object
-
boost number
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.
-
_name string
-
ignore_unmapped boolean
Set to
true
to ignore an unmapped field and not match any documents for this query. Set tofalse
to throw an exception if the field is not mapped.
-
-
has_child object
Hide has_child attributes Show has_child attributes object
-
boost number
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.
-
_name string
-
ignore_unmapped boolean
Indicates whether to ignore an unmapped
type
and not return any documents instead of an error. -
inner_hits object
Hide inner_hits attributes Show inner_hits attributes object
-
name string
-
size number
The maximum number of hits to return per
inner_hits
. -
from number
Inner hit starting document offset.
-
collapse object
Hide collapse attributes Show collapse attributes object
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
inner_hits object | array[object]
The number of inner hits and their sort order
-
The number of concurrent requests allowed to retrieve the inner_hits per group
-
collapse object
-
-
docvalue_fields array[object]
Hide docvalue_fields attributes Show docvalue_fields attributes object
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
format string
Format in which the values are returned.
-
include_unmapped boolean
-
-
explain boolean
-
highlight object
Hide highlight attributes Show highlight attributes object
-
boundary_chars string
A string that contains each boundary character.
-
boundary_max_scan number
How far to scan for boundary characters.
-
boundary_scanner string
Values are
chars
,sentence
, orword
. -
boundary_scanner_locale string
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"
. -
fragmenter string
Values are
simple
orspan
. -
fragment_size number
The size of the highlighted fragment in characters.
-
highlight_filter boolean
-
highlight_query object
-
max_fragment_length number
-
max_analyzed_offset number
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_offset
query setting does not override theindex.highlight.max_analyzed_offset
setting, which prevails when it’s set to lower value than the query setting. -
no_match_size number
The amount of text you want to return from the beginning of the field if there are no matching fragments to highlight.
-
number_of_fragments number
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_fragments
is0
,fragment_size
is ignored. -
options object
-
order string
Value is
score
. -
phrase_limit number
Controls the number of matching phrases in a document that are considered. Prevents the
fvh
highlighter from analyzing too many phrases and consuming too much memory. When usingmatched_fields
,phrase_limit
phrases per matched field are considered. Raising the limit increases query time and consumes more memory. Only supported by thefvh
highlighter. -
post_tags array[string]
Use in conjunction with
pre_tags
to define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>
and</em>
tags. -
pre_tags array[string]
Use in conjunction with
post_tags
to define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>
and</em>
tags. -
require_field_match boolean
By default, only fields that contains a query match are highlighted. Set to
false
to highlight all fields. -
tags_schema string
Value is
styled
. -
encoder string
Values are
default
orhtml
.
-
ignore_unmapped boolean
-
script_fields object
Hide script_fields attributes Show script_fields attributes object
-
ignore_failure boolean
-
seq_no_primary_term boolean
-
fields string | array[string]
-
stored_fields string | array[string]
-
track_scores boolean
-
version boolean
-
-
max_children number
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.
-
min_children number
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.
-
score_mode string
Values are
none
,avg
,sum
,max
, ormin
.
-
-
has_parent object
Hide has_parent attributes Show has_parent attributes object
-
boost number
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.
-
_name string
-
ignore_unmapped boolean
Indicates whether to ignore an unmapped
parent_type
and not return any documents instead of an error. You can use this parameter to query multiple indices that may not contain theparent_type
. -
inner_hits object
Hide inner_hits attributes Show inner_hits attributes object
-
name string
-
size number
The maximum number of hits to return per
inner_hits
. -
from number
Inner hit starting document offset.
-
collapse object
Hide collapse attributes Show collapse attributes object
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
inner_hits object | array[object]
The number of inner hits and their sort order
-
The number of concurrent requests allowed to retrieve the inner_hits per group
-
collapse object
-
-
docvalue_fields array[object]
Hide docvalue_fields attributes Show docvalue_fields attributes object
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
format string
Format in which the values are returned.
-
include_unmapped boolean
-
-
explain boolean
-
highlight object
Hide highlight attributes Show highlight attributes object
-
boundary_chars string
A string that contains each boundary character.
-
boundary_max_scan number
How far to scan for boundary characters.
-
boundary_scanner string
Values are
chars
,sentence
, orword
. -
boundary_scanner_locale string
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"
. -
fragmenter string
Values are
simple
orspan
. -
fragment_size number
The size of the highlighted fragment in characters.
-
highlight_filter boolean
-
highlight_query object
-
max_fragment_length number
-
max_analyzed_offset number
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_offset
query setting does not override theindex.highlight.max_analyzed_offset
setting, which prevails when it’s set to lower value than the query setting. -
no_match_size number
The amount of text you want to return from the beginning of the field if there are no matching fragments to highlight.
-
number_of_fragments number
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_fragments
is0
,fragment_size
is ignored. -
options object
-
order string
Value is
score
. -
phrase_limit number
Controls the number of matching phrases in a document that are considered. Prevents the
fvh
highlighter from analyzing too many phrases and consuming too much memory. When usingmatched_fields
,phrase_limit
phrases per matched field are considered. Raising the limit increases query time and consumes more memory. Only supported by thefvh
highlighter. -
post_tags array[string]
Use in conjunction with
pre_tags
to define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>
and</em>
tags. -
pre_tags array[string]
Use in conjunction with
post_tags
to define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>
and</em>
tags. -
require_field_match boolean
By default, only fields that contains a query match are highlighted. Set to
false
to highlight all fields. -
tags_schema string
Value is
styled
. -
encoder string
Values are
default
orhtml
.
-
ignore_unmapped boolean
-
script_fields object
Hide script_fields attributes Show script_fields attributes object
-
ignore_failure boolean
-
seq_no_primary_term boolean
-
fields string | array[string]
-
stored_fields string | array[string]
-
track_scores boolean
-
version boolean
-
-
score boolean
Indicates whether the relevance score of a matching parent document is aggregated into its child documents.
-
-
ids object
Hide ids attributes Show ids attributes object
-
boost number
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.
-
_name string
values string | array[string]
-
-
intervals object
Returns documents based on the order and proximity of matching terms.
-
knn object
Hide knn attributes Show knn attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
query_vector array[number]
-
query_vector_builder object
Hide query_vector_builder attribute Show query_vector_builder attribute object
-
text_embedding object
Hide text_embedding attributes Show text_embedding attributes object
-
-
num_candidates number
The number of nearest neighbor candidates to consider per shard
-
k number
The final number of nearest neighbors to return as top hits
filter object | array[object]
Filters for the kNN search query
-
similarity number
The minimum similarity for a vector to be considered a match
-
-
match object
Returns documents that match a provided text, number, date or boolean value. The provided text is analyzed before matching.
-
match_all object
Hide match_all attributes Show match_all attributes object
-
match_bool_prefix object
Analyzes its input and constructs a
bool
query from the terms. Each term except the last is used in aterm
query. The last term is used in a prefix query. -
match_none object
Hide match_none attributes Show match_none attributes object
-
match_phrase object
Analyzes the text and creates a phrase query out of the analyzed text.
-
match_phrase_prefix object
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.
-
more_like_this object
Hide more_like_this attributes Show more_like_this attributes object
-
boost number
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.
-
_name string
-
analyzer string
The analyzer that is used to analyze the free form text. Defaults to the analyzer associated with the first field in fields.
-
boost_terms number
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).
-
fail_on_unsupported_field boolean
Controls whether the query should fail (throw an exception) if any of the specified fields are not of the supported types (
text
orkeyword
). -
fields array[string]
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
include boolean
Specifies whether the input documents should also be included in the search results returned.
like string | object | array[string | object]
Specifies free form text and/or a single or multiple documents for which you want to find similar documents.
One of: Hide attributes Show attributes
-
doc object
A document not present in the index.
-
fields array[string]
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
_id string
-
_index string
-
per_field_analyzer object
Overrides the default analyzer.
-
routing string
-
version number
-
version_type string
Values are
internal
,external
,external_gte
, orforce
.
Text that we want similar documents for or a lookup to a document's field for the text.
-
-
max_doc_freq number
The maximum document frequency above which the terms are ignored from the input document.
-
max_query_terms number
The maximum number of query terms that can be selected.
-
max_word_length number
The maximum word length above which the terms are ignored. Defaults to unbounded (
0
). -
min_doc_freq number
The minimum document frequency below which the terms are ignored from the input document.
minimum_should_match number | string
The minimum number of terms that should match as integer, percentage or range
-
min_term_freq number
The minimum term frequency below which the terms are ignored from the input document.
-
min_word_length number
The minimum word length below which the terms are ignored.
-
routing string
stop_words string | array[string]
Language value, such as arabic or thai. Defaults to english. Each language value corresponds to a predefined list of stop words in Lucene. See Stop words by language for supported language values and their stop words. Also accepts an array of stop words.
unlike string | object | array[string | object]
Used in combination with
like
to exclude documents that match a set of terms.One of: Hide attributes Show attributes
-
doc object
A document not present in the index.
-
fields array[string]
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
_id string
-
_index string
-
per_field_analyzer object
Overrides the default analyzer.
-
routing string
-
version number
-
version_type string
Values are
internal
,external
,external_gte
, orforce
.
Text that we want similar documents for or a lookup to a document's field for the text.
-
-
version number
-
version_type string
Values are
internal
,external
,external_gte
, orforce
.
-
-
multi_match object
Hide multi_match attributes Show multi_match attributes object
-
boost number
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.
-
_name string
-
analyzer string
Analyzer used to convert the text in the query value into tokens.
-
If
true
, match phrase queries are automatically created for multi-term synonyms. -
fields string | array[string]
fuzziness string | number
-
fuzzy_rewrite string
-
fuzzy_transpositions boolean
If
true
, edits for fuzzy matching include transpositions of two adjacent characters (for example,ab
toba
). Can be applied to the term subqueries constructed for all terms but the final term. -
lenient boolean
If
true
, format-based errors, such as providing a text query value for a numeric field, are ignored. -
max_expansions number
Maximum number of terms to which the query will expand.
minimum_should_match number | string
The minimum number of terms that should match as integer, percentage or range
-
operator string
Values are
and
,AND
,or
, orOR
. -
prefix_length number
Number of beginning characters left unchanged for fuzzy matching.
-
Text, number, boolean value or date you wish to find in the provided field.
-
slop number
Maximum number of positions allowed between matching tokens.
-
tie_breaker number
Determines how scores for each per-term blended query and scores across groups are combined.
-
type string
Values are
best_fields
,most_fields
,cross_fields
,phrase
,phrase_prefix
, orbool_prefix
. -
zero_terms_query string
Values are
all
ornone
.
-
-
nested object
Hide nested attributes Show nested attributes object
-
boost number
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.
-
_name string
-
ignore_unmapped boolean
Indicates whether to ignore an unmapped path and not return any documents instead of an error.
-
inner_hits object
Hide inner_hits attributes Show inner_hits attributes object
-
name string
-
size number
The maximum number of hits to return per
inner_hits
. -
from number
Inner hit starting document offset.
-
collapse object
Hide collapse attributes Show collapse attributes object
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
inner_hits object | array[object]
The number of inner hits and their sort order
-
The number of concurrent requests allowed to retrieve the inner_hits per group
-
collapse object
-
-
docvalue_fields array[object]
Hide docvalue_fields attributes Show docvalue_fields attributes object
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
format string
Format in which the values are returned.
-
include_unmapped boolean
-
-
explain boolean
-
highlight object
Hide highlight attributes Show highlight attributes object
-
boundary_chars string
A string that contains each boundary character.
-
boundary_max_scan number
How far to scan for boundary characters.
-
boundary_scanner string
Values are
chars
,sentence
, orword
. -
boundary_scanner_locale string
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"
. -
fragmenter string
Values are
simple
orspan
. -
fragment_size number
The size of the highlighted fragment in characters.
-
highlight_filter boolean
-
highlight_query object
-
max_fragment_length number
-
max_analyzed_offset number
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_offset
query setting does not override theindex.highlight.max_analyzed_offset
setting, which prevails when it’s set to lower value than the query setting. -
no_match_size number
The amount of text you want to return from the beginning of the field if there are no matching fragments to highlight.
-
number_of_fragments number
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_fragments
is0
,fragment_size
is ignored. -
options object
-
order string
Value is
score
. -
phrase_limit number
Controls the number of matching phrases in a document that are considered. Prevents the
fvh
highlighter from analyzing too many phrases and consuming too much memory. When usingmatched_fields
,phrase_limit
phrases per matched field are considered. Raising the limit increases query time and consumes more memory. Only supported by thefvh
highlighter. -
post_tags array[string]
Use in conjunction with
pre_tags
to define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>
and</em>
tags. -
pre_tags array[string]
Use in conjunction with
post_tags
to define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>
and</em>
tags. -
require_field_match boolean
By default, only fields that contains a query match are highlighted. Set to
false
to highlight all fields. -
tags_schema string
Value is
styled
. -
encoder string
Values are
default
orhtml
.
-
ignore_unmapped boolean
-
script_fields object
Hide script_fields attributes Show script_fields attributes object
-
ignore_failure boolean
-
seq_no_primary_term boolean
-
fields string | array[string]
-
stored_fields string | array[string]
-
track_scores boolean
-
version boolean
-
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
score_mode string
Values are
none
,avg
,sum
,max
, ormin
.
-
-
parent_id object
Hide parent_id attributes Show parent_id attributes object
-
boost number
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.
-
_name string
-
id string
-
ignore_unmapped boolean
Indicates whether to ignore an unmapped
type
and not return any documents instead of an error. -
type string
-
-
percolate object
Hide percolate attributes Show percolate attributes object
-
boost number
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.
-
_name string
-
document object
The source of the document being percolated.
-
documents array[object]
An array of sources of the documents being percolated.
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
id string
-
index string
-
name string
The suffix used for the
_percolator_document_slot
field when multiplepercolate
queries are specified. -
preference string
Preference used to fetch document to percolate.
-
routing string
-
version number
-
-
pinned object
Hide pinned attributes Show pinned attributes object
-
boost number
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.
-
_name string
-
ids array[string]
Document IDs listed in the order they are to appear in results. Required if
docs
is not specified. -
docs array[object]
Documents listed in the order they are to appear in results. Required if
ids
is not specified.
-
-
prefix object
Returns documents that contain a specific prefix in a provided field.
-
query_string object
Hide query_string attributes Show query_string attributes object
-
boost number
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.
-
_name string
-
allow_leading_wildcard boolean
If
true
, the wildcard characters*
and?
are allowed as the first character of the query string. -
analyzer string
Analyzer used to convert text in the query string into tokens.
-
analyze_wildcard boolean
If
true
, the query attempts to analyze wildcard terms in the query string. -
If
true
, match phrase queries are automatically created for multi-term synonyms. -
default_field string
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
default_operator string
Values are
and
,AND
,or
, orOR
. -
enable_position_increments boolean
If
true
, enable position increments in queries constructed from aquery_string
search. -
escape boolean
-
fields array[string]
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
fuzziness string | number
-
fuzzy_max_expansions number
Maximum number of terms to which the query expands for fuzzy matching.
-
fuzzy_prefix_length number
Number of beginning characters left unchanged for fuzzy matching.
-
fuzzy_rewrite string
-
fuzzy_transpositions boolean
If
true
, edits for fuzzy matching include transpositions of two adjacent characters (for example,ab
toba
). -
lenient boolean
If
true
, format-based errors, such as providing a text value for a numeric field, are ignored. -
max_determinized_states number
Maximum number of automaton states required for the query.
minimum_should_match number | string
The minimum number of terms that should match as integer, percentage or range
-
phrase_slop number
Maximum number of positions allowed between matching tokens for phrases.
-
Query string you wish to parse and use for search.
-
quote_analyzer string
Analyzer used to convert quoted text in the query string into tokens. For quoted text, this parameter overrides the analyzer specified in the
analyzer
parameter. -
quote_field_suffix string
Suffix appended to quoted text in the query string. You can use this suffix to use a different analysis method for exact matches.
-
rewrite string
-
tie_breaker number
How to combine the queries generated from the individual search terms in the resulting
dis_max
query. -
time_zone string
-
type string
Values are
best_fields
,most_fields
,cross_fields
,phrase
,phrase_prefix
, orbool_prefix
.
-
-
range object
Returns documents that contain terms within a provided range.
-
rank_feature object
Hide rank_feature attributes Show rank_feature attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
saturation object
Hide saturation attribute Show saturation attribute object
-
pivot number
Configurable pivot value so that the result will be less than 0.5.
-
-
log object
Hide log attribute Show log attribute object
-
Configurable scaling factor.
-
-
linear object
-
sigmoid object
-
-
regexp object
Returns documents that contain terms matching a regular expression.
-
rule object
Hide rule attributes Show rule attributes object
-
script object
Hide script attributes Show script attributes object
-
boost number
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.
-
_name string
-
Hide script attributes Show script attributes object
-
source string
The script source.
-
id string
-
params object
Specifies any named parameters that are passed into the script as variables. Use parameters instead of hard-coded values to decrease compile time.
Hide params attributes Show params attributes object
-
key object
-
options object
Hide options attributes Show options attributes object
-
key string
-
-
-
script_score object
Hide script_score attributes Show script_score attributes object
-
boost number
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.
-
_name string
-
min_score number
Documents with a score lower than this floating point number are excluded from the search results.
-
Hide script attributes Show script attributes object
-
source string
The script source.
-
id string
-
params object
Specifies any named parameters that are passed into the script as variables. Use parameters instead of hard-coded values to decrease compile time.
Hide params attributes Show params attributes object
-
key object
-
options object
Hide options attributes Show options attributes object
-
key string
-
-
-
semantic object
Hide semantic attributes Show semantic attributes object
-
boost number
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.
-
_name string
-
The field to query, which must be a semantic_text field type
-
The query text
-
-
shape object
Hide shape attributes Show shape attributes object
-
boost number
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.
-
_name string
-
ignore_unmapped boolean
When set to
true
the query ignores an unmapped field and will not match any documents.
-
-
simple_query_string object
Hide simple_query_string attributes Show simple_query_string attributes object
-
boost number
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.
-
_name string
-
analyzer string
Analyzer used to convert text in the query string into tokens.
-
analyze_wildcard boolean
If
true
, the query attempts to analyze wildcard terms in the query string. -
If
true
, the parser creates a match_phrase query for each multi-position token. -
default_operator string
Values are
and
,AND
,or
, orOR
. -
fields array[string]
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
flags string
Query flags can be either a single flag or a combination of flags, e.g.
OR|AND|PREFIX
One of: Query flags can be either a single flag or a combination of flags, e.g.
OR|AND|PREFIX
Values are
NONE
,AND
,NOT
,OR
,PREFIX
,PHRASE
,PRECEDENCE
,ESCAPE
,WHITESPACE
,FUZZY
,NEAR
,SLOP
, orALL
.Query flags can be either a single flag or a combination of flags, e.g.
OR|AND|PREFIX
-
fuzzy_max_expansions number
Maximum number of terms to which the query expands for fuzzy matching.
-
fuzzy_prefix_length number
Number of beginning characters left unchanged for fuzzy matching.
-
fuzzy_transpositions boolean
If
true
, edits for fuzzy matching include transpositions of two adjacent characters (for example,ab
toba
). -
lenient boolean
If
true
, format-based errors, such as providing a text value for a numeric field, are ignored. minimum_should_match number | string
The minimum number of terms that should match as integer, percentage or range
-
Query string in the simple query string syntax you wish to parse and use for search.
-
quote_field_suffix string
Suffix appended to quoted text in the query string.
-
-
span_containing object
Hide span_containing attributes Show span_containing attributes object
-
boost number
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.
-
_name string
-
Hide big attributes Show big attributes object
-
span_field_masking object
Hide span_field_masking attributes Show span_field_masking attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
-
span_first object
Hide span_first attributes Show span_first attributes object
-
boost number
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.
-
_name string
-
Controls the maximum end position permitted in a match.
-
-
span_gap object
Can only be used as a clause in a span_near query.
Hide span_gap attributes Show span_gap attributes object
-
key number
-
span_multi object
Hide span_multi attributes Show span_multi attributes object
-
span_near object
Hide span_near attributes Show span_near attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
in_order boolean
Controls whether matches are required to be in-order.
-
slop number
Controls the maximum number of intervening unmatched positions permitted.
-
-
span_not object
Hide span_not attributes Show span_not attributes object
-
boost number
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.
-
_name string
-
dist number
The number of tokens from within the include span that can’t have overlap with the exclude span. Equivalent to setting both
pre
andpost
. -
post number
The number of tokens after the include span that can’t have overlap with the exclude span.
-
pre number
The number of tokens before the include span that can’t have overlap with the exclude span.
-
-
span_or object
Hide span_or attributes Show span_or attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
-
span_term object
The equivalent of the
term
query but for use with other span queries. -
span_within object
Hide span_within attributes Show span_within attributes object
-
Hide little attributes Show little attributes object
-
span_field_masking object
Hide span_field_masking attributes Show span_field_masking attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
-
span_first object
Hide span_first attributes Show span_first attributes object
-
boost number
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.
-
_name string
-
Controls the maximum end position permitted in a match.
-
-
span_gap object
Can only be used as a clause in a span_near query.
Hide span_gap attributes Show span_gap attributes object
-
key number
-
span_multi object
Hide span_multi attributes Show span_multi attributes object
-
span_near object
Hide span_near attributes Show span_near attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
in_order boolean
Controls whether matches are required to be in-order.
-
slop number
Controls the maximum number of intervening unmatched positions permitted.
-
-
span_not object
Hide span_not attributes Show span_not attributes object
-
boost number
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.
-
_name string
-
dist number
The number of tokens from within the include span that can’t have overlap with the exclude span. Equivalent to setting both
pre
andpost
. -
post number
The number of tokens after the include span that can’t have overlap with the exclude span.
-
pre number
The number of tokens before the include span that can’t have overlap with the exclude span.
-
-
span_or object
Hide span_or attributes Show span_or attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
-
span_term object
The equivalent of the
term
query but for use with other span queries. -
span_within object
Hide span_within attributes Show span_within attributes object
-
-
span_field_masking object
Hide span_field_masking attributes Show span_field_masking attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
Hide query attributes Show query attributes object
-
span_containing object
Hide span_containing attributes Show span_containing attributes object
-
span_first object
Hide span_first attributes Show span_first attributes object
-
boost number
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.
-
_name string
-
Controls the maximum end position permitted in a match.
-
-
span_gap object
Can only be used as a clause in a span_near query.
Hide span_gap attributes Show span_gap attributes object
-
key number
-
span_multi object
Hide span_multi attributes Show span_multi attributes object
-
span_near object
Hide span_near attributes Show span_near attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
in_order boolean
Controls whether matches are required to be in-order.
-
slop number
Controls the maximum number of intervening unmatched positions permitted.
-
-
span_not object
Hide span_not attributes Show span_not attributes object
-
boost number
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.
-
_name string
-
dist number
The number of tokens from within the include span that can’t have overlap with the exclude span. Equivalent to setting both
pre
andpost
. -
post number
The number of tokens after the include span that can’t have overlap with the exclude span.
-
pre number
The number of tokens before the include span that can’t have overlap with the exclude span.
-
-
span_or object
Hide span_or attributes Show span_or attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
-
span_term object
The equivalent of the
term
query but for use with other span queries. -
span_within object
Hide span_within attributes Show span_within attributes object
-
-
-
span_first object
Hide span_first attributes Show span_first attributes object
-
boost number
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.
-
_name string
-
Controls the maximum end position permitted in a match.
-
Hide match attributes Show match attributes object
-
span_containing object
Hide span_containing attributes Show span_containing attributes object
-
span_field_masking object
Hide span_field_masking attributes Show span_field_masking attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
-
span_gap object
Can only be used as a clause in a span_near query.
Hide span_gap attributes Show span_gap attributes object
-
key number
-
span_multi object
Hide span_multi attributes Show span_multi attributes object
-
span_near object
Hide span_near attributes Show span_near attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
in_order boolean
Controls whether matches are required to be in-order.
-
slop number
Controls the maximum number of intervening unmatched positions permitted.
-
-
span_not object
Hide span_not attributes Show span_not attributes object
-
boost number
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.
-
_name string
-
dist number
The number of tokens from within the include span that can’t have overlap with the exclude span. Equivalent to setting both
pre
andpost
. -
post number
The number of tokens after the include span that can’t have overlap with the exclude span.
-
pre number
The number of tokens before the include span that can’t have overlap with the exclude span.
-
-
span_or object
Hide span_or attributes Show span_or attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
-
span_term object
The equivalent of the
term
query but for use with other span queries. -
span_within object
Hide span_within attributes Show span_within attributes object
-
-
-
span_multi object
Hide span_multi attributes Show span_multi attributes object
-
span_near object
Hide span_near attributes Show span_near attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
Hide clauses attributes Show clauses attributes object
-
span_containing object
-
span_field_masking object
-
span_first object
-
span_gap object
Can only be used as a clause in a span_near query.
Hide span_gap attributes Show span_gap attributes object
-
key number
-
span_multi object
-
span_not object
-
span_or object
-
span_term object
The equivalent of the
term
query but for use with other span queries. -
span_within object
-
-
in_order boolean
Controls whether matches are required to be in-order.
-
slop number
Controls the maximum number of intervening unmatched positions permitted.
-
-
span_not object
Hide span_not attributes Show span_not attributes object
-
boost number
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.
-
_name string
-
dist number
The number of tokens from within the include span that can’t have overlap with the exclude span. Equivalent to setting both
pre
andpost
. -
Hide exclude attributes Show exclude attributes object
-
span_containing object
Hide span_containing attributes Show span_containing attributes object
-
span_field_masking object
Hide span_field_masking attributes Show span_field_masking attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
-
span_first object
Hide span_first attributes Show span_first attributes object
-
boost number
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.
-
_name string
-
Controls the maximum end position permitted in a match.
-
-
span_gap object
Can only be used as a clause in a span_near query.
Hide span_gap attributes Show span_gap attributes object
-
key number
-
span_multi object
Hide span_multi attributes Show span_multi attributes object
-
span_near object
Hide span_near attributes Show span_near attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
in_order boolean
Controls whether matches are required to be in-order.
-
slop number
Controls the maximum number of intervening unmatched positions permitted.
-
-
span_or object
Hide span_or attributes Show span_or attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
-
span_term object
The equivalent of the
term
query but for use with other span queries. -
span_within object
Hide span_within attributes Show span_within attributes object
-
-
Hide include attributes Show include attributes object
-
span_containing object
Hide span_containing attributes Show span_containing attributes object
-
span_field_masking object
Hide span_field_masking attributes Show span_field_masking attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
-
span_first object
Hide span_first attributes Show span_first attributes object
-
boost number
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.
-
_name string
-
Controls the maximum end position permitted in a match.
-
-
span_gap object
Can only be used as a clause in a span_near query.
Hide span_gap attributes Show span_gap attributes object
-
key number
-
span_multi object
Hide span_multi attributes Show span_multi attributes object
-
span_near object
Hide span_near attributes Show span_near attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
in_order boolean
Controls whether matches are required to be in-order.
-
slop number
Controls the maximum number of intervening unmatched positions permitted.
-
-
span_or object
Hide span_or attributes Show span_or attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
-
span_term object
The equivalent of the
term
query but for use with other span queries. -
span_within object
Hide span_within attributes Show span_within attributes object
-
-
post number
The number of tokens after the include span that can’t have overlap with the exclude span.
-
pre number
The number of tokens before the include span that can’t have overlap with the exclude span.
-
-
span_or object
Hide span_or attributes Show span_or attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
Hide clauses attributes Show clauses attributes object
-
span_containing object
-
span_field_masking object
-
span_first object
-
span_gap object
Can only be used as a clause in a span_near query.
Hide span_gap attributes Show span_gap attributes object
-
key number
-
span_multi object
-
span_near object
-
span_not object
-
span_term object
The equivalent of the
term
query but for use with other span queries. -
span_within object
-
-
-
span_term object
Matches spans containing a term.
-
span_within object
Hide span_within attributes Show span_within attributes object
-
boost number
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.
-
_name string
-
Hide big attributes Show big attributes object
-
span_containing object
Hide span_containing attributes Show span_containing attributes object
-
span_field_masking object
Hide span_field_masking attributes Show span_field_masking attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
-
span_first object
Hide span_first attributes Show span_first attributes object
-
boost number
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.
-
_name string
-
Controls the maximum end position permitted in a match.
-
-
span_gap object
Can only be used as a clause in a span_near query.
Hide span_gap attributes Show span_gap attributes object
-
key number
-
span_multi object
Hide span_multi attributes Show span_multi attributes object
-
span_near object
Hide span_near attributes Show span_near attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
in_order boolean
Controls whether matches are required to be in-order.
-
slop number
Controls the maximum number of intervening unmatched positions permitted.
-
-
span_not object
Hide span_not attributes Show span_not attributes object
-
boost number
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.
-
_name string
-
dist number
The number of tokens from within the include span that can’t have overlap with the exclude span. Equivalent to setting both
pre
andpost
. -
post number
The number of tokens after the include span that can’t have overlap with the exclude span.
-
pre number
The number of tokens before the include span that can’t have overlap with the exclude span.
-
-
span_or object
Hide span_or attributes Show span_or attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
-
span_term object
The equivalent of the
term
query but for use with other span queries.
-
-
Hide little attributes Show little attributes object
-
span_containing object
Hide span_containing attributes Show span_containing attributes object
-
span_field_masking object
Hide span_field_masking attributes Show span_field_masking attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
-
span_first object
Hide span_first attributes Show span_first attributes object
-
boost number
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.
-
_name string
-
Controls the maximum end position permitted in a match.
-
-
span_gap object
Can only be used as a clause in a span_near query.
Hide span_gap attributes Show span_gap attributes object
-
key number
-
span_multi object
Hide span_multi attributes Show span_multi attributes object
-
span_near object
Hide span_near attributes Show span_near attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
in_order boolean
Controls whether matches are required to be in-order.
-
slop number
Controls the maximum number of intervening unmatched positions permitted.
-
-
span_not object
Hide span_not attributes Show span_not attributes object
-
boost number
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.
-
_name string
-
dist number
The number of tokens from within the include span that can’t have overlap with the exclude span. Equivalent to setting both
pre
andpost
. -
post number
The number of tokens after the include span that can’t have overlap with the exclude span.
-
pre number
The number of tokens before the include span that can’t have overlap with the exclude span.
-
-
span_or object
Hide span_or attributes Show span_or attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
-
span_term object
The equivalent of the
term
query but for use with other span queries.
-
-
-
sparse_vector object
Hide sparse_vector attributes Show sparse_vector attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
query string
The query text you want to use for search. If inference_id is specified, query must also be specified.
-
prune boolean
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
-
pruning_config object
Hide pruning_config attributes Show pruning_config attributes object
-
tokens_freq_ratio_threshold number
Tokens whose frequency is more than this threshold times the average frequency of all tokens in the specified field are considered outliers and pruned.
-
tokens_weight_threshold number
Tokens whose weight is less than this threshold are considered nonsignificant and pruned.
-
only_score_pruned_tokens boolean
Whether to only score pruned tokens, vs only scoring kept tokens.
-
-
query_vector object
Dictionary of precomputed sparse vectors and their associated weights. Only one of inference_id or query_vector may be supplied in a request.
Hide query_vector attributes Show query_vector attributes object
-
key number
-
inference_id string
-
-
term object
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.
-
terms object
Hide terms attributes Show terms attributes object
-
terms_set object
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.
-
wildcard object
Returns documents that contain terms matching a wildcard pattern.
-
wrapper object
Hide wrapper attributes Show wrapper attributes object
-
boost number
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.
-
_name string
-
A base64 encoded query. The binary data format can be any of JSON, YAML, CBOR or SMILE encodings
-
-
type object
Hide type attributes Show type attributes object
-
-
profile boolean
-
query object
Hide query attributes Show query attributes object
-
bool object
Hide bool attributes Show bool attributes object
-
boost number
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.
-
_name string
filter object | array[object]
The clause (query) must appear in matching documents. However, unlike
must
, the score of the query will be ignored.minimum_should_match number | string
The minimum number of terms that should match as integer, percentage or range
must object | array[object]
The clause (query) must appear in matching documents and will contribute to the score.
must_not object | array[object]
The clause (query) must not appear in the matching documents. Because scoring is ignored, a score of
0
is returned for all documents.should object | array[object]
The clause (query) should appear in the matching document.
-
-
boosting object
Hide boosting attributes Show boosting attributes object
-
boost number
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.
-
_name string
-
Floating point number between 0 and 1.0 used to decrease the relevance scores of documents matching the
negative
query.
-
-
combined_fields object
Hide combined_fields attributes Show combined_fields attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
Text to search for in the provided
fields
. Thecombined_fields
query analyzes the provided text before performing a search. -
If true, match phrase queries are automatically created for multi-term synonyms.
-
operator string
Values are
or
orand
. minimum_should_match number | string
The minimum number of terms that should match as integer, percentage or range
-
zero_terms_query string
Values are
none
orall
.
-
-
constant_score object
Hide constant_score attributes Show constant_score attributes object
-
dis_max object
Hide dis_max attributes Show dis_max attributes object
-
boost number
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.
-
_name string
-
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.
-
tie_breaker number
Floating point number between 0 and 1.0 used to increase the relevance scores of documents matching multiple query clauses.
-
distance_feature object
One of: Hide attributes Show attributes
-
boost number
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.
-
_name string
-
Date or point of origin used to calculate distances. If the
field
value is adate
ordate_nanos
field, theorigin
value must be a date. Date Math, such asnow-1h
, is supported. If the field value is ageo_point
field, theorigin
value must be a geopoint. -
Distance from the
origin
at which relevance scores receive half of theboost
value. If thefield
value is adate
ordate_nanos
field, thepivot
value must be a time unit, such as1h
or10d
. If thefield
value is ageo_point
field, thepivot
value must be a distance unit, such as1km
or12m
. -
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
Hide attributes Show attributes
-
boost number
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.
-
_name string
origin object | array[number] | string Required
A latitude/longitude as a 2 dimensional point. It can be represented in various ways:
- as a
{lat, long}
object - as a geo hash value
- as a
[lon, lat]
array - as a string in
"<lat>, <lon>"
or WKT point formats
- as a
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
Hide attributes Show attributes
-
boost number
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.
-
_name string
-
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. -
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
-
exists object
Hide exists attributes Show exists attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
-
function_score object
Hide function_score attributes Show function_score attributes object
-
boost number
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.
-
_name string
-
boost_mode string
Values are
multiply
,replace
,sum
,avg
,max
, ormin
. -
functions array[object]
One or more functions that compute a new score for each document returned by the query.
Hide functions attributes Show functions attributes object
-
filter object
-
weight number
-
field_value_factor object
-
random_score object
-
script_score object
-
-
max_boost number
Restricts the new score to not exceed the provided limit.
-
min_score number
Excludes documents that do not meet the provided score threshold.
-
query object
-
score_mode string
Values are
multiply
,sum
,avg
,first
,max
, ormin
.
-
-
fuzzy object
Returns documents that contain terms similar to the search term, as measured by a Levenshtein edit distance.
-
geo_bounding_box object
Hide geo_bounding_box attributes Show geo_bounding_box attributes object
-
boost number
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.
-
_name string
-
type string
Values are
memory
orindexed
. -
validation_method string
Values are
coerce
,ignore_malformed
, orstrict
. -
ignore_unmapped boolean
Set to
true
to ignore an unmapped field and not match any documents for this query. Set tofalse
to throw an exception if the field is not mapped.
-
-
geo_distance object
Hide geo_distance attributes Show geo_distance attributes object
-
boost number
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.
-
_name string
-
distance_type string
Values are
arc
orplane
. -
validation_method string
Values are
coerce
,ignore_malformed
, orstrict
. -
ignore_unmapped boolean
Set to
true
to ignore an unmapped field and not match any documents for this query. Set tofalse
to throw an exception if the field is not mapped.
-
-
geo_polygon object
Hide geo_polygon attributes Show geo_polygon attributes object
-
boost number
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.
-
_name string
-
validation_method string
Values are
coerce
,ignore_malformed
, orstrict
. -
ignore_unmapped boolean
-
-
geo_shape object
Hide geo_shape attributes Show geo_shape attributes object
-
boost number
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.
-
_name string
-
ignore_unmapped boolean
Set to
true
to ignore an unmapped field and not match any documents for this query. Set tofalse
to throw an exception if the field is not mapped.
-
-
has_child object
Hide has_child attributes Show has_child attributes object
-
boost number
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.
-
_name string
-
ignore_unmapped boolean
Indicates whether to ignore an unmapped
type
and not return any documents instead of an error. -
inner_hits object
Hide inner_hits attributes Show inner_hits attributes object
-
name string
-
size number
The maximum number of hits to return per
inner_hits
. -
from number
Inner hit starting document offset.
-
collapse object
Hide collapse attributes Show collapse attributes object
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
inner_hits object | array[object]
The number of inner hits and their sort order
-
The number of concurrent requests allowed to retrieve the inner_hits per group
-
collapse object
-
-
docvalue_fields array[object]
Hide docvalue_fields attributes Show docvalue_fields attributes object
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
format string
Format in which the values are returned.
-
include_unmapped boolean
-
-
explain boolean
-
highlight object
Hide highlight attributes Show highlight attributes object
-
boundary_chars string
A string that contains each boundary character.
-
boundary_max_scan number
How far to scan for boundary characters.
-
boundary_scanner string
Values are
chars
,sentence
, orword
. -
boundary_scanner_locale string
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"
. -
fragmenter string
Values are
simple
orspan
. -
fragment_size number
The size of the highlighted fragment in characters.
-
highlight_filter boolean
-
highlight_query object
-
max_fragment_length number
-
max_analyzed_offset number
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_offset
query setting does not override theindex.highlight.max_analyzed_offset
setting, which prevails when it’s set to lower value than the query setting. -
no_match_size number
The amount of text you want to return from the beginning of the field if there are no matching fragments to highlight.
-
number_of_fragments number
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_fragments
is0
,fragment_size
is ignored. -
options object
-
order string
Value is
score
. -
phrase_limit number
Controls the number of matching phrases in a document that are considered. Prevents the
fvh
highlighter from analyzing too many phrases and consuming too much memory. When usingmatched_fields
,phrase_limit
phrases per matched field are considered. Raising the limit increases query time and consumes more memory. Only supported by thefvh
highlighter. -
post_tags array[string]
Use in conjunction with
pre_tags
to define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>
and</em>
tags. -
pre_tags array[string]
Use in conjunction with
post_tags
to define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>
and</em>
tags. -
require_field_match boolean
By default, only fields that contains a query match are highlighted. Set to
false
to highlight all fields. -
tags_schema string
Value is
styled
. -
encoder string
Values are
default
orhtml
.
-
ignore_unmapped boolean
-
script_fields object
Hide script_fields attributes Show script_fields attributes object
-
ignore_failure boolean
-
seq_no_primary_term boolean
-
fields string | array[string]
-
stored_fields string | array[string]
-
track_scores boolean
-
version boolean
-
-
max_children number
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.
-
min_children number
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.
-
score_mode string
Values are
none
,avg
,sum
,max
, ormin
.
-
-
has_parent object
Hide has_parent attributes Show has_parent attributes object
-
boost number
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.
-
_name string
-
ignore_unmapped boolean
Indicates whether to ignore an unmapped
parent_type
and not return any documents instead of an error. You can use this parameter to query multiple indices that may not contain theparent_type
. -
inner_hits object
Hide inner_hits attributes Show inner_hits attributes object
-
name string
-
size number
The maximum number of hits to return per
inner_hits
. -
from number
Inner hit starting document offset.
-
collapse object
Hide collapse attributes Show collapse attributes object
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
inner_hits object | array[object]
The number of inner hits and their sort order
-
The number of concurrent requests allowed to retrieve the inner_hits per group
-
collapse object
-
-
docvalue_fields array[object]
Hide docvalue_fields attributes Show docvalue_fields attributes object
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
format string
Format in which the values are returned.
-
include_unmapped boolean
-
-
explain boolean
-
highlight object
Hide highlight attributes Show highlight attributes object
-
boundary_chars string
A string that contains each boundary character.
-
boundary_max_scan number
How far to scan for boundary characters.
-
boundary_scanner string
Values are
chars
,sentence
, orword
. -
boundary_scanner_locale string
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"
. -
fragmenter string
Values are
simple
orspan
. -
fragment_size number
The size of the highlighted fragment in characters.
-
highlight_filter boolean
-
highlight_query object
-
max_fragment_length number
-
max_analyzed_offset number
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_offset
query setting does not override theindex.highlight.max_analyzed_offset
setting, which prevails when it’s set to lower value than the query setting. -
no_match_size number
The amount of text you want to return from the beginning of the field if there are no matching fragments to highlight.
-
number_of_fragments number
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_fragments
is0
,fragment_size
is ignored. -
options object
-
order string
Value is
score
. -
phrase_limit number
Controls the number of matching phrases in a document that are considered. Prevents the
fvh
highlighter from analyzing too many phrases and consuming too much memory. When usingmatched_fields
,phrase_limit
phrases per matched field are considered. Raising the limit increases query time and consumes more memory. Only supported by thefvh
highlighter. -
post_tags array[string]
Use in conjunction with
pre_tags
to define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>
and</em>
tags. -
pre_tags array[string]
Use in conjunction with
post_tags
to define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>
and</em>
tags. -
require_field_match boolean
By default, only fields that contains a query match are highlighted. Set to
false
to highlight all fields. -
tags_schema string
Value is
styled
. -
encoder string
Values are
default
orhtml
.
-
ignore_unmapped boolean
-
script_fields object
Hide script_fields attributes Show script_fields attributes object
-
ignore_failure boolean
-
seq_no_primary_term boolean
-
fields string | array[string]
-
stored_fields string | array[string]
-
track_scores boolean
-
version boolean
-
-
score boolean
Indicates whether the relevance score of a matching parent document is aggregated into its child documents.
-
-
ids object
Hide ids attributes Show ids attributes object
-
boost number
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.
-
_name string
values string | array[string]
-
-
intervals object
Returns documents based on the order and proximity of matching terms.
-
knn object
Hide knn attributes Show knn attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
query_vector array[number]
-
query_vector_builder object
Hide query_vector_builder attribute Show query_vector_builder attribute object
-
text_embedding object
Hide text_embedding attributes Show text_embedding attributes object
-
-
num_candidates number
The number of nearest neighbor candidates to consider per shard
-
k number
The final number of nearest neighbors to return as top hits
filter object | array[object]
Filters for the kNN search query
-
similarity number
The minimum similarity for a vector to be considered a match
-
-
match object
Returns documents that match a provided text, number, date or boolean value. The provided text is analyzed before matching.
-
match_all object
Hide match_all attributes Show match_all attributes object
-
match_bool_prefix object
Analyzes its input and constructs a
bool
query from the terms. Each term except the last is used in aterm
query. The last term is used in a prefix query. -
match_none object
Hide match_none attributes Show match_none attributes object
-
match_phrase object
Analyzes the text and creates a phrase query out of the analyzed text.
-
match_phrase_prefix object
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.
-
more_like_this object
Hide more_like_this attributes Show more_like_this attributes object
-
boost number
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.
-
_name string
-
analyzer string
The analyzer that is used to analyze the free form text. Defaults to the analyzer associated with the first field in fields.
-
boost_terms number
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).
-
fail_on_unsupported_field boolean
Controls whether the query should fail (throw an exception) if any of the specified fields are not of the supported types (
text
orkeyword
). -
fields array[string]
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
include boolean
Specifies whether the input documents should also be included in the search results returned.
like string | object | array[string | object]
Specifies free form text and/or a single or multiple documents for which you want to find similar documents.
One of: Hide attributes Show attributes
-
doc object
A document not present in the index.
-
fields array[string]
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
_id string
-
_index string
-
per_field_analyzer object
Overrides the default analyzer.
-
routing string
-
version number
-
version_type string
Values are
internal
,external
,external_gte
, orforce
.
Text that we want similar documents for or a lookup to a document's field for the text.
-
-
max_doc_freq number
The maximum document frequency above which the terms are ignored from the input document.
-
max_query_terms number
The maximum number of query terms that can be selected.
-
max_word_length number
The maximum word length above which the terms are ignored. Defaults to unbounded (
0
). -
min_doc_freq number
The minimum document frequency below which the terms are ignored from the input document.
minimum_should_match number | string
The minimum number of terms that should match as integer, percentage or range
-
min_term_freq number
The minimum term frequency below which the terms are ignored from the input document.
-
min_word_length number
The minimum word length below which the terms are ignored.
-
routing string
stop_words string | array[string]
Language value, such as arabic or thai. Defaults to english. Each language value corresponds to a predefined list of stop words in Lucene. See Stop words by language for supported language values and their stop words. Also accepts an array of stop words.
unlike string | object | array[string | object]
Used in combination with
like
to exclude documents that match a set of terms.One of: Hide attributes Show attributes
-
doc object
A document not present in the index.
-
fields array[string]
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
_id string
-
_index string
-
per_field_analyzer object
Overrides the default analyzer.
-
routing string
-
version number
-
version_type string
Values are
internal
,external
,external_gte
, orforce
.
Text that we want similar documents for or a lookup to a document's field for the text.
-
-
version number
-
version_type string
Values are
internal
,external
,external_gte
, orforce
.
-
-
multi_match object
Hide multi_match attributes Show multi_match attributes object
-
boost number
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.
-
_name string
-
analyzer string
Analyzer used to convert the text in the query value into tokens.
-
If
true
, match phrase queries are automatically created for multi-term synonyms. -
fields string | array[string]
fuzziness string | number
-
fuzzy_rewrite string
-
fuzzy_transpositions boolean
If
true
, edits for fuzzy matching include transpositions of two adjacent characters (for example,ab
toba
). Can be applied to the term subqueries constructed for all terms but the final term. -
lenient boolean
If
true
, format-based errors, such as providing a text query value for a numeric field, are ignored. -
max_expansions number
Maximum number of terms to which the query will expand.
minimum_should_match number | string
The minimum number of terms that should match as integer, percentage or range
-
operator string
Values are
and
,AND
,or
, orOR
. -
prefix_length number
Number of beginning characters left unchanged for fuzzy matching.
-
Text, number, boolean value or date you wish to find in the provided field.
-
slop number
Maximum number of positions allowed between matching tokens.
-
tie_breaker number
Determines how scores for each per-term blended query and scores across groups are combined.
-
type string
Values are
best_fields
,most_fields
,cross_fields
,phrase
,phrase_prefix
, orbool_prefix
. -
zero_terms_query string
Values are
all
ornone
.
-
-
nested object
Hide nested attributes Show nested attributes object
-
boost number
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.
-
_name string
-
ignore_unmapped boolean
Indicates whether to ignore an unmapped path and not return any documents instead of an error.
-
inner_hits object
Hide inner_hits attributes Show inner_hits attributes object
-
name string
-
size number
The maximum number of hits to return per
inner_hits
. -
from number
Inner hit starting document offset.
-
collapse object
Hide collapse attributes Show collapse attributes object
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
inner_hits object | array[object]
The number of inner hits and their sort order
-
The number of concurrent requests allowed to retrieve the inner_hits per group
-
collapse object
-
-
docvalue_fields array[object]
Hide docvalue_fields attributes Show docvalue_fields attributes object
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
format string
Format in which the values are returned.
-
include_unmapped boolean
-
-
explain boolean
-
highlight object
Hide highlight attributes Show highlight attributes object
-
boundary_chars string
A string that contains each boundary character.
-
boundary_max_scan number
How far to scan for boundary characters.
-
boundary_scanner string
Values are
chars
,sentence
, orword
. -
boundary_scanner_locale string
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"
. -
fragmenter string
Values are
simple
orspan
. -
fragment_size number
The size of the highlighted fragment in characters.
-
highlight_filter boolean
-
highlight_query object
-
max_fragment_length number
-
max_analyzed_offset number
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_offset
query setting does not override theindex.highlight.max_analyzed_offset
setting, which prevails when it’s set to lower value than the query setting. -
no_match_size number
The amount of text you want to return from the beginning of the field if there are no matching fragments to highlight.
-
number_of_fragments number
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_fragments
is0
,fragment_size
is ignored. -
options object
-
order string
Value is
score
. -
phrase_limit number
Controls the number of matching phrases in a document that are considered. Prevents the
fvh
highlighter from analyzing too many phrases and consuming too much memory. When usingmatched_fields
,phrase_limit
phrases per matched field are considered. Raising the limit increases query time and consumes more memory. Only supported by thefvh
highlighter. -
post_tags array[string]
Use in conjunction with
pre_tags
to define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>
and</em>
tags. -
pre_tags array[string]
Use in conjunction with
post_tags
to define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>
and</em>
tags. -
require_field_match boolean
By default, only fields that contains a query match are highlighted. Set to
false
to highlight all fields. -
tags_schema string
Value is
styled
. -
encoder string
Values are
default
orhtml
.
-
ignore_unmapped boolean
-
script_fields object
Hide script_fields attributes Show script_fields attributes object
-
ignore_failure boolean
-
seq_no_primary_term boolean
-
fields string | array[string]
-
stored_fields string | array[string]
-
track_scores boolean
-
version boolean
-
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
score_mode string
Values are
none
,avg
,sum
,max
, ormin
.
-
-
parent_id object
Hide parent_id attributes Show parent_id attributes object
-
boost number
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.
-
_name string
-
id string
-
ignore_unmapped boolean
Indicates whether to ignore an unmapped
type
and not return any documents instead of an error. -
type string
-
-
percolate object
Hide percolate attributes Show percolate attributes object
-
boost number
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.
-
_name string
-
document object
The source of the document being percolated.
-
documents array[object]
An array of sources of the documents being percolated.
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
id string
-
index string
-
name string
The suffix used for the
_percolator_document_slot
field when multiplepercolate
queries are specified. -
preference string
Preference used to fetch document to percolate.
-
routing string
-
version number
-
-
pinned object
Hide pinned attributes Show pinned attributes object
-
boost number
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.
-
_name string
-
ids array[string]
Document IDs listed in the order they are to appear in results. Required if
docs
is not specified. -
docs array[object]
Documents listed in the order they are to appear in results. Required if
ids
is not specified.
-
-
prefix object
Returns documents that contain a specific prefix in a provided field.
-
query_string object
Hide query_string attributes Show query_string attributes object
-
boost number
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.
-
_name string
-
allow_leading_wildcard boolean
If
true
, the wildcard characters*
and?
are allowed as the first character of the query string. -
analyzer string
Analyzer used to convert text in the query string into tokens.
-
analyze_wildcard boolean
If
true
, the query attempts to analyze wildcard terms in the query string. -
If
true
, match phrase queries are automatically created for multi-term synonyms. -
default_field string
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
default_operator string
Values are
and
,AND
,or
, orOR
. -
enable_position_increments boolean
If
true
, enable position increments in queries constructed from aquery_string
search. -
escape boolean
-
fields array[string]
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
fuzziness string | number
-
fuzzy_max_expansions number
Maximum number of terms to which the query expands for fuzzy matching.
-
fuzzy_prefix_length number
Number of beginning characters left unchanged for fuzzy matching.
-
fuzzy_rewrite string
-
fuzzy_transpositions boolean
If
true
, edits for fuzzy matching include transpositions of two adjacent characters (for example,ab
toba
). -
lenient boolean
If
true
, format-based errors, such as providing a text value for a numeric field, are ignored. -
max_determinized_states number
Maximum number of automaton states required for the query.
minimum_should_match number | string
The minimum number of terms that should match as integer, percentage or range
-
phrase_slop number
Maximum number of positions allowed between matching tokens for phrases.
-
Query string you wish to parse and use for search.
-
quote_analyzer string
Analyzer used to convert quoted text in the query string into tokens. For quoted text, this parameter overrides the analyzer specified in the
analyzer
parameter. -
quote_field_suffix string
Suffix appended to quoted text in the query string. You can use this suffix to use a different analysis method for exact matches.
-
rewrite string
-
tie_breaker number
How to combine the queries generated from the individual search terms in the resulting
dis_max
query. -
time_zone string
-
type string
Values are
best_fields
,most_fields
,cross_fields
,phrase
,phrase_prefix
, orbool_prefix
.
-
-
range object
Returns documents that contain terms within a provided range.
-
rank_feature object
Hide rank_feature attributes Show rank_feature attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
saturation object
Hide saturation attribute Show saturation attribute object
-
pivot number
Configurable pivot value so that the result will be less than 0.5.
-
-
log object
Hide log attribute Show log attribute object
-
Configurable scaling factor.
-
-
linear object
-
sigmoid object
-
-
regexp object
Returns documents that contain terms matching a regular expression.
-
rule object
Hide rule attributes Show rule attributes object
-
script object
Hide script attributes Show script attributes object
-
boost number
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.
-
_name string
-
Hide script attributes Show script attributes object
-
source string
The script source.
-
id string
-
params object
Specifies any named parameters that are passed into the script as variables. Use parameters instead of hard-coded values to decrease compile time.
Hide params attributes Show params attributes object
-
key object
-
options object
Hide options attributes Show options attributes object
-
key string
-
-
-
script_score object
Hide script_score attributes Show script_score attributes object
-
boost number
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.
-
_name string
-
min_score number
Documents with a score lower than this floating point number are excluded from the search results.
-
Hide script attributes Show script attributes object
-
source string
The script source.
-
id string
-
params object
Specifies any named parameters that are passed into the script as variables. Use parameters instead of hard-coded values to decrease compile time.
Hide params attributes Show params attributes object
-
key object
-
options object
Hide options attributes Show options attributes object
-
key string
-
-
-
semantic object
Hide semantic attributes Show semantic attributes object
-
boost number
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.
-
_name string
-
The field to query, which must be a semantic_text field type
-
The query text
-
-
shape object
Hide shape attributes Show shape attributes object
-
boost number
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.
-
_name string
-
ignore_unmapped boolean
When set to
true
the query ignores an unmapped field and will not match any documents.
-
-
simple_query_string object
Hide simple_query_string attributes Show simple_query_string attributes object
-
boost number
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.
-
_name string
-
analyzer string
Analyzer used to convert text in the query string into tokens.
-
analyze_wildcard boolean
If
true
, the query attempts to analyze wildcard terms in the query string. -
If
true
, the parser creates a match_phrase query for each multi-position token. -
default_operator string
Values are
and
,AND
,or
, orOR
. -
fields array[string]
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
flags string
Query flags can be either a single flag or a combination of flags, e.g.
OR|AND|PREFIX
One of: Query flags can be either a single flag or a combination of flags, e.g.
OR|AND|PREFIX
Values are
NONE
,AND
,NOT
,OR
,PREFIX
,PHRASE
,PRECEDENCE
,ESCAPE
,WHITESPACE
,FUZZY
,NEAR
,SLOP
, orALL
.Query flags can be either a single flag or a combination of flags, e.g.
OR|AND|PREFIX
-
fuzzy_max_expansions number
Maximum number of terms to which the query expands for fuzzy matching.
-
fuzzy_prefix_length number
Number of beginning characters left unchanged for fuzzy matching.
-
fuzzy_transpositions boolean
If
true
, edits for fuzzy matching include transpositions of two adjacent characters (for example,ab
toba
). -
lenient boolean
If
true
, format-based errors, such as providing a text value for a numeric field, are ignored. minimum_should_match number | string
The minimum number of terms that should match as integer, percentage or range
-
Query string in the simple query string syntax you wish to parse and use for search.
-
quote_field_suffix string
Suffix appended to quoted text in the query string.
-
-
span_containing object
Hide span_containing attributes Show span_containing attributes object
-
boost number
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.
-
_name string
-
Hide big attributes Show big attributes object
-
span_field_masking object
Hide span_field_masking attributes Show span_field_masking attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
-
span_first object
Hide span_first attributes Show span_first attributes object
-
boost number
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.
-
_name string
-
Controls the maximum end position permitted in a match.
-
-
span_gap object
Can only be used as a clause in a span_near query.
Hide span_gap attributes Show span_gap attributes object
-
key number
-
span_multi object
Hide span_multi attributes Show span_multi attributes object
-
span_near object
Hide span_near attributes Show span_near attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
in_order boolean
Controls whether matches are required to be in-order.
-
slop number
Controls the maximum number of intervening unmatched positions permitted.
-
-
span_not object
Hide span_not attributes Show span_not attributes object
-
boost number
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.
-
_name string
-
dist number
The number of tokens from within the include span that can’t have overlap with the exclude span. Equivalent to setting both
pre
andpost
. -
post number
The number of tokens after the include span that can’t have overlap with the exclude span.
-
pre number
The number of tokens before the include span that can’t have overlap with the exclude span.
-
-
span_or object
Hide span_or attributes Show span_or attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
-
span_term object
The equivalent of the
term
query but for use with other span queries. -
span_within object
Hide span_within attributes Show span_within attributes object
-
Hide little attributes Show little attributes object
-
span_field_masking object
Hide span_field_masking attributes Show span_field_masking attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
-
span_first object
Hide span_first attributes Show span_first attributes object
-
boost number
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.
-
_name string
-
Controls the maximum end position permitted in a match.
-
-
span_gap object
Can only be used as a clause in a span_near query.
Hide span_gap attributes Show span_gap attributes object
-
key number
-
span_multi object
Hide span_multi attributes Show span_multi attributes object
-
span_near object
Hide span_near attributes Show span_near attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
in_order boolean
Controls whether matches are required to be in-order.
-
slop number
Controls the maximum number of intervening unmatched positions permitted.
-
-
span_not object
Hide span_not attributes Show span_not attributes object
-
boost number
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.
-
_name string
-
dist number
The number of tokens from within the include span that can’t have overlap with the exclude span. Equivalent to setting both
pre
andpost
. -
post number
The number of tokens after the include span that can’t have overlap with the exclude span.
-
pre number
The number of tokens before the include span that can’t have overlap with the exclude span.
-
-
span_or object
Hide span_or attributes Show span_or attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
-
span_term object
The equivalent of the
term
query but for use with other span queries. -
span_within object
Hide span_within attributes Show span_within attributes object
-
-
span_field_masking object
Hide span_field_masking attributes Show span_field_masking attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
Hide query attributes Show query attributes object
-
span_containing object
Hide span_containing attributes Show span_containing attributes object
-
span_first object
Hide span_first attributes Show span_first attributes object
-
boost number
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.
-
_name string
-
Controls the maximum end position permitted in a match.
-
-
span_gap object
Can only be used as a clause in a span_near query.
Hide span_gap attributes Show span_gap attributes object
-
key number
-
span_multi object
Hide span_multi attributes Show span_multi attributes object
-
span_near object
Hide span_near attributes Show span_near attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
in_order boolean
Controls whether matches are required to be in-order.
-
slop number
Controls the maximum number of intervening unmatched positions permitted.
-
-
span_not object
Hide span_not attributes Show span_not attributes object
-
boost number
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.
-
_name string
-
dist number
The number of tokens from within the include span that can’t have overlap with the exclude span. Equivalent to setting both
pre
andpost
. -
post number
The number of tokens after the include span that can’t have overlap with the exclude span.
-
pre number
The number of tokens before the include span that can’t have overlap with the exclude span.
-
-
span_or object
Hide span_or attributes Show span_or attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
-
span_term object
The equivalent of the
term
query but for use with other span queries. -
span_within object
Hide span_within attributes Show span_within attributes object
-
-
-
span_first object
Hide span_first attributes Show span_first attributes object
-
boost number
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.
-
_name string
-
Controls the maximum end position permitted in a match.
-
Hide match attributes Show match attributes object
-
span_containing object
Hide span_containing attributes Show span_containing attributes object
-
span_field_masking object
Hide span_field_masking attributes Show span_field_masking attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
-
span_gap object
Can only be used as a clause in a span_near query.
Hide span_gap attributes Show span_gap attributes object
-
key number
-
span_multi object
Hide span_multi attributes Show span_multi attributes object
-
span_near object
Hide span_near attributes Show span_near attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
in_order boolean
Controls whether matches are required to be in-order.
-
slop number
Controls the maximum number of intervening unmatched positions permitted.
-
-
span_not object
Hide span_not attributes Show span_not attributes object
-
boost number
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.
-
_name string
-
dist number
The number of tokens from within the include span that can’t have overlap with the exclude span. Equivalent to setting both
pre
andpost
. -
post number
The number of tokens after the include span that can’t have overlap with the exclude span.
-
pre number
The number of tokens before the include span that can’t have overlap with the exclude span.
-
-
span_or object
Hide span_or attributes Show span_or attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
-
span_term object
The equivalent of the
term
query but for use with other span queries. -
span_within object
Hide span_within attributes Show span_within attributes object
-
-
-
span_multi object
Hide span_multi attributes Show span_multi attributes object
-
span_near object
Hide span_near attributes Show span_near attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
Hide clauses attributes Show clauses attributes object
-
span_containing object
-
span_field_masking object
-
span_first object
-
span_gap object
Can only be used as a clause in a span_near query.
Hide span_gap attributes Show span_gap attributes object
-
key number
-
span_multi object
-
span_not object
-
span_or object
-
span_term object
The equivalent of the
term
query but for use with other span queries. -
span_within object
-
-
in_order boolean
Controls whether matches are required to be in-order.
-
slop number
Controls the maximum number of intervening unmatched positions permitted.
-
-
span_not object
Hide span_not attributes Show span_not attributes object
-
boost number
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.
-
_name string
-
dist number
The number of tokens from within the include span that can’t have overlap with the exclude span. Equivalent to setting both
pre
andpost
. -
Hide exclude attributes Show exclude attributes object
-
span_containing object
Hide span_containing attributes Show span_containing attributes object
-
span_field_masking object
Hide span_field_masking attributes Show span_field_masking attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
-
span_first object
Hide span_first attributes Show span_first attributes object
-
boost number
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.
-
_name string
-
Controls the maximum end position permitted in a match.
-
-
span_gap object
Can only be used as a clause in a span_near query.
Hide span_gap attributes Show span_gap attributes object
-
key number
-
span_multi object
Hide span_multi attributes Show span_multi attributes object
-
span_near object
Hide span_near attributes Show span_near attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
in_order boolean
Controls whether matches are required to be in-order.
-
slop number
Controls the maximum number of intervening unmatched positions permitted.
-
-
span_or object
Hide span_or attributes Show span_or attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
-
span_term object
The equivalent of the
term
query but for use with other span queries. -
span_within object
Hide span_within attributes Show span_within attributes object
-
-
Hide include attributes Show include attributes object
-
span_containing object
Hide span_containing attributes Show span_containing attributes object
-
span_field_masking object
Hide span_field_masking attributes Show span_field_masking attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
-
span_first object
Hide span_first attributes Show span_first attributes object
-
boost number
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.
-
_name string
-
Controls the maximum end position permitted in a match.
-
-
span_gap object
Can only be used as a clause in a span_near query.
Hide span_gap attributes Show span_gap attributes object
-
key number
-
span_multi object
Hide span_multi attributes Show span_multi attributes object
-
span_near object
Hide span_near attributes Show span_near attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
in_order boolean
Controls whether matches are required to be in-order.
-
slop number
Controls the maximum number of intervening unmatched positions permitted.
-
-
span_or object
Hide span_or attributes Show span_or attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
-
span_term object
The equivalent of the
term
query but for use with other span queries. -
span_within object
Hide span_within attributes Show span_within attributes object
-
-
post number
The number of tokens after the include span that can’t have overlap with the exclude span.
-
pre number
The number of tokens before the include span that can’t have overlap with the exclude span.
-
-
span_or object
Hide span_or attributes Show span_or attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
Hide clauses attributes Show clauses attributes object
-
span_containing object
-
span_field_masking object
-
span_first object
-
span_gap object
Can only be used as a clause in a span_near query.
Hide span_gap attributes Show span_gap attributes object
-
key number
-
span_multi object
-
span_near object
-
span_not object
-
span_term object
The equivalent of the
term
query but for use with other span queries. -
span_within object
-
-
-
span_term object
Matches spans containing a term.
-
span_within object
Hide span_within attributes Show span_within attributes object
-
boost number
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.
-
_name string
-
Hide big attributes Show big attributes object
-
span_containing object
Hide span_containing attributes Show span_containing attributes object
-
span_field_masking object
Hide span_field_masking attributes Show span_field_masking attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
-
span_first object
Hide span_first attributes Show span_first attributes object
-
boost number
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.
-
_name string
-
Controls the maximum end position permitted in a match.
-
-
span_gap object
Can only be used as a clause in a span_near query.
Hide span_gap attributes Show span_gap attributes object
-
key number
-
span_multi object
Hide span_multi attributes Show span_multi attributes object
-
span_near object
Hide span_near attributes Show span_near attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
in_order boolean
Controls whether matches are required to be in-order.
-
slop number
Controls the maximum number of intervening unmatched positions permitted.
-
-
span_not object
Hide span_not attributes Show span_not attributes object
-
boost number
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.
-
_name string
-
dist number
The number of tokens from within the include span that can’t have overlap with the exclude span. Equivalent to setting both
pre
andpost
. -
post number
The number of tokens after the include span that can’t have overlap with the exclude span.
-
pre number
The number of tokens before the include span that can’t have overlap with the exclude span.
-
-
span_or object
Hide span_or attributes Show span_or attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
-
span_term object
The equivalent of the
term
query but for use with other span queries.
-
-
Hide little attributes Show little attributes object
-
span_containing object
Hide span_containing attributes Show span_containing attributes object
-
span_field_masking object
Hide span_field_masking attributes Show span_field_masking attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
-
span_first object
Hide span_first attributes Show span_first attributes object
-
boost number
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.
-
_name string
-
Controls the maximum end position permitted in a match.
-
-
span_gap object
Can only be used as a clause in a span_near query.
Hide span_gap attributes Show span_gap attributes object
-
key number
-
span_multi object
Hide span_multi attributes Show span_multi attributes object
-
span_near object
Hide span_near attributes Show span_near attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
in_order boolean
Controls whether matches are required to be in-order.
-
slop number
Controls the maximum number of intervening unmatched positions permitted.
-
-
span_not object
Hide span_not attributes Show span_not attributes object
-
boost number
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.
-
_name string
-
dist number
The number of tokens from within the include span that can’t have overlap with the exclude span. Equivalent to setting both
pre
andpost
. -
post number
The number of tokens after the include span that can’t have overlap with the exclude span.
-
pre number
The number of tokens before the include span that can’t have overlap with the exclude span.
-
-
span_or object
Hide span_or attributes Show span_or attributes object
-
boost number
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.
-
_name string
-
Array of one or more other span type queries.
-
-
span_term object
The equivalent of the
term
query but for use with other span queries.
-
-
-
sparse_vector object
Hide sparse_vector attributes Show sparse_vector attributes object
-
boost number
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.
-
_name string
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
query string
The query text you want to use for search. If inference_id is specified, query must also be specified.
-
prune boolean
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
-
pruning_config object
Hide pruning_config attributes Show pruning_config attributes object
-
tokens_freq_ratio_threshold number
Tokens whose frequency is more than this threshold times the average frequency of all tokens in the specified field are considered outliers and pruned.
-
tokens_weight_threshold number
Tokens whose weight is less than this threshold are considered nonsignificant and pruned.
-
only_score_pruned_tokens boolean
Whether to only score pruned tokens, vs only scoring kept tokens.
-
-
query_vector object
Dictionary of precomputed sparse vectors and their associated weights. Only one of inference_id or query_vector may be supplied in a request.
Hide query_vector attributes Show query_vector attributes object
-
key number
-
inference_id string
-
-
term object
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.
-
terms object
Hide terms attributes Show terms attributes object
-
terms_set object
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.
-
wildcard object
Returns documents that contain terms matching a wildcard pattern.
-
wrapper object
Hide wrapper attributes Show wrapper attributes object
-
boost number
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.
-
_name string
-
A base64 encoded query. The binary data format can be any of JSON, YAML, CBOR or SMILE encodings
-
-
type object
Hide type attributes Show type attributes object
-
rescore object | array[object]
One of: Hide attributes Show attributes
-
window_size number
-
query object
Hide query attributes Show query attributes object
-
Hide rescore_query attributes Show rescore_query attributes object
-
bool object
-
boosting object
-
combined_fields object
-
constant_score object
-
dis_max object
-
exists object
-
function_score object
-
fuzzy object
Returns documents that contain terms similar to the search term, as measured by a Levenshtein edit distance.
-
geo_bounding_box object
-
geo_distance object
-
geo_polygon object
-
geo_shape object
-
has_child object
-
has_parent object
-
ids object
-
intervals object
Returns documents based on the order and proximity of matching terms.
-
knn object
-
match object
Returns documents that match a provided text, number, date or boolean value. The provided text is analyzed before matching.
-
match_all object
-
match_bool_prefix object
Analyzes its input and constructs a
bool
query from the terms. Each term except the last is used in aterm
query. The last term is used in a prefix query. -
match_none object
-
match_phrase object
Analyzes the text and creates a phrase query out of the analyzed text.
-
match_phrase_prefix object
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.
-
more_like_this object
-
multi_match object
-
nested object
-
parent_id object
-
percolate object
-
prefix object
Returns documents that contain a specific prefix in a provided field.
-
query_string object
-
range object
Returns documents that contain terms within a provided range.
-
rank_feature object
-
regexp object
Returns documents that contain terms matching a regular expression.
-
rule object
-
script object
-
script_score object
-
semantic object
-
shape object
-
simple_query_string object
-
span_containing object
-
span_field_masking object
-
span_first object
-
span_multi object
-
span_near object
-
span_not object
-
span_or object
-
span_term object
Matches spans containing a term.
-
span_within object
-
term object
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.
-
terms object
-
terms_set object
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.
-
wildcard object
Returns documents that contain terms matching a wildcard pattern.
-
wrapper object
-
type object
-
-
query_weight number
Relative importance of the original query versus the rescore query.
-
rescore_query_weight number
Relative importance of the rescore query versus the original query.
-
score_mode string
Values are
avg
,max
,min
,multiply
, ortotal
.
-
-
learning_to_rank object
Hide learning_to_rank attributes Show learning_to_rank attributes object
Hide attributes Show attributes object
-
window_size number
-
query object
Hide query attributes Show query attributes object
-
Hide rescore_query attributes Show rescore_query attributes object
-
fuzzy object
Returns documents that contain terms similar to the search term, as measured by a Levenshtein edit distance.
-
intervals object
Returns documents based on the order and proximity of matching terms.
-
match object
Returns documents that match a provided text, number, date or boolean value. The provided text is analyzed before matching.
-
match_bool_prefix object
Analyzes its input and constructs a
bool
query from the terms. Each term except the last is used in aterm
query. The last term is used in a prefix query. -
match_phrase object
Analyzes the text and creates a phrase query out of the analyzed text.
-
match_phrase_prefix object
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.
-
prefix object
Returns documents that contain a specific prefix in a provided field.
-
range object
Returns documents that contain terms within a provided range.
-
regexp object
Returns documents that contain terms matching a regular expression.
-
span_term object
Matches spans containing a term.
-
term object
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.
-
terms_set object
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.
-
wildcard object
Returns documents that contain terms matching a wildcard pattern.
-
query_weight number
Relative importance of the original query versus the rescore query.
-
rescore_query_weight number
Relative importance of the rescore query versus the original query.
-
score_mode string
Values are
avg
,max
,min
,multiply
, ortotal
.
-
-
learning_to_rank object
Hide learning_to_rank attributes Show learning_to_rank attributes object
-
-
script_fields object
Hide script_fields attributes Show script_fields attributes object
-
Hide script attributes Show script attributes object
-
source string
The script source.
-
id string
-
params object
Specifies any named parameters that are passed into the script as variables. Use parameters instead of hard-coded values to decrease compile time.
Hide params attributes Show params attributes object
-
key object
-
options object
Hide options attributes Show options attributes object
-
key string
-
-
ignore_failure boolean
-
search_after array[number | string | boolean | null | object]
-
size number
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.
-
slice object
sort string | object | array[string | object]
One of: Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
Hide attributes Show attributes
-
_score object
Hide _score attribute Show _score attribute object
-
order string
Values are
asc
ordesc
.
-
-
_doc object
Hide _doc attribute Show _doc attribute object
-
order string
Values are
asc
ordesc
.
-
-
_geo_distance object
Hide _geo_distance attributes Show _geo_distance attributes object
-
mode string
Values are
min
,max
,sum
,avg
, ormedian
. -
distance_type string
Values are
arc
orplane
. -
ignore_unmapped boolean
-
order string
Values are
asc
ordesc
. -
unit string
Values are
in
,ft
,yd
,mi
,nmi
,km
,m
,cm
, ormm
. -
nested object
Hide nested attributes Show nested attributes object
-
filter object
Hide filter attributes Show filter attributes object
-
fuzzy object
Returns documents that contain terms similar to the search term, as measured by a Levenshtein edit distance.
-
intervals object
Returns documents based on the order and proximity of matching terms.
-
match object
Returns documents that match a provided text, number, date or boolean value. The provided text is analyzed before matching.
-
match_bool_prefix object
Analyzes its input and constructs a
bool
query from the terms. Each term except the last is used in aterm
query. The last term is used in a prefix query. -
match_phrase object
Analyzes the text and creates a phrase query out of the analyzed text.
-
match_phrase_prefix object
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.
-
prefix object
Returns documents that contain a specific prefix in a provided field.
-
range object
Returns documents that contain terms within a provided range.
-
regexp object
Returns documents that contain terms matching a regular expression.
-
span_term object
Matches spans containing a term.
-
term object
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.
-
terms_set object
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.
-
wildcard object
Returns documents that contain terms matching a wildcard pattern.
-
max_children number
-
nested object
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
-
-
_script object
Hide _script attributes Show _script attributes object
-
order string
Values are
asc
ordesc
. -
Hide script attributes Show script attributes object
-
source string
The script source.
-
id string
-
params object
Specifies any named parameters that are passed into the script as variables. Use parameters instead of hard-coded values to decrease compile time.
Hide params attributes Show params attributes object
-
key object
-
options object
Hide options attributes Show options attributes object
-
key string
-
-
type string
Values are
string
,number
, orversion
. -
mode string
Values are
min
,max
,sum
,avg
, ormedian
. -
nested object
Hide nested attributes Show nested attributes object
-
filter object
Hide filter attributes Show filter attributes object
-
fuzzy object
Returns documents that contain terms similar to the search term, as measured by a Levenshtein edit distance.
-
intervals object
Returns documents based on the order and proximity of matching terms.
-
match object
Returns documents that match a provided text, number, date or boolean value. The provided text is analyzed before matching.
-
match_bool_prefix object
Analyzes its input and constructs a
bool
query from the terms. Each term except the last is used in aterm
query. The last term is used in a prefix query. -
match_phrase object
Analyzes the text and creates a phrase query out of the analyzed text.
-
match_phrase_prefix object
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.
-
prefix object
Returns documents that contain a specific prefix in a provided field.
-
range object
Returns documents that contain terms within a provided range.
-
regexp object
Returns documents that contain terms matching a regular expression.
-
span_term object
Matches spans containing a term.
-
term object
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.
-
terms_set object
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.
-
wildcard object
Returns documents that contain terms matching a wildcard pattern.
-
max_children number
-
nested object
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
-
One of: Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
Hide attributes Show attributes
-
_score object
Hide _score attribute Show _score attribute object
-
order string
Values are
asc
ordesc
.
-
-
_doc object
Hide _doc attribute Show _doc attribute object
-
order string
Values are
asc
ordesc
.
-
-
_geo_distance object
Hide _geo_distance attributes Show _geo_distance attributes object
-
mode string
Values are
min
,max
,sum
,avg
, ormedian
. -
distance_type string
Values are
arc
orplane
. -
ignore_unmapped boolean
-
order string
Values are
asc
ordesc
. -
unit string
Values are
in
,ft
,yd
,mi
,nmi
,km
,m
,cm
, ormm
. -
nested object
Hide nested attributes Show nested attributes object
-
filter object
-
max_children number
-
nested object
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
-
-
_script object
Hide _script attributes Show _script attributes object
-
order string
Values are
asc
ordesc
. -
type string
Values are
string
,number
, orversion
. -
mode string
Values are
min
,max
,sum
,avg
, ormedian
. -
nested object
Hide nested attributes Show nested attributes object
-
filter object
-
max_children number
-
nested object
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
-
-
-
fields array[object]
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
-
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
format string
Format in which the values are returned.
-
include_unmapped boolean
-
-
suggest object
Hide suggest attribute Show suggest attribute object
-
text string
Global suggest text, to avoid repetition when the same text is used in several suggesters
-
-
terminate_after number
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.
-
timeout string
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.
-
track_scores boolean
If true, calculate and return document scores, even if the scores are not used for sorting.
-
version boolean
If true, returns document version as part of a hit.
-
seq_no_primary_term boolean
If true, returns sequence number and primary term of the last modification of each hit. See Optimistic concurrency control.
-
stored_fields string | array[string]
-
pit object
Hide pit attributes Show pit attributes object
-
keep_alive string
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.
-
runtime_mappings object
Hide runtime_mappings attributes Show runtime_mappings attributes object
-
fields object
Hide fields attributes Show fields attributes object
-
Values are
boolean
,composite
,date
,double
,geo_point
,ip
,keyword
,long
, orlookup
.
-
fetch_fields array[object]
For type
lookup
-
format string
A custom format for
date
type runtime fields. -
input_field string
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
target_field string
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
-
target_index string
-
script object
Hide script attributes Show script attributes object
-
source string
The script source.
-
id string
-
params object
Specifies any named parameters that are passed into the script as variables. Use parameters instead of hard-coded values to decrease compile time.
Hide params attributes Show params attributes object
-
key object
-
options object
Hide options attributes Show options attributes object
-
key string
-
-
Values are
boolean
,composite
,date
,double
,geo_point
,ip
,keyword
,long
, orlookup
.
-
stats array[string]
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
-
200 application/json
Hide response attributes Show response attributes object
-
id string
-
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_partial
is always set totrue
. -
Indicates whether the search is still running or has completed. NOTE: 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_running
isfalse
. expiration_time string | number
A date and time, either as a string whose format can depend on the context (defaulting to ISO 8601), or a number of milliseconds since the Epoch. Elasticsearch accepts both as input, but will generally output a string representation.
One of: Time unit for milliseconds
-
expiration_time_in_millis number
Time unit for milliseconds
start_time string | number
A date and time, either as a string whose format can depend on the context (defaulting to ISO 8601), or a number of milliseconds since the Epoch. Elasticsearch accepts both as input, but will generally output a string representation.
One of: Time unit for milliseconds
-
start_time_in_millis number
Time unit for milliseconds
completion_time string | number
A date and time, either as a string whose format can depend on the context (defaulting to ISO 8601), or a number of milliseconds since the Epoch. Elasticsearch accepts both as input, but will generally output a string representation.
One of: Time unit for milliseconds
-
completion_time_in_millis number
Time unit for milliseconds
-
Hide response attributes Show response attributes object
-
aggregations object
Partial aggregations results, coming from the shards that have already completed the execution of the query.
-
_clusters object
Hide _clusters attributes Show _clusters attributes object
-
details object
-
fields object
Hide fields attributes Show fields attributes object
-
key object
-
Hide hits attributes Show hits attributes object
-
Hide hits attributes Show hits attributes object
-
_id string
-
_explanation object
-
fields object
-
highlight object
-
_nested object
-
_ignored array[string]
-
ignored_field_values object
-
_shard string
-
_node string
-
_routing string
-
_source object
-
_rank number
-
_seq_no number
-
_primary_term number
-
_version number
-
sort array[number | string | boolean | null | object]
max_score number | string | null
-
max_score number
-
num_reduce_phases number
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.
-
profile object
Hide profile attribute Show profile attribute object
-
Hide shards attributes Show shards attributes object
-
fetch object
-
-
pit_id string
-
_scroll_id string
-
Hide _shards attributes Show _shards attributes object
-
suggest object
Hide suggest attributes Show suggest attributes object
-
key array
-
terminated_early boolean
-
-
curl \
-X POST http://api.example.com/{index}/_async_search \
-H "Content-Type: application/json" \
-d '"{\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" : [ ]
}
}
}