首页 > 解决方案 > How do identify why certain documents are returned in SOLR response that may not be relevant for given keyword search?

问题描述

We see certain documents in WCS SOLR response that are not relevant for given search keyword, but are part of the current customer/site catalog and categories. I do see SOLR debugging information, parser queries, filters, etc.. but trying to know if it's possible to know why a document was included in the response. I do see explain string and haven't spent time understanding whole algorithm behind it, would like to see if there is a quick way of knowing why the document was in the result/response list. This may help identifying catalog/categories data structure issue or any bugs in our SOLR implementation.

Is it possible to see the debug information at each returned document level in the response, if that helps understanding how SOLR is configured and working in the environment?

Thanks,

标签: solrwcs

解决方案


When you pass debugQuery=true in the request you can see in the debug/explain node of the response the reason for the score of each document. The information will look more or less like this:

...
"debug": {
  ...
  "explain": {
    "id:1": "info about the score for document 1",
    "id:2": "info about the score for document 2",
    "id:3": "info about the score for document 2",
    "id:4": "info about the score for document 4",
    ...
  }
}

The information is not exactly easy to parse and decipher but it might be a good place to start.

I explain in this blog post more about how to read the information in the explain section: https://library.brown.edu/DigitalTechnologies/understanding-scoring-of-documents-in-solr/


推荐阅读