[ 
https://issues.apache.org/jira/browse/SOLR-9287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15364770#comment-15364770
 ] 

Hoss Man commented on SOLR-9287:
--------------------------------

Assertion...

{code}
    // if we use RTG (committed or otherwise) score should be ignored
    for (String fl : SCORE_AND_REAL_FIELDS) {
      for (String id : Arrays.asList("42","99")) {
        assertQ("id="+id+", fl="+fl+" ... score real fields",
                req("qt","/get","id",id, "wt","xml","fl",fl)
                ,"count(//doc)=1"
                ,"//doc/str[@name='id']"
                ,"//doc/int[@name='val_i']"
                ,"//doc/str[@name='ssto']"
                ,"//doc/str[@name='subject']"
                ,"//doc[count(*)=4]"
                );
      }
    }

{code}

Failure...

{noformat}
   [junit4]   2> NOTE: reproduce with: ant test  
-Dtestcase=TestPseudoReturnFields -Dtests.method=testScoreAndAllRealFieldsRTG 
-Dtests.seed=D743B648AB880B72 -Dtests.slow=true -Dtests.locale=no 
-Dtests.timezone=Pacific/Galapagos -Dtests.asserts=true 
-Dtests.file.encoding=US-ASCII
   [junit4] ERROR   0.03s J1 | 
TestPseudoReturnFields.testScoreAndAllRealFieldsRTG <<<
   [junit4]    > Throwable #1: java.lang.RuntimeException: Exception during 
query
   [junit4]    >        at 
__randomizedtesting.SeedInfo.seed([D743B648AB880B72:9B05ED6C0CADD185]:0)
   [junit4]    >        at 
org.apache.solr.SolrTestCaseJ4.assertQ(SolrTestCaseJ4.java:780)
   [junit4]    >        at 
org.apache.solr.search.TestPseudoReturnFields.testScoreAndAllRealFieldsRTG(TestPseudoReturnFields.java:172)
   [junit4]    >        at java.lang.Thread.run(Thread.java:745)
   [junit4]    > Caused by: java.lang.NullPointerException
   [junit4]    >        at 
org.apache.solr.response.ResultContext.wantsScores(ResultContext.java:51)
   [junit4]    >        at 
org.apache.solr.response.transform.ScoreAugmenter.transform(ScoreAugmenter.java:43)
   [junit4]    >        at 
org.apache.solr.handler.component.RealTimeGetComponent.process(RealTimeGetComponent.java:263)
   [junit4]    >        at 
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:292)
   [junit4]    >        at 
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:154)
   [junit4]    >        at 
org.apache.solr.core.SolrCore.execute(SolrCore.java:2035)
   [junit4]    >        at 
org.apache.solr.util.TestHarness.query(TestHarness.java:310)
   [junit4]    >        at 
org.apache.solr.util.TestHarness.query(TestHarness.java:292)
   [junit4]    >        at 
org.apache.solr.SolrTestCaseJ4.assertQ(SolrTestCaseJ4.java:754)
{noformat}

(NOTE: it doesn't matter if the doc is committed or uncommited, the NPE is 
consistent)

> single node RTG: NPE if score is requested
> ------------------------------------------
>
>                 Key: SOLR-9287
>                 URL: https://issues.apache.org/jira/browse/SOLR-9287
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Hoss Man
>
> Found in SOLR-9180 testing.
> In single node solr setups, if an RTG request is made that includes "score" 
> in the fl, then there is an NPE from ResultContext.wantsScores.
> This does *not* happen if the same request happens in a SolrCloud setup - in 
> that case the request for "score" is silently ignored -- this seems to me 
> like the optimal behavior  (similarly: using the {{\[explain\]}} transformer 
> in the fl for an RTG is currently silently ignored for both single node and 
> solr cloud envs)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to