Page tree

The ScoreExplain  field expression will create a dynamic field that will contain the explanation of how the score was derived for a document. NOTE: This field expression should be used for debugging purposes only as it is extremely costly to compute. Setting the QueryRequest to debug mode will be equivalent to automatically adding a ScoreExplain field expression to the request.


QueryRequest request = new QueryRequest("AND(title:java, content:xml)");
request.addField("*"); // make sure we get all stored fields.
request.addField( new ScoreExplain("score.explain") );
// ... (Perform Search)

REST Syntax:



# Get score explain as text
&fields=SCOREEXPLAIN() AS score.explain
  • No labels