OpenSearch/docs/reference/search/request
Jim Ferenczi b9030bf6fe Add the ability to partition a scroll in multiple slices.
API:

```
curl -XGET 'localhost:9200/twitter/tweet/_search?scroll=1m' -d '{
    "slice": {
        "field": "_uid", <1>
        "id": 0, <2>
        "max": 10 <3>
    },
    "query": {
        "match" : {
            "title" : "elasticsearch"
        }
    }
}
```

<1> (optional) The field name used to do the slicing (_uid by default)
<2> The id of the slice

By default the splitting is done on the shards first and then locally on each shard using the _uid field
with the following formula:
`slice(doc) = floorMod(hashCode(doc._uid), max)`
For instance if the number of shards is equal to 2 and the user requested 4 slices then the slices 0 and 2 are assigned
to the first shard and the slices 1 and 3 are assigned to the second shard.

Each scroll is independent and can be processed in parallel like any scroll request.

Closes #13494
2016-06-07 16:21:53 +02:00
..
explain.asciidoc Add CONSOLE to several trivial search request docs. 2016-05-18 13:15:19 +02:00
fielddata-fields.asciidoc Add CONSOLE to several trivial search request docs. 2016-05-18 13:15:19 +02:00
fields.asciidoc Add CONSOLE to several trivial search request docs. 2016-05-18 13:15:19 +02:00
from-size.asciidoc Add CONSOLE to from/size docs 2016-05-18 11:54:41 +02:00
highlighting.asciidoc Switch to more match query for better illustration 2016-05-18 15:52:08 +02:00
index-boost.asciidoc Add CONSOLE to several trivial search request docs. 2016-05-18 13:15:19 +02:00
inner-hits.asciidoc Drop top level inner hits in favour of inner hits defined in the query dsl. 2016-04-29 11:17:24 +02:00
min-score.asciidoc Add CONSOLE to several trivial search request docs. 2016-05-18 13:15:19 +02:00
named-queries-and-filters.asciidoc Add indent 2016-05-19 09:33:29 +02:00
post-filter.asciidoc Add CONSOLE to post-filter 2016-05-18 14:31:04 +02:00
preference.asciidoc Add CONSOLE to preference docs 2016-05-18 14:34:22 +02:00
query.asciidoc Add CONSOLE to several trivial search request docs. 2016-05-18 13:15:19 +02:00
rescore.asciidoc Remove the scan and count search types. 2015-09-07 15:18:45 +02:00
script-fields.asciidoc Add CONSOLE to script-fields docs 2016-05-18 14:38:54 +02:00
scroll.asciidoc Add the ability to partition a scroll in multiple slices. 2016-06-07 16:21:53 +02:00
search-after.asciidoc Convert search-after tests to // CONSOLE 2016-05-18 06:37:13 -04:00
search-type.asciidoc Remove the scan and count search types. 2015-09-07 15:18:45 +02:00
sort.asciidoc Switch to keyword/text type, add refresh parameter 2016-05-18 11:08:27 +02:00
source-filtering.asciidoc Add CONSOLE to source filtering docs 2016-05-18 15:20:21 +02:00
version.asciidoc Add CONSOLE to version docs 2016-05-18 15:32:48 +02:00