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

Hoss Man commented on SOLR-9288:
--------------------------------

See TestPseudoReturnFields.testDocIdAugmenterRTG for example...

{code}
    // behavior shouldn't matter if we are committed or uncommitted
    for (String id : Arrays.asList("42","99")) {
      assertQ(id + ": fl=[docid]",
              req("qt","/get","id",id, "wt","xml", "fl","[docid]")
              ,"count(//doc)=1"
              ,"//doc/int[@name='[docid]']"
              ,"//doc[count(*)=1]"
              );
    }
{code}

current failure...

{noformat}
   [junit4]   2> NOTE: reproduce with: ant test  
-Dtestcase=TestPseudoReturnFields -Dtests.method=testDocIdAugmenterRTG 
-Dtests.seed=98335D83793D2329 -Dtests.slow=true -Dtests.locale=bg 
-Dtests.timezone=Pacific/Enderbury -Dtests.asserts=true 
-Dtests.file.encoding=UTF-8
   [junit4] ERROR   0.08s J1 | TestPseudoReturnFields.testDocIdAugmenterRTG <<<
   [junit4]    > Throwable #1: java.lang.RuntimeException: Exception during 
query
   [junit4]    >        at 
__randomizedtesting.SeedInfo.seed([98335D83793D2329:74889C9A69FA53]:0)
   [junit4]    >        at 
org.apache.solr.SolrTestCaseJ4.assertQ(SolrTestCaseJ4.java:780)
   [junit4]    >        at 
org.apache.solr.search.TestPseudoReturnFields.testDocIdAugmenterRTG(TestPseudoReturnFields.java:554)
   [junit4]    >        at java.lang.Thread.run(Thread.java:745)
   [junit4]    > Caused by: java.lang.RuntimeException: REQUEST FAILED: 
xpath=//doc/int[@name='[docid]']
   [junit4]    >        xml response was: <?xml version="1.0" encoding="UTF-8"?>
   [junit4]    > <response>
   [junit4]    > <doc name="doc"></doc>
   [junit4]    > </response>
   [junit4]    >        request was:qt=/get&fl=[docid]&id=99&wt=xml
   [junit4]    >        at 
org.apache.solr.SolrTestCaseJ4.assertQ(SolrTestCaseJ4.java:773)
{noformat}

NOTE: whatever solution is decided on, once the inconsistency is resolved, 
there are a lot of other test methods in TestPseudoReturnFields that can be 
updated to also exercise {{\[docid\]}}

> RTG: fl=[docid] silently missing for uncommitted docs
> -----------------------------------------------------
>
>                 Key: SOLR-9288
>                 URL: https://issues.apache.org/jira/browse/SOLR-9288
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Hoss Man
>
> Found in SOLR-9180 testing.
> when using RTG in a single node solr install, the {{\[docid\]}} transformer 
> works for committed docs, but is silently missing from uncommited docs.
> this inconsistency is confusing.  It seems like even if there is no valid 
> docid to return in this case, the key should still be present in the 
> resulting doc.
> I would suggest using either {{null}} or {{-1}} in this case?



--
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