OpenSearch/docs/reference/query-dsl/limit-query.asciidoc

22 lines
493 B
Plaintext

[[query-dsl-limit-query]]
== Limit Query
deprecated[1.6.0, Use <<search-request-body,terminate_after>> instead]
A limit query limits the number of documents (per shard) to execute on.
For example:
[source,js]
--------------------------------------------------
{
"filtered" : {
"filter" : {
"limit" : {"value" : 100}
},
"query" : {
"term" : { "name.first" : "shay" }
}
}
}
--------------------------------------------------