Custom score with distance levenstein

hi,

In first time I am sorry about my English.

I want scoring my document with only the distance levenstein.
I try to custom the Similarity but it doesn't work (i don't manage to
change the value of queryNorm)
I don't know how i can use the function_score.
So i try to extends AbstractFloatSearchScript, to do something like that.
How can i have the value of the query ?

public float runAsFloat() {
    
    LuceneLevenshteinDistance distance = new LuceneLevenshteinDistance

();

    String nomDoc = docFieldStrings("nom").getValue();
    float score = distance.getDistance(nomDoc, nomQuery);

    return score;
}



And I think there is a better way to do that.
I wait with pleasure for your proposals

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/2fcdae1c-79b3-4056-9f6c-aa6bfc30271c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.