# No effect of "size" in 'query' while reindexing in elasticsearch

**URL:** <https://discuss.elastic.co/t/no-effect-of-size-in-query-while-reindexing-in-elasticsearch/59967>\
**Category:** Logstash\
**Created:** [September 7, 2016, 10:18am UTC](https://discuss.elastic.co/t/no-effect-of-size-in-query-while-reindexing-in-elasticsearch/59967 "2016-09-07T10:18:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ultimate.duwal](https://avatars.discourse-cdn.com/v4/letter/u/2acd7d/32.png) [@ultimate.duwal](https://discuss.elastic.co/u/ultimate.duwal)\
**Post date:** [September 7, 2016, 10:18am UTC](https://discuss.elastic.co/t/no-effect-of-size-in-query-while-reindexing-in-elasticsearch/59967/1 "2016-09-07T10:18:37Z")

</div>

Hello,  
I have been using logstash to migrate a index to another. I have recently tried to reindex certain amount of data from large dataset in local environment. So I tried using following configuration for migration:

input{  
elasticsearch{  
hosts=\> "localhost:9200"  
index=\> "old\_index"  
query=\> '{"query":{"match\_all":{}},"size":10 }'  
}  
}  
filter {  
mutate {  
remove\_field =\> ["@version", "@timestamp"]  
}  
}  
output{  
elasticsearch{  
hosts=\>"localhost:9200"  
index=\>"new\_index"  
document\_type=\>"contact"  
manage\_template =\> false  
document\_id=\>"%{contactId}"  
}  
}

But this reindexes all the documents in old\_index to new\_index, where as , I was expecting just 10 documents to be reindexed in new\_index.  
Am I missing some concept using logstash with elasticsearch?

---

<div class="post-metadata">

**Author:** ![jarlrmai](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jarlrmai/32/11574_2.png) [@jarlrmai](https://discuss.elastic.co/u/jarlrmai)\
**Post date:** [September 9, 2016, 9:07am UTC](https://discuss.elastic.co/t/no-effect-of-size-in-query-while-reindexing-in-elasticsearch/59967/2 "2016-09-09T09:07:45Z")

</div>

I am having the exact same issue, did you get a solution?

Thanks

---

<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:** [July 6, 2017, 4:39am UTC](https://discuss.elastic.co/t/no-effect-of-size-in-query-while-reindexing-in-elasticsearch/59967/3 "2017-07-06T04:39:08Z")

</div>


