I was wondering if it's possible to obtain the value from a query which matched a particular field to use it in a custom boosting script.
I essentially need to calculate the score of how well a value from multi_match query matched an edgeNGram field based on the similarity of their length.
"15 Burnaby Road, B7 4LR" is a better match than
"1 Burnaby Road, B7 4LR" for
"155 Burnaby Road, B7 4LR"
Where house number, street name and postcode are separate fields.
I'm looking to get hold of 1 and 15 values in "function_score" query to calculate boosting based on how well they match the value 155 in "houseNr" field.
I'm interested only in tools & techniques that are built in Elasticsearch.