3

I am using elasticsearch 5.5 and I am trying to implement my own scoring algorithm. I use match query with fuzziness 2 and I need terms that match to my query in my java custom acore 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:

https://github.com/ixxi-mobility/elasticsearch-editdistance-scoring

https://github.com/thomasheckmann/elasticsearch-hamming/blob/master/elasticsearch-hamming/src/main/java/dk/kolbeck/elastic/plugin/hamming/HammingDistanceScriptFactory.java

user2297083
  • 168
  • 11
  • I don't understand the question exactly. Your first link has an example of custom score implementation using a scripting engine script -- can't you start from that, add just add your own scoring logic? Maybe you can update the question with more details about where you're having trouble. – dshockley Aug 26 '17 at 07:59
  • facing the same issue. were you able to come up with a solution? – Bhadra Mar 23 '19 at 07:15

0 Answers0