# How customizable is ES?

**URL:** <https://discuss.elastic.co/t/how-customizable-is-es/6148>\
**Category:** Elasticsearch\
**Created:** [December 13, 2011, 8:14pm UTC](https://discuss.elastic.co/t/how-customizable-is-es/6148 "2011-12-13T20:14:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Felipe\_Hummel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felipe_hummel/32/1263_2.png) [@Felipe\_Hummel](https://discuss.elastic.co/u/Felipe_Hummel)\
**Post date:** [December 13, 2011, 8:14pm UTC](https://discuss.elastic.co/t/how-customizable-is-es/6148/1 "2011-12-13T20:14:06Z")

</div>

Hi, I'm studying a few options before implementing a solution for a  
distributed search setup.  
I'm very used to manually tunning Lucene to suit my needs. Like weighting  
fields, using customized collectors, using external source to change the  
score of a doc, changing the overall ranking formula. My question is, would  
I be able to those things in elasticsearch? Or, would I be able to  
customize Lucene behavior inside elasticsearch?  
I would like to use ES distributed and API capabilities but also being able  
to tune the ranking and other lucene related things.

To be able to do this kind of thing will I have to alter the own elastic  
search code?

Thanks

Felipe Hummel

---

<div class="post-metadata">

**Author:** ![Felipe\_Hummel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/felipe_hummel/32/1263_2.png) [@Felipe\_Hummel](https://discuss.elastic.co/u/Felipe_Hummel)\
**Post date:** [December 13, 2011, 10:47pm UTC](https://discuss.elastic.co/t/how-customizable-is-es/6148/2 "2011-12-13T22:47:03Z")

</div>

Just got answered by Kimchy on #elasticsearch:

depends on what you want to do..., custom collectors probably not,  
weighting fields =\> do you mean custom boost values? if so, you can.  
external source: what is external, you can write a script or even a custom  
Java code that does scoring, ranking formula, do you mean custom  
similarity? if so, you can

similarity is not documented, you will need to implement SimilarityProvider  
(check the Default one), and then you can configure:  
org.elasticsearch.index.similarity.index.type and  
org.elasticsearch.index.similarity.search.type to the full class name of  
the provider you have  
the code is htere:  
[https://github.com/elasticsearch/elasticsearch/tree/master/src/main/java/org/elasticsearch/index/similarity](https://github.com/elasticsearch/elasticsearch/tree/master/src/main/java/org/elasticsearch/index/similarity)

Java code to do scoring is documented, this is a sample for a custom score  
query based on a script:  
[http://www.elasticsearch.org/guide/reference/query-dsl/custom-score-query.html](http://www.elasticsearch.org/guide/reference/query-dsl/custom-score-query.html) and  
this part explains how to build a custom Java based script:  
[http://www.elasticsearch.org/guide/reference/modules/scripting.html](http://www.elasticsearch.org/guide/reference/modules/scripting.html)

That means I can do pretty much everything I wanted without ever touching  
ES source-code. Though, I can still do it if needed.

---

<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, 3:45am UTC](https://discuss.elastic.co/t/how-customizable-is-es/6148/3 "2017-07-06T03:45:28Z")

</div>


