Elasticsearch scripting engine


(Prasanna Kumar) #1

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:


(Ryan Ernst) #2

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?


(Prasanna Kumar) #3

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


(Ryan Ernst) #4

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.


(system) #5

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