# ElasticSearch 1.3.4 - Duplicate data sometimes

**URL:** <https://discuss.elastic.co/t/elasticsearch-1-3-4-duplicate-data-sometimes/20871>\
**Category:** Elasticsearch\
**Created:** [November 20, 2014, 4:51pm UTC](https://discuss.elastic.co/t/elasticsearch-1-3-4-duplicate-data-sometimes/20871 "2014-11-20T16:51:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_D\_Ament](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/john_d_ament/32/764_2.png) [@John\_D\_Ament](https://discuss.elastic.co/u/John_D_Ament)\
**Post date:** [November 20, 2014, 4:51pm UTC](https://discuss.elastic.co/t/elasticsearch-1-3-4-duplicate-data-sometimes/20871/1 "2014-11-20T16:51:45Z")

</div>

Hi,

I was wondering how I might be able to trouble shoot issues with duplicate  
data coming back from queries.

In my query, I perform an aggregate query, something like this:

final SearchResponse searchResponse =  
client()  
.prepareSearch(indexName)  
.setTypes("OBJ\_TYPE")  
.setFetchSource(true)  
.setExplain(true)  
.addSort("dateCreated.value", SortOrder.DESC)  
.addSort("recId", SortOrder.DESC)  
.setSize(1000)  
.addAggregation(  
AggregationBuilders.filter("filter1").filter(filterBuilder).subAggregation(rangeBuilder))  
.execute().actionGet();

The values returned from this query are giving back duplicate object id's.  
But only sometimes. I've looked at our elasticsearch config files and  
don't see any way this could happen. The filters are only reducing based  
on some attributes, I can't think of any reason this could occur.

John

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/11b5f5a9-95da-40c7-aad3-00b5e79d74ad%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/11b5f5a9-95da-40c7-aad3-00b5e79d74ad%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![John\_D\_Ament](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/john_d_ament/32/764_2.png) [@John\_D\_Ament](https://discuss.elastic.co/u/John_D_Ament)\
**Post date:** [November 21, 2014, 12:48pm UTC](https://discuss.elastic.co/t/elasticsearch-1-3-4-duplicate-data-sometimes/20871/2 "2014-11-21T12:48:11Z")

</div>

Ended up reducing the shard count... fixed the issue.

On Thursday, November 20, 2014 11:51:45 AM UTC-5, John D. Ament wrote:

> Hi,
> 
> I was wondering how I might be able to trouble shoot issues with duplicate  
> data coming back from queries.
> 
> In my query, I perform an aggregate query, something like this:
> 
> final SearchResponse searchResponse =  
> client()  
> .prepareSearch(indexName)  
> .setTypes("OBJ\_TYPE")  
> .setFetchSource(true)  
> .setExplain(true)  
> .addSort("dateCreated.value", SortOrder.DESC)  
> .addSort("recId", SortOrder.DESC)  
> .setSize(1000)  
> .addAggregation(
> 
> AggregationBuilders.filter("filter1").filter(filterBuilder).subAggregation(rangeBuilder))  
> .execute().actionGet();
> 
> The values returned from this query are giving back duplicate object id's.  
> But only sometimes. I've looked at our elasticsearch config files and  
> don't see any way this could happen. The filters are only reducing based  
> on some attributes, I can't think of any reason this could occur.
> 
> John

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/19882c91-1cf2-49ec-ace7-406abe1f6c97%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/19882c91-1cf2-49ec-ace7-406abe1f6c97%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:48am UTC](https://discuss.elastic.co/t/elasticsearch-1-3-4-duplicate-data-sometimes/20871/3 "2017-07-06T00:48:27Z")

</div>


