This plugin contains a custom Similarity
class that can be used as follows.
Build the plugin with maven, then put the jar file into $ES_PATH/lib
.
Then, declare it in the settings section of your index:
"settings" : { "similarity" : { "my_similarity" : { "type" : "org.elasticsearch.index.similarity.CustomSimilarityProvider" } } }
After that, you can refer to my_similarity
when defining fields:
"book" : { "properties" : { "title" : { "type" : "string", "similarity" : "my_similarity" } } }
Enjoy