“Explain” and “Analyze” in Solr

If you add “&debugQuery=true” to the URL, you’ll get a JSON payload back for each row, which gives you the score computation, like so:

For solr, how ranking is computed is often more interesting than performance, but the same concepts for having a computation tree apply”

"ad7b44e1-44d5-4df1-a0fe-729633010c98": "
5.023878 = sum of:
  4.100354 = weight(talk_day_i:`\b\u0000\u0000\u0000\u0004 in 5) [ClassicSimilarity], result of:
    4.100354 = score(doc=5,freq=1.0), product of:
      0.972982 = queryWeight, product of:
        4.214214 = idf(docFreq=85, maxDocs=2140)
        0.23088102 = queryNorm
      4.214214 = fieldWeight in 5, product of:
        1.0 = tf(freq=1.0), with freq of:
          1.0 = termFreq=1.0
        4.214214 = idf(docFreq=85, maxDocs=2140)
        1.0 = fieldNorm(doc=5)
  0.9235241 = FunctionQuery(int(talk_day_i)), product of:
    4.0 = int(talk_day_i)=4
    0.23088102 = boost
    1.0 = queryNorm

You do also get the equivalent of analyze, and some information about how the query was prepared:

    "rawquerystring": "talk_day_i:4",
    "querystring": "talk_day_i:4",
    "parsedquery": "(+talk_day_i:4 FunctionQuery(int(talk_day_i)))/no_coord",
    "parsedquery_toString": "+talk_day_i:`\b\u0000\u0000\u0000\u0004 int(talk_day_i)",
    "explain": {
      ...
    },
    "QParser": "ExtendedDismaxQParser",
    "altquerystring": null,
    "boost_queries": null,
    "parsed_boost_queries": [],
    "boostfuncs": [
      "talk_day_i"
    ],
    "timing": {
      "time": 39,
      "prepare": {
        "time": 0,
        "query": {
          "time": 0
        },
        "facet": {
          "time": 0
        },
        "facet_module": {
          "time": 0
        },
        "mlt": {
          "time": 0
        },
        "highlight": {
          "time": 0
        },
        "stats": {
          "time": 0
        },
        "expand": {
          "time": 0
        },
        "debug": {
          "time": 0
        }
      },
      "process": {
        "time": 38,
        "query": {
          "time": 0
        },
        "facet": {
          "time": 0
        },
        "facet_module": {
          "time": 0
        },
        "mlt": {
          "time": 0
        },
        "highlight": {
          "time": 0
        },
        "stats": {
          "time": 0
        },
        "expand": {
          "time": 0
        },
        "debug": {
          "time": 38
        }
      }
    }