# Elasticsearch different result when try get all data

**URL:** <https://discuss.elastic.co/t/elasticsearch-different-result-when-try-get-all-data/59398>\
**Category:** Elasticsearch\
**Created:** [August 31, 2016, 7:37am UTC](https://discuss.elastic.co/t/elasticsearch-different-result-when-try-get-all-data/59398 "2016-08-31T07:37:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Radoslaw\_Wojtkiewicz](https://avatars.discourse-cdn.com/v4/letter/r/0ea827/32.png) [@Radoslaw\_Wojtkiewicz](https://discuss.elastic.co/u/Radoslaw_Wojtkiewicz)\
**Post date:** [August 31, 2016, 7:37am UTC](https://discuss.elastic.co/t/elasticsearch-different-result-when-try-get-all-data/59398/1 "2016-08-31T07:37:51Z")

</div>

I have the two methods:

**findAllByIndexParams:**

[http://pastebin.com/edNUiGQv](http://pastebin.com/edNUiGQv)

**searchByIndexParams:**

[http://pastebin.com/7a3mWyxb](http://pastebin.com/7a3mWyxb)

the first method is to download all of the records, the other retrieves records with pagination. He appeared to me to issue this type that when I send the request to the Financial Controller:

**/auctions/findAll?users=1**

**/auctions/search?users=1**

I get in response to the result that different amounts of records. Well searchByIndexParams method returns, whereas a wrong method findAllByIndexParams. It looks as if the record is doubled.

Number of records with search method returns total = 114  
Number of records findAll method returns total = 228

I do not know what the cause thi. I ask you for help.

---

<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 5, 2017, 10:23pm UTC](https://discuss.elastic.co/t/elasticsearch-different-result-when-try-get-all-data/59398/2 "2017-07-05T22:23:45Z")

</div>

Closed on July 5, 2017, 10:23pm UTC


