I am using elasticsearch 5.5 and I am trying to implement my own scoring algorithm to calculate the edit distance and come up with a custom score.
I found lot of good examples of native scripts to do this,but since native since are deperecated in 5.5 I need to do this in scrpting engine.Does anyone have good examples of such custom score implementation via scripting engine?
The scripting documentation that you link is the defacto example. It shows all the boiler plate necessary for a ScriptEngine, as well as the details of accessing eg Lucene internals (PostingsEnum in this case). What additionally are you looking for?
Thanks @rjernst..Where could I find more information about all the methods and function?For example,leafscorefunction.I think what I am trying to find is something like a developer guide
You'll need to look at the javadocs and sourcecode, both for Elasticsearch and Lucene. Unfortunately there is no developer guide (yet). It is something that I personally would like to see as well, but our plugin api is still very much in flux, and until it is stabilized, working on such a guide would result in a lot of churn.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.