Elasticsearch scripting engine

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?

https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting-engine.html

Native script example:

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.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.