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

NPE in CollapsingQParser when two fq={!collapse} and zero results

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 6.0
    • Fix Version/s: 6.2, 7.0
    • Component/s: None
    • Labels:
      None

      Description

      This is a very weird problem that is reproducible on a small production server, but not on the local machine although they run the same 6.0 version., and have an almost identical index. The only minor difference is that production is a SolrCloud with 1 shard and two replica's, just for a bit of redundancy.

      The following query yields zero results and throws the NPE:

      select?q=query:seis&fq={!collapse field=query_digest}&fq={!collapse field=result_digest}
      

      The next query does yield results and does not throw anything, it just works as it should work:

      select?q=query:seiz&fq={!collapse field=query_digest}&fq={!collapse field=result_digest}
      

      The /select handler used does not add any fancy param other than rows.

      Here's the NPE:

      2016-05-11 14:10:27.666 ERROR (qtp1209271652-3338) [c:suggestions s:shard1 r:core_node1 x:suggestions_shard1_replica1] o.a.s.s.HttpSolrCall null:java.lang.NullPointerException
              at org.apache.solr.search.CollapsingQParserPlugin$IntScoreCollector.finish(CollapsingQParserPlugin.java:814)
              at org.apache.solr.search.CollapsingQParserPlugin$IntScoreCollector.finish(CollapsingQParserPlugin.java:851)
              at org.apache.solr.search.SolrIndexSearcher.buildAndRunCollectorChain(SolrIndexSearcher.java:272)
              at org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:1794)
              at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:1611)
              at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:634)
              at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:529)
              at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:287)
              at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:155)
      

      Edit: for the sake of clarity. It really needs double fq={!collapse bla bla for the NPE to appear. If i remove either of the filters from the query, i get a nice zero resultset back. Both fields are defined as int.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                markus17 Markus Jelsma
              • Votes:
                1 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated: