# Special sorting

**URL:** <https://discuss.elastic.co/t/special-sorting/35131>\
**Category:** Elasticsearch\
**Created:** [November 20, 2015, 8:57am UTC](https://discuss.elastic.co/t/special-sorting/35131 "2015-11-20T08:57:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![LeshaRB](https://avatars.discourse-cdn.com/v4/letter/l/41988e/32.png) [@LeshaRB](https://discuss.elastic.co/u/LeshaRB)\
**Post date:** [November 20, 2015, 8:57am UTC](https://discuss.elastic.co/t/special-sorting/35131/1 "2015-11-20T08:57:58Z")

</div>

Hello all  
I have a local sorting on the client, with special logic (parsing and other)

class Comp implements Comparator {  
@Override  
public int compare(String obj1, String obj2) {  
…  
…  
return 0;  
}  
...  
...  
...  
}

I write small plugin and stuck  
How to compare rows on elastic?

How to realize compare on elastic or should we do differently ?

---

<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, 11:36pm UTC](https://discuss.elastic.co/t/special-sorting/35131/2 "2017-07-05T23:36:54Z")

</div>


