Run a search | Elasticsearch API documentation (original) (raw)
Dismiss highlight Show more
Query parameters
- If
false
, the request returns an error if any wildcard expression, index alias, or_all
value targets only missing or closed indices. This behavior applies even if the request targets other open indices. For example, a request targetingfoo*,bar*
returns an error if an index starts withfoo
but no index starts withbar
. - allow_partial_search_results
boolean
Iftrue
and there are shard request timeouts or shard failures, the request returns partial results. Iffalse
, it returns an error with no partial results.
To override the default behavior, you can set thesearch.default_allow_partial_results
cluster setting tofalse
. - The analyzer to use for the query string. This parameter can be used only when the
q
query string parameter is specified. - If
true
, wildcard and prefix queries are analyzed. This parameter can be used only when theq
query string parameter is specified. - batched_reduce_size
number
The number of shard results that should be reduced at once on the coordinating node. If the potential number of shards in the request can be large, this value should be used as a protection mechanism to reduce the memory overhead per search request. - ccs_minimize_roundtrips
boolean
Iftrue
, network round-trips between the coordinating node and the remote clusters are minimized when running cross-cluster search (CCS) requests. - The default operator for the query string query:
AND
orOR
. This parameter can be used only when theq
query string parameter is specified.
Values areand
,AND
,or
, orOR
. - The field to use as a default when no field prefix is given in the query string. This parameter can be used only when the
q
query string parameter is specified. - 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]
The type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. It supports comma-separated values such asopen,hidden
.
Values areall
,open
,closed
,hidden
, ornone
. - If
true
, the request returns detailed information about score computation as part of a hit. - ignore_throttled
boolean Deprecated
Iftrue
, concrete, expanded or aliased indices will be ignored when frozen. - ignore_unavailable
boolean
Iffalse
, the request returns an error if it targets a missing or closed index. - include_named_queries_score
boolean
Iftrue
, the response includes the score contribution from any named queries.
This functionality reruns each named query on every hit in a search response. Typically, this adds a small overhead to a request. However, using computationally expensive named queries on a large number of hits may add significant overhead. - If
true
, format-based query failures (such as providing text to a numeric field) in the query string will be ignored. This parameter can be used only when theq
query string parameter is specified. - max_concurrent_shard_requests
number
The number of concurrent shard requests per node that the search runs 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. - The nodes and shards used for the search. By default, Elasticsearch selects from eligible nodes and shards using adaptive replica selection, accounting for allocation awareness. Valid values are:
_only_local
to run the search only on shards on the local node._local
to, if possible, run the search on shards on the local node, or if not, select shards using the default method._only_nodes:<node-id>,<node-id>
to run the search on only the specified nodes IDs. If suitable shards exist on more than one selected node, use shards on those nodes using the default method. If none of the specified nodes are available, select shards from any available node using the default method._prefer_nodes:<node-id>,<node-id>
to if possible, run the search on the specified nodes IDs. If not, select shards using the default method._shards:<shard>,<shard>
to run the search only on the specified shards. You can combine this value with otherpreference
values. However, the_shards
value must come first. For example:_shards:2,3|_local
.<custom-string>
(any string that does not start with_
) to route searches with the same<custom-string>
to the same shards in the same order.
- pre_filter_shard_size
number
A threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method (if date filters are mandatory to match but the shard bounds and the query are disjoint). When unspecified, the pre-filter phase is executed if any of these conditions is met:- The request targets more than 128 shards.
- The request targets one or more read-only index.
- The primary sort of the query targets an indexed field.
- If
true
, the caching of search results is enabled for requests wheresize
is0
. It defaults to index level settings. - A custom value that is used to route operations to a specific shard.
- The period to retain the search context for scrolling. By default, this value cannot exceed
1d
(24 hours). You can change this limit by using thesearch.max_keep_alive
cluster-level setting. - Indicates how distributed term frequencies are calculated for relevance scoring.
Values arequery_then_fetch
ordfs_query_then_fetch
. - 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. If no fields are specified, no stored fields are included in the response. If this field is specified, the_source
parameter defaults tofalse
. You can pass_source: true
to return both source fields and stored fields in the search response. - The field to use for suggestions.
- The suggest mode. This parameter can be used only when the
suggest_field
andsuggest_text
query string parameters are specified.
Values aremissing
,popular
, oralways
. - The number of suggestions to return. This parameter can be used only when the
suggest_field
andsuggest_text
query string parameters are specified. - The source text for which the suggestions should be returned. This parameter can be used only when the
suggest_field
andsuggest_text
query string parameters are specified. - The 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.
IMPORTANT: Use with caution. Elasticsearch applies this parameter to each shard handling the request. When possible, let Elasticsearch perform early termination automatically. Avoid specifying this parameter for requests that target data streams with backing indices across multiple data tiers. If set to0
(default), the query does not terminate early. - 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. It defaults to no timeout.
- track_total_hits
boolean | number
The number of hits matching the query to count accurately. Iftrue
, the exact number of hits is returned at the cost of some performance. Iffalse
, the response does not include the total number of hits matching the query. - If
true
, the request calculates and returns document scores, even if the scores are not used for sorting. - If
true
, aggregation and suggester names are be prefixed by their respective types in the response. - rest_total_hits_as_int
boolean
Indicates whetherhits.total
should be rendered as an integer or an object in the rest search response. - If
true
, the request returns the document version as part of a hit. - _source
boolean | string | array[string]
The source fields that are returned for matching documents. These fields are returned in thehits._source
property of the search response. Valid values are:true
to return the entire document source.false
to not return the document source.<string>
to return the source fields that are specified as a comma-separated list that supports wildcard (*
) patterns.
- _source_excludes
string | array[string]
A comma-separated list of source fields to exclude from the response. You can also use this parameter to exclude fields from the subset specified in_source_includes
query parameter. If the_source
parameter isfalse
, this parameter is ignored. - _source_includes
string | array[string]
A comma-separated list of source fields to include in the response. If this parameter is specified, only these source fields are returned. You can exclude fields from this subset using the_source_excludes
query parameter. If the_source
parameter isfalse
, this parameter is ignored. - seq_no_primary_term
boolean
Iftrue
, the request returns the sequence number and primary term of the last modification of each hit. - A query in the Lucene query string syntax. Query parameter searches do not support the full Elasticsearch Query DSL but are handy for testing.
IMPORTANT: This parameter overrides the query parameter in the request body. If both parameters are specified, documents matching the query request body parameter are not returned. - The number of hits to return. By default, you cannot page through more than 10,000 hits using the
from
andsize
parameters. To page through more hits, use thesearch_after
parameter. - The starting document offset, which must be non-negative. By default, you cannot page through more than 10,000 hits using the
from
andsize
parameters. To page through more hits, use thesearch_after
parameter. - sort
string | array[string]
A comma-separated list of<field>:<direction>
pairs.
application/json
Body
- Defines the aggregations that are run as part of the search request.
External documentation - External documentation
- If
true
, the request returns detailed information about score computation as part of a hit. - Configuration of search extensions defined by Elasticsearch plugins.
Hide ext attribute Show ext attribute object - The starting document offset, which must be non-negative. By default, you cannot page through more than 10,000 hits using the
from
andsize
parameters. To page through more hits, use thesearch_after
parameter. - Hide highlight attributes Show highlight attributes object
Values are
plain
,fvh
, orunified
.- A string that contains each boundary character.
- How far to scan for boundary characters.
- 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"
. - force_source
boolean Deprecated - Values are
simple
orspan
. - The size of the highlighted fragment in characters.
- An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
External documentation - 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 Themax_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. - 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 to0
, 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. - Hide options attribute Show options attribute object
* *
object Additional properties - 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. - 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. - 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 tofalse
to highlight all fields. - Values are
default
orhtml
. fields object | array[object] Required
- 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]
Boost the_score
of documents from specified indices. The boost value is the factor by which scores are multiplied. A boost value greater than1.0
increases the score. A boost value between0
and1.0
decreases the score.
External documentation Hide indices_boost attribute Show indices_boost attribute object - docvalue_fields
array[object]
An array of wildcard (*
) field patterns. The request returns doc values for field names matching these patterns in thehits.fields
property of the response.
A reference to a field with formatting instructions on how to return the value
External documentation 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.
- The format in which the values are returned.
knn object | array[object]
The approximate kNN search to run.
External documentation 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
* Hide text_embedding attributes Show text_embedding attributes object
* model_text
string Required - The final number of nearest neighbors to return as top hits
- The number of nearest neighbor candidates to consider per shard
- Boost value to apply to kNN scores
filter object | array[object]
Filters for the kNN search query
An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
External documentation
An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
- The minimum similarity for a vector to be considered a match
- Hide inner_hits attributes Show inner_hits attributes object
* The maximum number of hits to return perinner_hits
.
* Inner hit starting document offset.
* External documentation
* docvalue_fields
array[object]
A reference to a field with formatting instructions on how to return the value
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.
* The format in which the values are returned.
* Hide highlight attributes Show highlight attributes object
* type
* A string that contains each boundary character.
* How far to scan for boundary characters.
* Values arechars
,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"
.
* force_source
boolean Deprecated
* Values aresimple
orspan
.
* The size of the highlighted fragment in characters.
* An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
* 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 Themax_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.
* 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 to0
, 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.
* Controls the number of matching phrases in a document that are considered. Prevents thefvh
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.
* Use in conjunction withpre_tags
to define the HTML tags to use for the highlighted text. By default, highlighted text is wrapped in<em>
and</em>
tags.
* Use in conjunction withpost_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 tofalse
to highlight all fields.
* Values aredefault
orhtml
.
* fields
* Hide script_fields attribute Show script_fields attribute object
* *
object Additional properties
Hide * attributes Show * attributes object
* seq_no_primary_term
boolean
* Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
* #### sort string | object | array[string | object]
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
* #### _source boolean | object
Defines how to fetch a source. Fetching can be disabled entirely, or the source can be filtered.
* stored_fields
string | array[string] - Hide rescore_vector attribute Show rescore_vector attribute object
* oversample
number Required
Applies the specified oversample factor to k on the approximate kNN search - Hide rank attribute Show rank attribute object
- Hide rrf attributes Show rrf attributes object
* How much influence documents in individual result sets per query have over the final ranked result set
* Size of the individual result sets per query
- Hide rrf attributes Show rrf attributes object
- The minimum
_score
for matching documents. Documents with a lower_score
are not included in search results and results collected by aggregations. - An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
External documentation - Set to
true
to return detailed timing information about the execution of individual components in a search request. NOTE: This is a debugging tool and adds significant overhead to search execution. - An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
External documentation rescore object | array[object]
Can be used to improve precision by reordering just the top (for example 100 - 500) documents returned by the query
and post_filter
phases.
Hide attributes Show attributes object
- Hide query attributes Show query attributes object
* rescore_query
object Required
An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
External documentation
* Relative importance of the original query versus the rescore query.
* rescore_query_weight
number
Relative importance of the rescore query versus the original query.
* Values areavg
,max
,min
,multiply
, ortotal
. - Hide learning_to_rank attributes Show learning_to_rank attributes object
* The unique identifier of the trained model uploaded to Elasticsearch
* Named parameters to be passed to the query templates used for feature
Hide params attribute Show params attribute object
* *
object Additional properties - Hide retriever attributes Show retriever attributes object
- Hide standard attributes Show standard attributes object
* #### filter object | array[object]
Query to filter the documents that can match.
An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
External documentation
An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
* Minimum _score for matching documents. Documents with a lower _score are not included in the top documents.
* Retriever name.
* An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
External documentation
* search_after
array[number | string | boolean | null]
A field value.
* Maximum number of documents to collect for each shard.
* #### sort string | object | array[string | object]
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
* External documentation - Hide knn attributes Show knn attributes object
* #### filter object | array[object]
Query to filter the documents that can match.
An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
External documentation
An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
* Minimum _score for matching documents. Documents with a lower _score are not included in the top documents.
* Retriever name.
* The name of the vector field to search against.
* query_vector
array[number]
* query_vector_builder
object
Hide query_vector_builder attribute Show query_vector_builder attribute object
* Hide text_embedding attributes Show text_embedding attributes object
* model_text
string Required
* Number of nearest neighbors to return as top hits.
* num_candidates
number Required
Number of nearest neighbor candidates to consider per shard.
* The minimum similarity required for a document to be considered a match.
* Hide rescore_vector attribute Show rescore_vector attribute object
* oversample
number Required
Applies the specified oversample factor to k on the approximate kNN search - Hide rrf attributes Show rrf attributes object
* #### filter object | array[object]
Query to filter the documents that can match.
An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
External documentation
An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
* Minimum _score for matching documents. Documents with a lower _score are not included in the top documents.
* Retriever name.
* retrievers
array[object] Required
A list of child retrievers to specify which sets of returned top documents will have the RRF formula applied to them.
* This value determines how much influence documents in individual result sets per query have over the final ranked result set.
* This value determines the size of the individual result sets per query. - text_similarity_reranker
object
Hide text_similarity_reranker attributes Show text_similarity_reranker attributes object
* #### filter object | array[object]
Query to filter the documents that can match.
An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
External documentation
An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
* Minimum _score for matching documents. Documents with a lower _score are not included in the top documents.
* Retriever name.
* retriever
object Required
* This value determines how many documents we will consider from the nested retriever.
* Unique identifier of the inference endpoint created using the inference API.
* The text snippet used as the basis for similarity comparison
* The document field to be used for text similarity comparisons. This field should contain the text that will be evaluated against the inference_text - Hide rule attributes Show rule attributes object
* #### filter object | array[object]
Query to filter the documents that can match.
An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
External documentation
An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
* Minimum _score for matching documents. Documents with a lower _score are not included in the top documents.
* Retriever name.
* #### ruleset_ids string | array[string] Required
The ruleset IDs containing the rules this retriever is evaluating against.
* match_criteria
object Required
The match criteria that will determine if a rule in the provided rulesets should be applied.
* retriever
object Required
* This value determines the size of the individual result set. - Hide rescorer attributes Show rescorer attributes object
* #### filter object | array[object]
Query to filter the documents that can match.
An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
External documentation
An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
* Minimum _score for matching documents. Documents with a lower _score are not included in the top documents.
* Retriever name.
* retriever
object Required
* #### rescore object | array[object] - Hide linear attributes Show linear attributes object
* #### filter object | array[object]
Query to filter the documents that can match.
An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
External documentation
An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
* Minimum _score for matching documents. Documents with a lower _score are not included in the top documents.
* Retriever name.
* Inner retrievers.
Hide retrievers attributes Show retrievers attributes object
* retriever
object Required
* normalizer
string Required
Values arenone
,minmax
, orl2_norm
.
* rank_window_size
number Required - Hide pinned attributes Show pinned attributes object
* #### filter object | array[object]
Query to filter the documents that can match.
An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
External documentation
An Elasticsearch Query DSL (Domain Specific Language) object that defines a query.
* Minimum _score for matching documents. Documents with a lower _score are not included in the top documents.
* Retriever name.
* retriever
object Required
* Hide docs attributes Show docs attributes object
* rank_window_size
number Required
- Hide standard attributes Show standard attributes object
- Retrieve a script evaluation (based on different fields) for each hit.
Hide script_fields attribute Show script_fields attribute object- *
object Additional properties
Hide * attributes Show * attributes object
* Hide script attributes Show script attributes object
* #### source string | 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 attribute Show params attribute object
* *
object Additional properties
* #### lang string
Values arepainless
,expression
,mustache
, orjava
.
* Hide options attribute Show options attribute object
* *
string Additional properties
- *
- search_after
array[number | string | boolean | null]
A field value. - The number of hits to return, which must not be negative. By default, you cannot page through more than 10,000 hits using the
from
andsize
parameters. To page through more hits, use thesearch_after
property. - Hide slice attributes Show slice attributes object
- Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
sort string | object | array[string | object]
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
Defines how to fetch a source. Fetching can be disabled entirely, or the source can be filtered.
- An array of wildcard (
*
) field patterns. The request returns values for field names matching these patterns in thehits.fields
property of the response.
A reference to a field with formatting instructions on how to return the value
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.
- The format in which the values are returned.
- Hide suggest attribute Show suggest attribute object
- Global suggest text, to avoid repetition when the same text is used in several suggesters
- The 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.
IMPORTANT: Use with caution. Elasticsearch applies this property to each shard handling the request. When possible, let Elasticsearch perform early termination automatically. Avoid specifying this property for requests that target data streams with backing indices across multiple data tiers.
If set to0
(default), the query does not terminate early. - The period of time to wait for a response from each shard. If no response is received before the timeout expires, the request fails and returns an error. Defaults to no timeout.
- If
true
, calculate and return document scores, even if the scores are not used for sorting. - If
true
, the request returns the document version as part of a hit. - seq_no_primary_term
boolean
Iftrue
, the request returns sequence number and primary term of the last modification of each hit.
External documentation - stored_fields
string | array[string] - Hide pit attributes Show pit attributes object
- A duration. Units can be
nanos
,micros
,ms
(milliseconds),s
(seconds),m
(minutes),h
(hours) andd
(days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
- A duration. Units can be
- Hide runtime_mappings attribute Show runtime_mappings attribute object
- *
object Additional properties
Hide * attributes Show * attributes object
* For typecomposite
Hide fields attribute Show fields attribute object
* *
object Additional properties
Hide * attribute Show * attribute object
* Values areboolean
,composite
,date
,double
,geo_point
,geo_shape
,ip
,keyword
,long
, orlookup
.
* fetch_fields
array[object]
For typelookup
Hide fetch_fields attributes Show fetch_fields attributes object
* Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
* A custom format fordate
type runtime fields.
* Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
* Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
* Hide script attributes Show script attributes object
* #### source string | 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 attribute Show params attribute object
* *
object Additional properties
* #### lang string
Values arepainless
,expression
,mustache
, orjava
.
* Hide options attribute Show options attribute object
* *
string Additional properties
* Values areboolean
,composite
,date
,double
,geo_point
,geo_shape
,ip
,keyword
,long
, orlookup
.
- *
- The 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- The number of milliseconds it took Elasticsearch to run the request. This value is calculated by measuring the time elapsed between receipt of a request on the coordinating node and the time at which the coordinating node is ready to send the response. It includes:
* Communication time between the coordinating node and data nodes
* Time the request spends in the search thread pool, queued for execution
* Actual run time
It does not include:
* Time needed to send the request to Elasticsearch
* Time needed to serialize the JSON response
* Time needed to send the response to a client- timed_out
boolean Required
Iftrue
, the request timed out before completion; returned results may be partial or empty. - Hide _shards attributes Show _shards attributes object
* successful
number Required
* Hide failures attributes Show failures attributes object
* Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Hide reason attributes Show reason attributes object
* The type of error
* #### reason string | null
A human-readable explanation of the error, in English.
* The server stack trace. Present only if theerror_trace=true
parameter was sent with the request.
* Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
* Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
* Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type.
Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type. - Hide hits attributes Show hits attributes object
* #### total object | number
Total hit count information, present only iftrack_total_hits
wasn'tfalse
in the search request.
* hits
array[object] Required
Hide hits attributes Show hits attributes object
* #### _score number | string | null
* Hide _explanation attributes Show _explanation attributes object
* description
string Required
* details
array[object] Required
* Hide fields attribute Show fields attribute object
* *
object Additional properties
* Hide highlight attribute Show highlight attribute object
* *
array[string] Additional properties
* Hide inner_hits attribute Show inner_hits attribute object
* *
object Additional properties
Hide * attribute Show * attribute object
* #### matched_queries array[string] | object
* Hide _nested attributes Show _nested attributes object
* Path to field or array of paths. Some API's support wildcards in the path to select multiple fields.
* ignored_field_values
object
Hide ignored_field_values attribute Show ignored_field_values attribute object
* *
array[object] Additional properties
* sort
array[number | string | boolean | null]
A field value.
* #### max_score number | string | null - Hide _clusters attributes Show _clusters attributes object
* successful
number Required
* Hide details attribute Show details attribute object
* *
object Additional properties
Hide * attributes Show * attributes object
* Values arerunning
,successful
,partial
,skipped
, orfailed
.
* Time unit for milliseconds
* timed_out
boolean Required
* Hide _shards attributes Show _shards attributes object
* successful
number Required
* Hide failures attributes Show failures attributes object
* Cause and details about a request failure. This class defines the properties common to all error types. Additional details are also provided, that depend on the error type. - Hide fields attribute Show fields attribute object
* *
object Additional properties - Hide profile attribute Show profile attribute object
* shards
array[object] Required
Hide shards attributes Show shards attributes object
* aggregations
array[object] Required
Hide aggregations attributes Show aggregations attributes object
* breakdown
object Required
* description
string Required
* time_in_nanos
* Hide dfs attributes Show dfs attributes object
* Hide statistics attributes Show statistics attributes object
* description
string Required
* A duration. Units can benanos
,micros
,ms
(milliseconds),s
(seconds),m
(minutes),h
(hours) andd
(days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.
* time_in_nanos
* breakdown
object Required
* Hide fetch attributes Show fetch attributes object
* description
string Required
* Time unit for nanoseconds
* breakdown
object Required
Hide breakdown attributes Show breakdown attributes object
* load_stored_fields
number
* load_stored_fields_count
number
* Hide debug attributes Show debug attributes object
* stored_fields
array[string]
* searches
array[object] Required
Hide searches attributes Show searches attributes object
* collector
array[object] Required
* query
array[object] Required
* rewrite_time
number Required - Hide suggest attribute Show suggest attribute object
* *
array[object] Additional properties
- The number of milliseconds it took Elasticsearch to run the request. This value is calculated by measuring the time elapsed between receipt of a request on the coordinating node and the time at which the coordinating node is ready to send the response. It includes: