Painless script - variable logging for scoring analysis

Typically in Lucene this would be done with an Explanation for the query/score. However, this isn't currently exposed in painless scoring scripts.

As a workaround, you could have a field script that returns a string explanation of your own, given that it looks like your entire score is based on your own values. The overhead would be minimal since it would only run on the top N docs.

1 Like