Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-9254

GraphTermsQueryQParserPlugin throws NPE when field being searched is not present in segment

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.2, 7.0
    • Component/s: None
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None

      Description

      My Jenkins found a reproducing seed on branch_6x:

      Checking out Revision d1a047ad6f24078f23c9b4adf15210ac8a6e8f8a (refs/remotes/origin/branch_6x)
      [...]
         [junit4]   2> NOTE: reproduce with: ant test  -Dtestcase=TestGraphTermsQParserPlugin -Dtests.method=testQueries -Dtests.seed=E47472DC605D2D21 -Dtests.slow=true -Dtests.linedocsfile=/home/jenkins/lucene-data/enwiki.random.lines.txt -Dtests.locale=sr-Latn-ME -Dtests.timezone=America/Guadeloupe -Dtests.asserts=true -Dtests.file.encoding=UTF-8
         [junit4] ERROR   0.06s J11 | TestGraphTermsQParserPlugin.testQueries <<<
         [junit4]    > Throwable #1: java.lang.RuntimeException: Exception during query
         [junit4]    > 	at __randomizedtesting.SeedInfo.seed([E47472DC605D2D21:B8FABE077A34988F]:0)
         [junit4]    > 	at org.apache.solr.SolrTestCaseJ4.assertQ(SolrTestCaseJ4.java:781)
         [junit4]    > 	at org.apache.solr.SolrTestCaseJ4.assertQ(SolrTestCaseJ4.java:748)
         [junit4]    > 	at org.apache.solr.search.TestGraphTermsQParserPlugin.testQueries(TestGraphTermsQParserPlugin.java:76)
         [junit4]    > 	at java.lang.Thread.run(Thread.java:745)
         [junit4]    > Caused by: java.lang.NullPointerException
         [junit4]    > 	at org.apache.solr.search.GraphTermsQParserPlugin$GraphTermsQuery$1.rewrite(GraphTermsQParserPlugin.java:223)
         [junit4]    > 	at org.apache.solr.search.GraphTermsQParserPlugin$GraphTermsQuery$1.bulkScorer(GraphTermsQParserPlugin.java:252)
         [junit4]    > 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:666)
         [junit4]    > 	at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:473)
         [junit4]    > 	at org.apache.solr.search.SolrIndexSearcher.buildAndRunCollectorChain(SolrIndexSearcher.java:261)
         [junit4]    > 	at org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1818)
         [junit4]    > 	at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1635)
         [junit4]    > 	at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:644)
         [junit4]    > 	at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:528)
         [junit4]    > 	at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:293)
         [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:755)
         [junit4]    > 	... 41 more
         [junit4]   2> NOTE: test params are: codec=Asserting(Lucene62): {test_tl=PostingsFormat(name=Direct), _version_=BlockTreeOrds(blocksize=128), test_ti=BlockTreeOrds(blocksize=128), term_s=PostingsFormat(name=Asserting), test_tf=PostingsFormat(name=LuceneVarGapDocFreqInterval), id=PostingsFormat(name=LuceneVarGapDocFreqInterval), group_s=PostingsFormat(name=LuceneVarGapDocFreqInterval)}, docValues:{}, maxPointsInLeafNode=1102, maxMBSortInHeap=5.004024995692577, sim=ClassicSimilarity, locale=sr-Latn-ME, timezone=America/Guadeloupe
         [junit4]   2> NOTE: Linux 4.1.0-custom2-amd64 amd64/Oracle Corporation 1.8.0_77 (64-bit)/cpus=16,threads=1,free=283609904,total=531628032
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                joel.bernstein Joel Bernstein
                Reporter:
                steve_rowe Steve Rowe
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: