Description
The ReRankScaler collects specific information for the explain when debugQuery is set to true. But the parameter debug=true doesn't trigger the collection of this data which causes an NPE in the explain.
The work around is to always use debugQuery=true until this ticket is resolved and released.
It turned out that this ticket had two problems. The first one is described above. The second issue is that distributed explain is broken with the ReRankScaler.
The reason for this is that in order to do proper explain for minMaxScaling you need to know the min and max score in the result set. This piece of state is maintained in the ReRankScaler itself which is inside of the ReRankQuery. But for this information to be populated the query must first be run. In distributed mode, explain is called in the second pass when the ids query is run so the state needed for the explain is not populated. The PR attached to this addresses this problem by doing a single pass distributed query if debugQuery is turned on and if reRank score scaling is applied. I'll add a distributed test for this as well.
This change is very limited in scope because the single pass distributed is only switched on in the very specific case when debugQuery=true and reRankScaling is on.
Attachments
Issue Links
- breaks
-
SOLR-17296 rerank w/scaling (still) broken when using debug to get explain info
- Closed
- is cloned by
-
SOLR-16972 java.lang.NullPointerException in ReRankScaler.explain
- Resolved
- is related to
-
SOLR-16972 java.lang.NullPointerException in ReRankScaler.explain
- Resolved
- links to