# Sliced Scroll Search question, what's the minimum max slice?

**URL:** <https://discuss.elastic.co/t/sliced-scroll-search-question-whats-the-minimum-max-slice/97642>\
**Category:** Elasticsearch\
**Created:** [August 19, 2017, 1:49am UTC](https://discuss.elastic.co/t/sliced-scroll-search-question-whats-the-minimum-max-slice/97642 "2017-08-19T01:49:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![frzhang](https://avatars.discourse-cdn.com/v4/letter/f/d6d6ee/32.png) [@frzhang](https://discuss.elastic.co/u/frzhang)\
**Post date:** [August 19, 2017, 1:49am UTC](https://discuss.elastic.co/t/sliced-scroll-search-question-whats-the-minimum-max-slice/97642/1 "2017-08-19T01:49:04Z")

</div>

Hi,

My current index shards setting is 5, and I am using sliced scroll search to increase parallelism. But I found out if max slice number is less than the number of shards, the result is incomplete. Since I have another search after query, unless the max slice number \>= the number of shards, the search after query has more results than the sliced scroll search.

So my questions is: the max slice number \>= the shards number?

My sliced query looks like:  
/1503014400000/type1,type2,type3/\_search?scroll=120s  
{  
"\_source": ["[user.id](http://user.id)"],  
"sort" : ["\_doc"],  
"size": 10000,  
"slice": {"field": "processedTimestamp","id": 0,"max": 3},  
"query": {  
"bool": {  
"filter": [  
{"term" : {"user.locationId" : 1} },  
{"range" : {"processedTimestamp" : {"gt" : 1503000000000, "lte" : 1503086400000} }}  
]  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![frzhang](https://avatars.discourse-cdn.com/v4/letter/f/d6d6ee/32.png) [@frzhang](https://discuss.elastic.co/u/frzhang)\
**Post date:** [August 21, 2017, 5:30pm UTC](https://discuss.elastic.co/t/sliced-scroll-search-question-whats-the-minimum-max-slice/97642/2 "2017-08-21T17:30:50Z")

</div>

just found out there is one index without different mapping, as long as getting rid of it from the search list, the returns are consistent.

---

<div class="post-metadata">

**Author:** ![frzhang](https://avatars.discourse-cdn.com/v4/letter/f/d6d6ee/32.png) [@frzhang](https://discuss.elastic.co/u/frzhang)\
**Post date:** [August 21, 2017, 6:36pm UTC](https://discuss.elastic.co/t/sliced-scroll-search-question-whats-the-minimum-max-slice/97642/3 "2017-08-21T18:36:10Z")

</div>

unfortunately, there is still an issue:

1. if the size is \<= 10K, the result is consistent (different page sizes, search after or search after)
2. if the size is \> 10K, the result is different from the result with size setting \<= 10K (total return is about 30K).

the max\_result\_window is set as 50K now.

Any ideas?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [September 18, 2017, 6:36pm UTC](https://discuss.elastic.co/t/sliced-scroll-search-question-whats-the-minimum-max-slice/97642/4 "2017-09-18T18:36:12Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
