# How to perform custom similarity

**URL:** <https://discuss.elastic.co/t/how-to-perform-custom-similarity/24855>\
**Category:** Elasticsearch\
**Created:** [July 3, 2015, 10:16am UTC](https://discuss.elastic.co/t/how-to-perform-custom-similarity/24855 "2015-07-03T10:16:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gayatri\_Nair](https://avatars.discourse-cdn.com/v4/letter/g/b5a626/32.png) [@Gayatri\_Nair](https://discuss.elastic.co/u/Gayatri_Nair)\
**Post date:** [July 3, 2015, 10:16am UTC](https://discuss.elastic.co/t/how-to-perform-custom-similarity/24855/1 "2015-07-03T10:16:38Z")

</div>

I'm new to Elasticsearch and would like to override the default similarity. I found this code [https://github.com/tlrx/elasticsearch-custom-similarity-provider](https://github.com/tlrx/elasticsearch-custom-similarity-provider) and understand that the java files have to be compiled into a jar file. But beyond that, I don't know how to proceed. Can someone please give a step-by-step procedure that a newbie like me would be able to follow? Thanks, in advance

---

<div class="post-metadata">

**Author:** ![Jason\_Wee](https://avatars.discourse-cdn.com/v4/letter/j/7ea924/32.png) [@Jason\_Wee](https://discuss.elastic.co/u/Jason_Wee)\
**Post date:** [July 7, 2015, 3:06pm UTC](https://discuss.elastic.co/t/how-to-perform-custom-similarity/24855/2 "2015-07-07T15:06:12Z")

</div>

compile and jar the class file. then specify the jar file in the elasticsearch classpath for all the nodes including client node?

---

<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:03am UTC](https://discuss.elastic.co/t/how-to-perform-custom-similarity/24855/3 "2017-07-06T00:03:09Z")

</div>


