Let's say I search for "ABLS" and the SOLR returns a result that to me does not make any sense.
How can I debug why SOLR picked this record to be returned?

- 52,579
- 61
- 190
- 278
6 Answers
debugQuery=true
would help you get the detailed score calculation and the explanation for each scores.
An over view of the scoring is available at link
For detailed explaination of the debug information you can refer Link

- 52,349
- 4
- 80
- 90
-
3There's also tools like [Splainer](http://splainer.io) and [explain.solr.pl](http://explain.solr.pl) that can help parse explain info – Doug T. Aug 30 '14 at 23:33
You could add debugQuery=true&indent=true
to the url and examine the results. You could also use the analysis tool in solr. Go to the admin and click analysis. You would need to read the wiki to understand either of these more in depth.

- 804
- 5
- 8
Solr queries are full of short parameters, hard to read and modify, especially when the parameters are too many. And after it is even harder to debug and understand why a document is more or less relevant than another. The debug explain output usually is a three too big to fit in one page.
I found this Google Chrome extension useful to see Solr Query explain and debug in a clear manner.

- 25,946
- 8
- 108
- 125
queryDebug will give you knowledge about why your scoring looks like it does (end how every field is relevant). I will get some results that you are not understand and play with them with Solr's analysis You should find it under:
/admin/analysis.jsp?highlight=on
Alternatively turn on highlighting over your results to see what is actually matching in your results

- 5,298
- 3
- 25
- 35
For those who still use very old version of solr 3.X, "debugQuery=true" will not put the debug information. you should specify "debugQuery=on".

- 2,633
- 3
- 21
- 18
There are two ways of doing that. First is the query level, which means adding the debugQuery=on
to your query. That will include a few things:
- parsed query
- debug timing information
- detailed scoring information which helps you with analysis of why a give document is given a score.
In addition to that, you can use the [explain]
transformer and add it to your fl
parameter. For example ...&fl=*,[explain]
, which will result in your documents having the scoring information as another field.
The scoring information can be quite extensive and will include calculations done by the similarity algorithm. If you would like to learn more about the similarities and the scoring algorithm in Solr, have a look at this my and my colleague Radu from Sematext talk from the Activate conference: https://www.youtube.com/watch?v=kKocQdYGVJM

- 216
- 1
- 5