Search code examples
azure-cognitive-searchazure-search-.net-sdk

Is it possible to get Solr-like debug information from Azure Search?


Is it possible to get detailed information about the returned results and how and why they were scored? Solr has a debug option where you can see exactly how a given document was scored, and can also return an explain plan for a query.

I have been searching the Azure Search docs, but i don't see anything like this mentioned there.

Is there any sort of debugging capability in Azure Search, and if not, is any such feature(s) on the roadmap for this service?

Update: Adding more for clarification, in the hopes of getting a response:

For example, here is an example of the debug information for a document returned by a query:

"2122aaea-dac2-4934-b6d2-5f38bdc906de": {
    "match": true,
    "value": 1.1052036,
    "description": "weight(_text_:house in 7) [SchemaSimilarity], result of:",
    "details": [
      {
        "match": true,
        "value": 1.1052036,
        "description": "score(freq=2.0), product of:",
        "details": [
          {
            "match": true,
            "value": 1.8216125,
            "description": "idf, computed as log(1 + (N - n + 0.5) / (n + 0.5)) from:",
            "details": [
              {
                "match": true,
                "value": 5,
                "description": "n, number of documents containing term"
              },
              {
                "match": true,
                "value": 33,
                "description": "N, total number of documents with field"
              }
            ]
          },
          {
            "match": true,
            "value": 0.6067172,
            "description": "tf, computed as freq / (freq + k1 * (1 - b + b * dl / avgdl)) from:",
            "details": [
              {
                "match": true,
                "value": 2.0,
                "description": "freq, occurrences of term within document"
              },
              {
                "match": true,
                "value": 1.2,
                "description": "k1, term saturation parameter"
              },
              {
                "match": true,
                "value": 0.75,
                "description": "b, length normalization parameter"
              },
              {
                "match": true,
                "value": 248.0,
                "description": "dl, length of field (approximate)"
              },
              {
                "match": true,
                "value": 224.0,
                "description": "avgdl, average length of field"
              }
            ]
          }
        ]
      }
    ]
  }

Solution

  • The answer at this moment is no. Unfortunately there's no "debug" / "explain" functionality available but as this is a frequent request, I would not be surprised if they add it in the future.