[jira] [Commented] (SOLR-17296) rerank w/scaling (still) broken when using debug to get explain info
[ https://issues.apache.org/jira/browse/SOLR-17296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17847463#comment-17847463 ] ASF subversion and git services commented on SOLR-17296: Commit 3389679d2309f48ce0e7c1c7b67f5b2014eecba1 in solr's branch refs/heads/branch_9_6 from Chris M. Hostetter [ https://gitbox.apache.org/repos/asf?p=solr.git;h=3389679d230 ] SOLR-17296: Remove (broken) singlePass attempt when reRankScale + debug is used, and fix underlying NPE. (cherry picked from commit 6af52f33ac78155523ec6fc610c563127b81c139) > rerank w/scaling (still) broken when using debug to get explain info > > > Key: SOLR-17296 > URL: https://issues.apache.org/jira/browse/SOLR-17296 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) >Affects Versions: 9.4 >Reporter: Chris M. Hostetter >Assignee: Chris M. Hostetter >Priority: Major > Attachments: SOLR-17296.test.patch > > Time Spent: 10m > Remaining Estimate: 0h > > The changes made in SOLR-16931 (9.4) attempted to work around problems that > existed when attempting to enable degugging (to get score explanations) in > combination with using {{reRankScale}} ... > {quote}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. ... > {quote} > However, the solution attempted was incomplete and failed to account for > multiple factors... > {quote}... 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. > {quote} > > * NPEs are still possible... > ** Instead of checking for {{ResponseBuilder.isDebugResults()}} (which is > what triggers explain logic) the new code only checked for specific debug > request param combinations: > *** {{debuQuery=true}} (a legacy option intended only for backcompat) > * > ** > *** {{debug=true}} (intended as an alias for {{debug=all}} > ** It did not check for either of these options, which if used will still > trigger an NPE... > *** {{debug=results}} (which actually dictates the value of > {{ResponseBuilder.isDebugResults()}} > *** {{debug=all}} (a short hand for setting all debug options) > * the attempt to force a single pass query didn't modify the correct variable > ** The new code modified a conditional based on a {{boolean > distribSinglePass}} for setting {{sreq.purpose}} and > {{rb.onePassDistributedQuery}} > ** But it did not modify the value of the {{boolean distribSinglePass}} > itself - meaning other logic that uses that variable in that method still > assumes multiple passes will be used. > ** In particular, these means that even though a single pass is used for > both {{PURPOSE_GET_TOP_IDS}} and {{PURPOSE_GET_FIELDS}} the full {{"fl"}} > requested by the user is not propagated as part of this request > *** Only the uniqueKey and any sot fields are ultimately returned to the > user. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org
[jira] [Commented] (SOLR-17296) rerank w/scaling (still) broken when using debug to get explain info
[ https://issues.apache.org/jira/browse/SOLR-17296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17847461#comment-17847461 ] ASF subversion and git services commented on SOLR-17296: Commit e16e99ad024f4081970ef2bf688e0537017e5c15 in solr's branch refs/heads/branch_9x from Chris M. Hostetter [ https://gitbox.apache.org/repos/asf?p=solr.git;h=e16e99ad024 ] SOLR-17296: Remove (broken) singlePass attempt when reRankScale + debug is used, and fix underlying NPE. (cherry picked from commit 6af52f33ac78155523ec6fc610c563127b81c139) > rerank w/scaling (still) broken when using debug to get explain info > > > Key: SOLR-17296 > URL: https://issues.apache.org/jira/browse/SOLR-17296 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) >Affects Versions: 9.4 >Reporter: Chris M. Hostetter >Assignee: Chris M. Hostetter >Priority: Major > Attachments: SOLR-17296.test.patch > > Time Spent: 10m > Remaining Estimate: 0h > > The changes made in SOLR-16931 (9.4) attempted to work around problems that > existed when attempting to enable degugging (to get score explanations) in > combination with using {{reRankScale}} ... > {quote}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. ... > {quote} > However, the solution attempted was incomplete and failed to account for > multiple factors... > {quote}... 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. > {quote} > > * NPEs are still possible... > ** Instead of checking for {{ResponseBuilder.isDebugResults()}} (which is > what triggers explain logic) the new code only checked for specific debug > request param combinations: > *** {{debuQuery=true}} (a legacy option intended only for backcompat) > * > ** > *** {{debug=true}} (intended as an alias for {{debug=all}} > ** It did not check for either of these options, which if used will still > trigger an NPE... > *** {{debug=results}} (which actually dictates the value of > {{ResponseBuilder.isDebugResults()}} > *** {{debug=all}} (a short hand for setting all debug options) > * the attempt to force a single pass query didn't modify the correct variable > ** The new code modified a conditional based on a {{boolean > distribSinglePass}} for setting {{sreq.purpose}} and > {{rb.onePassDistributedQuery}} > ** But it did not modify the value of the {{boolean distribSinglePass}} > itself - meaning other logic that uses that variable in that method still > assumes multiple passes will be used. > ** In particular, these means that even though a single pass is used for > both {{PURPOSE_GET_TOP_IDS}} and {{PURPOSE_GET_FIELDS}} the full {{"fl"}} > requested by the user is not propagated as part of this request > *** Only the uniqueKey and any sot fields are ultimately returned to the > user. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org
[jira] [Commented] (SOLR-17296) rerank w/scaling (still) broken when using debug to get explain info
[ https://issues.apache.org/jira/browse/SOLR-17296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17847452#comment-17847452 ] ASF subversion and git services commented on SOLR-17296: Commit 6af52f33ac78155523ec6fc610c563127b81c139 in solr's branch refs/heads/main from Chris M. Hostetter [ https://gitbox.apache.org/repos/asf?p=solr.git;h=6af52f33ac7 ] SOLR-17296: Remove (broken) singlePass attempt when reRankScale + debug is used, and fix underlying NPE. > rerank w/scaling (still) broken when using debug to get explain info > > > Key: SOLR-17296 > URL: https://issues.apache.org/jira/browse/SOLR-17296 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) >Affects Versions: 9.4 >Reporter: Chris M. Hostetter >Assignee: Chris M. Hostetter >Priority: Major > Attachments: SOLR-17296.test.patch > > Time Spent: 10m > Remaining Estimate: 0h > > The changes made in SOLR-16931 (9.4) attempted to work around problems that > existed when attempting to enable degugging (to get score explanations) in > combination with using {{reRankScale}} ... > {quote}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. ... > {quote} > However, the solution attempted was incomplete and failed to account for > multiple factors... > {quote}... 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. > {quote} > > * NPEs are still possible... > ** Instead of checking for {{ResponseBuilder.isDebugResults()}} (which is > what triggers explain logic) the new code only checked for specific debug > request param combinations: > *** {{debuQuery=true}} (a legacy option intended only for backcompat) > * > ** > *** {{debug=true}} (intended as an alias for {{debug=all}} > ** It did not check for either of these options, which if used will still > trigger an NPE... > *** {{debug=results}} (which actually dictates the value of > {{ResponseBuilder.isDebugResults()}} > *** {{debug=all}} (a short hand for setting all debug options) > * the attempt to force a single pass query didn't modify the correct variable > ** The new code modified a conditional based on a {{boolean > distribSinglePass}} for setting {{sreq.purpose}} and > {{rb.onePassDistributedQuery}} > ** But it did not modify the value of the {{boolean distribSinglePass}} > itself - meaning other logic that uses that variable in that method still > assumes multiple passes will be used. > ** In particular, these means that even though a single pass is used for > both {{PURPOSE_GET_TOP_IDS}} and {{PURPOSE_GET_FIELDS}} the full {{"fl"}} > requested by the user is not propagated as part of this request > *** Only the uniqueKey and any sot fields are ultimately returned to the > user. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org
[jira] [Commented] (SOLR-17296) rerank w/scaling (still) broken when using debug to get explain info
[ https://issues.apache.org/jira/browse/SOLR-17296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17847447#comment-17847447 ] ASF subversion and git services commented on SOLR-17296: Commit b4ed1d19cdb819ef023ab6a70cd25178391bc7bb in solr's branch refs/heads/SOLR-17296 from Chris M. Hostetter [ https://gitbox.apache.org/repos/asf?p=solr.git;h=b4ed1d19cdb ] Merge remote-tracking branch 'origin/main' into SOLR-17296 > rerank w/scaling (still) broken when using debug to get explain info > > > Key: SOLR-17296 > URL: https://issues.apache.org/jira/browse/SOLR-17296 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) >Affects Versions: 9.4 >Reporter: Chris M. Hostetter >Assignee: Chris M. Hostetter >Priority: Major > Attachments: SOLR-17296.test.patch > > Time Spent: 10m > Remaining Estimate: 0h > > The changes made in SOLR-16931 (9.4) attempted to work around problems that > existed when attempting to enable degugging (to get score explanations) in > combination with using {{reRankScale}} ... > {quote}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. ... > {quote} > However, the solution attempted was incomplete and failed to account for > multiple factors... > {quote}... 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. > {quote} > > * NPEs are still possible... > ** Instead of checking for {{ResponseBuilder.isDebugResults()}} (which is > what triggers explain logic) the new code only checked for specific debug > request param combinations: > *** {{debuQuery=true}} (a legacy option intended only for backcompat) > * > ** > *** {{debug=true}} (intended as an alias for {{debug=all}} > ** It did not check for either of these options, which if used will still > trigger an NPE... > *** {{debug=results}} (which actually dictates the value of > {{ResponseBuilder.isDebugResults()}} > *** {{debug=all}} (a short hand for setting all debug options) > * the attempt to force a single pass query didn't modify the correct variable > ** The new code modified a conditional based on a {{boolean > distribSinglePass}} for setting {{sreq.purpose}} and > {{rb.onePassDistributedQuery}} > ** But it did not modify the value of the {{boolean distribSinglePass}} > itself - meaning other logic that uses that variable in that method still > assumes multiple passes will be used. > ** In particular, these means that even though a single pass is used for > both {{PURPOSE_GET_TOP_IDS}} and {{PURPOSE_GET_FIELDS}} the full {{"fl"}} > requested by the user is not propagated as part of this request > *** Only the uniqueKey and any sot fields are ultimately returned to the > user. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org
[jira] [Commented] (SOLR-17296) rerank w/scaling (still) broken when using debug to get explain info
[ https://issues.apache.org/jira/browse/SOLR-17296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17847445#comment-17847445 ] Chris M. Hostetter commented on SOLR-17296: --- I've created SOLR-17299 to track long term improvements, I'll now go update the branch to include a link to this Jira and then merge & backport once i confirm all tests still pass. > rerank w/scaling (still) broken when using debug to get explain info > > > Key: SOLR-17296 > URL: https://issues.apache.org/jira/browse/SOLR-17296 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) >Affects Versions: 9.4 >Reporter: Chris M. Hostetter >Assignee: Chris M. Hostetter >Priority: Major > Attachments: SOLR-17296.test.patch > > Time Spent: 10m > Remaining Estimate: 0h > > The changes made in SOLR-16931 (9.4) attempted to work around problems that > existed when attempting to enable degugging (to get score explanations) in > combination with using {{reRankScale}} ... > {quote}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. ... > {quote} > However, the solution attempted was incomplete and failed to account for > multiple factors... > {quote}... 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. > {quote} > > * NPEs are still possible... > ** Instead of checking for {{ResponseBuilder.isDebugResults()}} (which is > what triggers explain logic) the new code only checked for specific debug > request param combinations: > *** {{debuQuery=true}} (a legacy option intended only for backcompat) > * > ** > *** {{debug=true}} (intended as an alias for {{debug=all}} > ** It did not check for either of these options, which if used will still > trigger an NPE... > *** {{debug=results}} (which actually dictates the value of > {{ResponseBuilder.isDebugResults()}} > *** {{debug=all}} (a short hand for setting all debug options) > * the attempt to force a single pass query didn't modify the correct variable > ** The new code modified a conditional based on a {{boolean > distribSinglePass}} for setting {{sreq.purpose}} and > {{rb.onePassDistributedQuery}} > ** But it did not modify the value of the {{boolean distribSinglePass}} > itself - meaning other logic that uses that variable in that method still > assumes multiple passes will be used. > ** In particular, these means that even though a single pass is used for > both {{PURPOSE_GET_TOP_IDS}} and {{PURPOSE_GET_FIELDS}} the full {{"fl"}} > requested by the user is not propagated as part of this request > *** Only the uniqueKey and any sot fields are ultimately returned to the > user. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org
[jira] [Commented] (SOLR-17296) rerank w/scaling (still) broken when using debug to get explain info
[ https://issues.apache.org/jira/browse/SOLR-17296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17847408#comment-17847408 ] Andy Webb commented on SOLR-17296: -- This approach sounds good - I agree that enabling debugging shouldn't change the behaviour. > rerank w/scaling (still) broken when using debug to get explain info > > > Key: SOLR-17296 > URL: https://issues.apache.org/jira/browse/SOLR-17296 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) >Affects Versions: 9.4 >Reporter: Chris M. Hostetter >Assignee: Chris M. Hostetter >Priority: Major > Attachments: SOLR-17296.test.patch > > Time Spent: 10m > Remaining Estimate: 0h > > The changes made in SOLR-16931 (9.4) attempted to work around problems that > existed when attempting to enable degugging (to get score explanations) in > combination with using {{reRankScale}} ... > {quote}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. ... > {quote} > However, the solution attempted was incomplete and failed to account for > multiple factors... > {quote}... 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. > {quote} > > * NPEs are still possible... > ** Instead of checking for {{ResponseBuilder.isDebugResults()}} (which is > what triggers explain logic) the new code only checked for specific debug > request param combinations: > *** {{debuQuery=true}} (a legacy option intended only for backcompat) > * > ** > *** {{debug=true}} (intended as an alias for {{debug=all}} > ** It did not check for either of these options, which if used will still > trigger an NPE... > *** {{debug=results}} (which actually dictates the value of > {{ResponseBuilder.isDebugResults()}} > *** {{debug=all}} (a short hand for setting all debug options) > * the attempt to force a single pass query didn't modify the correct variable > ** The new code modified a conditional based on a {{boolean > distribSinglePass}} for setting {{sreq.purpose}} and > {{rb.onePassDistributedQuery}} > ** But it did not modify the value of the {{boolean distribSinglePass}} > itself - meaning other logic that uses that variable in that method still > assumes multiple passes will be used. > ** In particular, these means that even though a single pass is used for > both {{PURPOSE_GET_TOP_IDS}} and {{PURPOSE_GET_FIELDS}} the full {{"fl"}} > requested by the user is not propagated as part of this request > *** Only the uniqueKey and any sot fields are ultimately returned to the > user. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org
[jira] [Commented] (SOLR-17296) rerank w/scaling (still) broken when using debug to get explain info
[ https://issues.apache.org/jira/browse/SOLR-17296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17847402#comment-17847402 ] David Smiley commented on SOLR-17296: - I just wish to +1 Hossman's sentiments. Toggling debugging should not change the semantics! > rerank w/scaling (still) broken when using debug to get explain info > > > Key: SOLR-17296 > URL: https://issues.apache.org/jira/browse/SOLR-17296 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) >Affects Versions: 9.4 >Reporter: Chris M. Hostetter >Assignee: Chris M. Hostetter >Priority: Major > Attachments: SOLR-17296.test.patch > > Time Spent: 10m > Remaining Estimate: 0h > > The changes made in SOLR-16931 (9.4) attempted to work around problems that > existed when attempting to enable degugging (to get score explanations) in > combination with using {{reRankScale}} ... > {quote}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. ... > {quote} > However, the solution attempted was incomplete and failed to account for > multiple factors... > {quote}... 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. > {quote} > > * NPEs are still possible... > ** Instead of checking for {{ResponseBuilder.isDebugResults()}} (which is > what triggers explain logic) the new code only checked for specific debug > request param combinations: > *** {{debuQuery=true}} (a legacy option intended only for backcompat) > * > ** > *** {{debug=true}} (intended as an alias for {{debug=all}} > ** It did not check for either of these options, which if used will still > trigger an NPE... > *** {{debug=results}} (which actually dictates the value of > {{ResponseBuilder.isDebugResults()}} > *** {{debug=all}} (a short hand for setting all debug options) > * the attempt to force a single pass query didn't modify the correct variable > ** The new code modified a conditional based on a {{boolean > distribSinglePass}} for setting {{sreq.purpose}} and > {{rb.onePassDistributedQuery}} > ** But it did not modify the value of the {{boolean distribSinglePass}} > itself - meaning other logic that uses that variable in that method still > assumes multiple passes will be used. > ** In particular, these means that even though a single pass is used for > both {{PURPOSE_GET_TOP_IDS}} and {{PURPOSE_GET_FIELDS}} the full {{"fl"}} > requested by the user is not propagated as part of this request > *** Only the uniqueKey and any sot fields are ultimately returned to the > user. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org
[jira] [Commented] (SOLR-17296) rerank w/scaling (still) broken when using debug to get explain info
[ https://issues.apache.org/jira/browse/SOLR-17296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17847120#comment-17847120 ] Chris M. Hostetter commented on SOLR-17296: --- {quote}I recommend we immediately: ... {quote} I've created a branch/PR with this solution implemented. There is currently just one {{nocommit}} which is a placeholder string for citing the new "SOLR-XXX" jira i proposed above to explore a longer term fix. If there are no objections to the approach I've taken in this branch i'll create that new jira and update the branch before merging. FWIW: I feel like this is a serious enough issue, with a safe enough solution, that I'd like to try and get it in the proposed 9.6.1 -- assuming we can get eyeballs on it ASAP. (I will be offline and unreachable for 2 weeks after May 21) /ping [~jbernste] [~cpoerschke] [~andywebb] > rerank w/scaling (still) broken when using debug to get explain info > > > Key: SOLR-17296 > URL: https://issues.apache.org/jira/browse/SOLR-17296 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) >Affects Versions: 9.4 >Reporter: Chris M. Hostetter >Priority: Major > Attachments: SOLR-17296.test.patch > > Time Spent: 10m > Remaining Estimate: 0h > > The changes made in SOLR-16931 (9.4) attempted to work around problems that > existed when attempting to enable degugging (to get score explanations) in > combination with using {{reRankScale}} ... > {quote}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. ... > {quote} > However, the solution attempted was incomplete and failed to account for > multiple factors... > {quote}... 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. > {quote} > > * NPEs are still possible... > ** Instead of checking for {{ResponseBuilder.isDebugResults()}} (which is > what triggers explain logic) the new code only checked for specific debug > request param combinations: > *** {{debuQuery=true}} (a legacy option intended only for backcompat) > * > ** > *** {{debug=true}} (intended as an alias for {{debug=all}} > ** It did not check for either of these options, which if used will still > trigger an NPE... > *** {{debug=results}} (which actually dictates the value of > {{ResponseBuilder.isDebugResults()}} > *** {{debug=all}} (a short hand for setting all debug options) > * the attempt to force a single pass query didn't modify the correct variable > ** The new code modified a conditional based on a {{boolean > distribSinglePass}} for setting {{sreq.purpose}} and > {{rb.onePassDistributedQuery}} > ** But it did not modify the value of the {{boolean distribSinglePass}} > itself - meaning other logic that uses that variable in that method still > assumes multiple passes will be used. > ** In particular, these means that even though a single pass is used for > both {{PURPOSE_GET_TOP_IDS}} and {{PURPOSE_GET_FIELDS}} the full {{"fl"}} > requested by the user is not propagated as part of this request > *** Only the uniqueKey and any sot fields are ultimately returned to the > user. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org
[jira] [Commented] (SOLR-17296) rerank w/scaling (still) broken when using debug to get explain info
[ https://issues.apache.org/jira/browse/SOLR-17296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17847076#comment-17847076 ] Chris M. Hostetter commented on SOLR-17296: --- I would argue that the "old" problem of NPE is the lesser of two evils compared to the "new" problem of silently failing to return fields – i'd much rather people who try to enable debugging get an error if it doesn't work then maybe not noticed that their response is missing fields they expected (when it's {{fl=*}} and you have a lot of stored fields it's really obvious something is wrong – if you use {{fl=id,special_rare_field}} you might not realize that {{special_rare_field}} is missing from docs that should actually have it. I also think that, in general, we should not *CHANGE* the core logic of how requests are processed (in this case to use single pass) because a debugging feature is enabled. If getting accurate debugging of reranked results requires using a single pass, let's *_inform_* our users of that, and let them *c{_}hoose{_}* to do it. I recommend we immediately: * revert the logic added by SOLR-16931 * Open a new SOLR-XXX jira for long term consideration of how to redesign debug component to get the multistage info needed for explaining reranked results * harden {{ReRankScaler.explain}} so that if the dat it expects isn't available, it wraps the data it *DOES* have with a {{"0.0 == scaled reranking not available (consider using distrib.singlePass - see SOLR-XXX)"}} > rerank w/scaling (still) broken when using debug to get explain info > > > Key: SOLR-17296 > URL: https://issues.apache.org/jira/browse/SOLR-17296 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) >Affects Versions: 9.4 >Reporter: Chris M. Hostetter >Priority: Major > Attachments: SOLR-17296.test.patch > > > The changes made in SOLR-16931 (9.4) attempted to work around problems that > existed when attempting to enable degugging (to get score explanations) in > combination with using {{reRankScale}} ... > {quote}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. ... > {quote} > However, the solution attempted was incomplete and failed to account for > multiple factors... > {quote}... 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. > {quote} * NPEs are still possible... > ** Instead of checking for {{ResponseBuilder.isDebugResults()}} (which is > what triggers explain logic) the new code only checked for specific debug > request param combinations: > * > ** > *** {{debuQuery=true}} (a legacy option intended only for backcompat) > *** {{debug=true}} (intended as an alias for {{debug=all}} > ** It did not check for either of these options, which if used will still > trigger an NPE... > *** {{debug=results}} (which actually dictates the value of > {{ResponseBuilder.isDebugResults()}} > *** {{debug=all}} (a short hand for setting all debug options) > * the attempt to force a single pass query didn't modify the correct variable > ** The new code modified a conditional based on a {{boolean > distribSinglePass}} for setting {{sreq.purpose}} and > {{rb.onePassDistributedQuery}} > ** But it did not modify the value of the {{boolean distribSinglePass}} > itself - meaning other logic that uses that variable in that method still > assumes multiple passes will be used. > ** In particular, these means that even though a single pass is used for > both {{PURPOSE_GET_TOP_IDS}} and {{PURPOSE_GET_FIELDS}} the full {{"fl"}} > requested by the user is not propagated as part of this request > *** Only the uniqueKey and any sot fields are ultimately returned to the > user. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org