# Duplicate Results Following Upgrade to 1.2.0 & SortScript

**URL:** <https://discuss.elastic.co/t/duplicate-results-following-upgrade-to-1-2-0-sortscript/17798>\
**Category:** Elasticsearch\
**Created:** [May 29, 2014, 7:35am UTC](https://discuss.elastic.co/t/duplicate-results-following-upgrade-to-1-2-0-sortscript/17798 "2014-05-29T07:35:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nariman\_Haghighi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nariman_haghighi/32/1065_2.png) [@Nariman\_Haghighi](https://discuss.elastic.co/u/Nariman_Haghighi)\
**Post date:** [May 29, 2014, 7:35am UTC](https://discuss.elastic.co/t/duplicate-results-following-upgrade-to-1-2-0-sortscript/17798/1 "2014-05-29T07:35:23Z")

</div>

The following query is now returning duplicate documents following the  
upgrade to 1.2.0, was this an intentional change that's documented  
somewhere?

{  
"from": 0,  
"size": 25,  
"sort": {  
"\_script": {  
"order": "desc",  
"type": "number",  
"script": "(doc['id'].value + salt).hashCode()",  
"params": {  
"salt": "TMJHXYFHHR"  
}  
}  
},  
"query": {  
"term": {  
"featured": {  
"value": "true"  
}  
}  
}  
}

The cluster has 2 nodes and the index has the default of 5 shards.

--  
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/4c569495-b04b-4185-9eb9-bc159590848a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/4c569495-b04b-4185-9eb9-bc159590848a%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, 1:26am UTC](https://discuss.elastic.co/t/duplicate-results-following-upgrade-to-1-2-0-sortscript/17798/2 "2017-07-06T01:26:12Z")

</div>

Closed on July 6, 2017, 1:26am UTC


