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

NPE while doing regular Facet

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 7.5.0
    • Fix Version/s: None
    • Component/s: Facet Module
    • Labels:
      None

      Description

      I am issuing a regular facet query:

                  params = new ModifiableSolrParams()
                          .add("q", query.trim())
                          .add("rows", "0")
                          .add("facet", "true")
                          .add("facet.field", "description")
                          .add("facet.limit", "200");
      

      Exception:

      2018-12-24 15:50:20.843 ERROR (qtp690521419-130) [c:wiki s:shard2 r:core_node4 x:wiki_shard2_replica_n2] o.a.s.s.HttpSolrCall null:org.apache.solr.common.SolrException: Exception during facet.field: description
      	at org.apache.solr.request.SimpleFacets.lambda$getFacetFieldCounts$0(SimpleFacets.java:832)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at org.apache.solr.request.SimpleFacets$3.execute(SimpleFacets.java:765)
      	at org.apache.solr.request.SimpleFacets.getFacetFieldCounts(SimpleFacets.java:841)
      	at org.apache.solr.handler.component.FacetComponent.getFacetCounts(FacetComponent.java:329)
      	at org.apache.solr.handler.component.FacetComponent.process(FacetComponent.java:273)
      	at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:298)
      	at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:199)
      	at org.apache.solr.core.SolrCore.execute(SolrCore.java:2541)
      	at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:709)
      	at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:515)
      	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:377)
      	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:323)
      	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1634)
      	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
      	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
      	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
      	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1317)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
      	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
      	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
      	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
      	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1219)
      	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
      	at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:219)
      	at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
      	at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)
      	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
      	at org.eclipse.jetty.server.Server.handle(Server.java:531)
      	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352)
      	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)
      	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281)
      	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
      	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
      	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
      	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:762)
      	at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:680)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.NullPointerException
      	at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936)
      	at org.apache.solr.util.ConcurrentLRUCache.get(ConcurrentLRUCache.java:124)
      	at org.apache.solr.search.FastLRUCache.get(FastLRUCache.java:163)
      	at org.apache.solr.search.SolrIndexSearcher.getPositiveDocSet(SolrIndexSearcher.java:833)
      	at org.apache.solr.search.SolrIndexSearcher.numDocs(SolrIndexSearcher.java:2073)
      	at org.apache.solr.request.SimpleFacets.getListedTermCounts(SimpleFacets.java:876)
      	at org.apache.solr.request.SimpleFacets.lambda$getFacetFieldCounts$0(SimpleFacets.java:824)
      	... 46 more
      

      description field description:

          <fieldType name="text_general" class="solr.SortableTextField" positionIncrementGap="100" multiValued="true">
            <analyzer type="index">
              <charFilter class="solr.HTMLStripCharFilterFactory"/>
              <tokenizer class="solr.StandardTokenizerFactory"/>
              <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
              <!-- in this example, we will only use synonyms at query time
              <filter class="solr.SynonymGraphFilterFactory" synonyms="index_synonyms.txt" ignoreCase="true" expand="false"/>
              <filter class="solr.FlattenGraphFilterFactory"/>
              -->
              <filter class="solr.LowerCaseFilterFactory"/>
            </analyzer>
            <analyzer type="query">
              <tokenizer class="solr.StandardTokenizerFactory"/>
              <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" />
              <filter class="solr.SynonymGraphFilterFactory" synonyms="synonyms.txt" ignoreCase="true" expand="true"/>
              <filter class="solr.LowerCaseFilterFactory"/>
            </analyzer>
          </fieldType>
      
          <field name="description" type="text_general" indexed="true" stored="true" multiValued="false"/>
      

      The expectation is not to receive NPE and gracful exception even if the request fails.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sarkaramrit2@gmail.com Amrit Sarkar
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: