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

StatsComponent fails working with TriField

    XMLWordPrintableJSON

Details

    Description

      in the schema.xml under the solr/example/solr/collection1/conf/ directory, I modified the following three fields' type to TriField:
      <field name="weight" type="tfloat" indexed="true" stored="true"/>
      <field name="price" type="tfloat" indexed="true" stored="true"/>
      <field name="popularity" type="tint" indexed="true" stored="true" />
      Then I upload some documents under solr/exampledocs
      java -Durl=http://localhost:8983/solr/collection1/update -jar post.jar mem.xml
      java -Durl=http://localhost:8983/solr/collection1/update -jar post.jar monitor.xml
      java -Durl=http://localhost:8983/solr/collection1/update -jar post.jar monitor2.xml
      java -Durl=http://localhost:8983/solr/collection1/update -jar post.jar ipad_other.xml

      After that, I call the StatsComponent:
      http://localhost:8983/solr/collection1/select?q=*:*&wt=xml&rows=0&stats=true&stats.field=weight&stats.field=price&stats.facet=popularity

      I will catch an error:
      Jan 24, 2013 6:03:30 PM org.apache.solr.core.SolrCore execute
      INFO: [collection1] webapp=/solr path=/select params=

      {stats=true&distrib=false&wt=javabin&rows=10&version=2&NOW=1359021750668&shard.url=chn-bigdata-node3:8983/solr/collection1/&fl=id,score&df=text&start=0&stats.field=ss_quantity&q=*:*&isShard=true&fsv=true&f.ss_quantity.stats.facet=ss_store_sk&f.ss_quantity.stats.facet=ss_item_sk}

      hits=71995919 status=500 QTime=59252
      Jan 24, 2013 6:03:30 PM org.apache.solr.common.SolrException log
      SEVERE: null:java.lang.NumberFormatException: For input string: "L"
      at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
      at java.lang.Integer.parseInt(Integer.java:481)
      at java.lang.Integer.parseInt(Integer.java:514)
      at org.apache.solr.schema.TrieField.readableToIndexed(TrieField.java:312)
      at org.apache.solr.schema.TrieField.readableToIndexed(TrieField.java:303)
      at org.apache.solr.schema.TrieField.toInternal(TrieField.java:333)
      at org.apache.solr.request.UnInvertedField.getStats(UnInvertedField.java:610)
      at org.apache.solr.handler.component.SimpleStats.getStatsFields(StatsComponent.java:225)
      at org.apache.solr.handler.component.SimpleStats.getStatsCounts(StatsComponent.java:201)
      at org.apache.solr.handler.component.StatsComponent.process(StatsComponent.java:70)
      at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:206)
      at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
      at org.apache.solr.core.SolrCore.execute(SolrCore.java:1699)
      at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:455)
      at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:276)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1337)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:484)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:233)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
      at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
      at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
      at org.eclipse.jetty.server.Server.handle(Server.java:351)
      at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
      at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:47)
      at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:900)
      at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:954)
      at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:857)
      at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
      at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:66)
      at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:254)
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
      at java.lang.Thread.run(Thread.java:679)

      Jan 25, 2013 9:57:58 AM org.apache.solr.common.SolrException log
      SEVERE: java.lang.NumberFormatException: For input string: "L"
      at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
      at java.lang.Integer.parseInt(Integer.java:481)
      at java.lang.Integer.parseInt(Integer.java:514)
      at org.apache.solr.schema.TrieField.readableToIndexed(TrieField.java:312)
      at org.apache.solr.schema.TrieField.readableToIndexed(TrieField.java:303)
      at org.apache.solr.schema.TrieField.toInternal(TrieField.java:333)
      at org.apache.solr.request.UnInvertedField.getStats(UnInvertedField.java:610)
      at org.apache.solr.handler.component.SimpleStats.getStatsFields(StatsComponent.java:225)
      at org.apache.solr.handler.component.SimpleStats.getStatsCounts(StatsComponent.java:201)
      at org.apache.solr.handler.component.StatsComponent.process(StatsComponent.java:70)
      at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:206)
      at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
      at org.apache.solr.core.SolrCore.execute(SolrCore.java:1699)
      at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:455)
      at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:276)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1337)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:484)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:233)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
      at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
      at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
      at org.eclipse.jetty.server.Server.handle(Server.java:351)
      at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
      at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:47)
      at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:900)
      at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:954)
      at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:857)
      at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
      at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:66)
      at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:254)
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
      at java.lang.Thread.run(Thread.java:679)

      Jan 25, 2013 9:57:58 AM org.apache.solr.core.SolrCore execute
      INFO: [collection1] webapp=/solr path=/select params=

      {stats=true&distrib=false&wt=javabin&rows=10&version=2&NOW=1359079054099&shard.url=chn-bigdata-node3:8983/solr/collection1/&fl=id,score&df=text&start=0&stats.field=ss_quantity&q=*:*&isShard=true&fsv=true&f.ss_quantity.stats.facet=ss_store_sk&f.ss_quantity.stats.facet=ss_item_sk}

      hits=71995919 status=500 QTime=24250
      Jan 25, 2013 9:57:58 AM org.apache.solr.common.SolrException log
      SEVERE: null:java.lang.NumberFormatException: For input string: "L"
      at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
      at java.lang.Integer.parseInt(Integer.java:481)
      at java.lang.Integer.parseInt(Integer.java:514)
      at org.apache.solr.schema.TrieField.readableToIndexed(TrieField.java:312)
      at org.apache.solr.schema.TrieField.readableToIndexed(TrieField.java:303)
      at org.apache.solr.schema.TrieField.toInternal(TrieField.java:333)
      at org.apache.solr.request.UnInvertedField.getStats(UnInvertedField.java:610)
      at org.apache.solr.handler.component.SimpleStats.getStatsFields(StatsComponent.java:225)
      at org.apache.solr.handler.component.SimpleStats.getStatsCounts(StatsComponent.java:201)
      at org.apache.solr.handler.component.StatsComponent.process(StatsComponent.java:70)
      at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:206)
      at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
      at org.apache.solr.core.SolrCore.execute(SolrCore.java:1699)
      at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:455)
      at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:276)
      at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1337)
      at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:484)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:119)
      at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
      at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:233)
      at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)
      at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
      at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:192)
      at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
      at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
      at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:250)
      at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:149)
      at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
      at org.eclipse.jetty.server.Server.handle(Server.java:351)
      at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
      at org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:47)
      at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:900)
      at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:954)
      at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:857)
      at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
      at org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:66)
      at org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:254)
      at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:599)
      at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:534)
      at java.lang.Thread.run(Thread.java:679)

      Attachments

        Activity

          People

            Unassigned Unassigned
            harpe1999 zuwang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified