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 Usageedit
A 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 exampleedit
q .Limit(c => c .Name("named_query") .Boost(1.1) .Limit(100) )
Object Initializer syntax exampleedit
new LimitQuery { Name = "named_query", Boost = 1.1, Limit = 100 }
Example json output.
{ "limit": { "_name": "named_query", "boost": 1.1, "limit": 100 } }