You are looking at documentation for an older release.
Not what you want? 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
}
}