WARNING: Version 5.x has passed its EOL date.
This documentation is no longer being maintained and may be removed. If you are running this version, we strongly advise you to upgrade. For the latest information, see the current release documentation.
Limit Query Usage
edit
IMPORTANT: This documentation is no longer updated. Refer to Elastic's version policy and the latest documentation.
Limit Query Usage
editA limit query limits the number of documents (per shard) to execute on.
Deprecated in 2.0.0-beta1. Use the terminate_after parameter on the request instead.
See the Elasticsearch documentation on limit query for more details.
Fluent DSL example
editq
.Limit(c => c
.Name("named_query")
.Boost(1.1)
.Limit(100)
)
Object Initializer syntax example
editnew LimitQuery
{
Name = "named_query",
Boost = 1.1,
Limit = 100
}
Example json output.
{
"limit": {
"_name": "named_query",
"boost": 1.1,
"limit": 100
}
}