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

java.lang.ArrayIndexOutOfBoundsException in field cache when using a tdate field in a boost function with rord()

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 1.4.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Mac OS 10.6
      java version "1.6.0_22"
      Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261)
      Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)

      Description

      I have been testing a switch to long and tdate instead of int and date fields in the schema.xml for our Drupal integration. This indexes fine, but search fails with a 500 error.

      INFO: [d7] webapp=/solr path=/select params={spellcheck=true&facet=true&facet.mincount=1&indent=1&spellcheck.q=term&json.nl=map&wt=json&rows=10&version=1.2&fl=id,entity_id,entity,bundle,bundle_name,nid,title,comment_count,type,created,changed,score,path,url,uid,name&start=0&facet.sort=true&q=term&bf=recip(rord(created),4,19,19)^200.0} status=500 QTime=4 
      Dec 5, 2010 11:52:28 AM org.apache.solr.common.SolrException log
      SEVERE: java.lang.ArrayIndexOutOfBoundsException: 39
              at org.apache.lucene.search.FieldCacheImpl$StringIndexCache.createValue(FieldCacheImpl.java:721)
              at org.apache.lucene.search.FieldCacheImpl$Cache.get(FieldCacheImpl.java:224)
              at org.apache.lucene.search.FieldCacheImpl.getStringIndex(FieldCacheImpl.java:692)
              at org.apache.solr.search.function.ReverseOrdFieldSource.getValues(ReverseOrdFieldSource.java:61)
              at org.apache.solr.search.function.TopValueSource.getValues(TopValueSource.java:57)
              at org.apache.solr.search.function.ReciprocalFloatFunction.getValues(ReciprocalFloatFunction.java:61)
              at org.apache.solr.search.function.FunctionQuery$AllScorer.<init>(FunctionQuery.java:123)
              at org.apache.solr.search.function.FunctionQuery$FunctionWeight.scorer(FunctionQuery.java:93)
              at org.apache.lucene.search.BooleanQuery$BooleanWeight.scorer(BooleanQuery.java:297)
              at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:250)
              at org.apache.lucene.search.Searcher.search(Searcher.java:171)
              at org.apache.solr.search.SolrIndexSearcher.getDocListAndSetNC(SolrIndexSearcher.java:1101)
              at org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:880)
              at org.apache.solr.search.SolrIndexSearcher.search(SolrIndexSearcher.java:341)
              at org.apache.solr.handler.component.QueryComponent.process(QueryComponent.java:182)
              at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:195)
              at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
              at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316)
              at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338)
              at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241)
              at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
              at com.acquia.search.HmacFilter.doFilter(HmacFilter.java:62)
              at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
              at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
              at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
              at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
              at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
              at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
              at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
              at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
              at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
              at org.mortbay.jetty.Server.handle(Server.java:285)
              at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502)
              at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:821)
              at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
              at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:208)
              at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)
              at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226)
              at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
      

      The exception goes away if I remove the boost function param bf=recip(rord(created),4,19,19)^200.0

      Omitting the recip() doesn't help, so just bf=rord(created)^200.0 still causes the exception.

      In this schema,

       <field name="created" type="tdate" indexed="true" stored="true"/>
      

      In the prior schema:

       <field name="created" type="date" indexed="true" stored="true"/>
      

      This seems somewhat related to: SOLR-324 which is marked as fixed.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                pwolanin Peter Wolanin
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: