2015-05-05 02:27:52 -04:00
|
|
|
[[query-dsl-limit-query]]
|
2015-06-03 19:59:22 -04:00
|
|
|
=== Limit Query
|
2013-08-28 19:24:34 -04:00
|
|
|
|
2015-05-05 02:27:52 -04:00
|
|
|
A limit query limits the number of documents (per shard) to execute on.
|
2013-08-28 19:24:34 -04:00
|
|
|
For example:
|
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
|
|
|
{
|
|
|
|
"filtered" : {
|
|
|
|
"filter" : {
|
|
|
|
"limit" : {"value" : 100}
|
|
|
|
},
|
|
|
|
"query" : {
|
|
|
|
"term" : { "name.first" : "shay" }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
--------------------------------------------------
|