lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley (JIRA)" <>
Subject [jira] Commented: (SOLR-2266) java.lang.ArrayIndexOutOfBoundsException in field cache when using a tdate field in a boost function with rord()
Date Sun, 05 Dec 2010 21:21:11 GMT


Yonik Seeley commented on SOLR-2266:

OK, here's my guess: it's probably due to multiple indexed values per field value.  ord/rord
uses the StringIndex to get the ord values, which can't handle multiple indexed tokens per
field value.

The "tdate" type has a precisionStep > 0, meaning it will index multiple values per field
value to speed up range queries.
If you don't need faster range queries on this type, then use "date" instead of "tdate".

But the ideal fix here is to eliminate the use of ord/rord since they also use up more memory...
sorting by "created" will instantiate a per-segment long[] FieldCache entry.
It would be nice if that could be reused for the function queries too.  This is the case if
you use ms().

> java.lang.ArrayIndexOutOfBoundsException in field cache when using a tdate field in a
boost function with rord()
> ----------------------------------------------------------------------------------------------------------------
>                 Key: SOLR-2266
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 1.4.1
>         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)
>            Reporter: Peter Wolanin
> 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.
> {code}
> INFO: [d7] webapp=/solr path=/select params={spellcheck=true&facet=true&facet.mincount=1&indent=1&spellcheck.q=term&,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$StringIndexCache.createValue(
>         at$Cache.get(
>         at
>         at
>         at
>         at
>         at$AllScorer.<init>(
>         at$FunctionWeight.scorer(
>         at$BooleanWeight.scorer(
>         at
>         at
>         at
>         at
>         at
>         at org.apache.solr.handler.component.QueryComponent.process(
>         at org.apache.solr.handler.component.SearchHandler.handleRequestBody(
>         at org.apache.solr.handler.RequestHandlerBase.handleRequest(
>         at org.apache.solr.core.SolrCore.execute(
>         at org.apache.solr.servlet.SolrDispatchFilter.execute(
>         at org.apache.solr.servlet.SolrDispatchFilter.doFilter(
>         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
>         at
>         at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
>         at org.mortbay.jetty.servlet.ServletHandler.handle(
>         at
>         at org.mortbay.jetty.servlet.SessionHandler.handle(
>         at org.mortbay.jetty.handler.ContextHandler.handle(
>         at org.mortbay.jetty.webapp.WebAppContext.handle(
>         at org.mortbay.jetty.handler.ContextHandlerCollection.handle(
>         at org.mortbay.jetty.handler.HandlerCollection.handle(
>         at org.mortbay.jetty.handler.HandlerWrapper.handle(
>         at org.mortbay.jetty.Server.handle(
>         at org.mortbay.jetty.HttpConnection.handleRequest(
>         at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(
>         at org.mortbay.jetty.HttpParser.parseNext(
>         at org.mortbay.jetty.HttpParser.parseAvailable(
>         at org.mortbay.jetty.HttpConnection.handle(
>         at$
>         at org.mortbay.thread.BoundedThreadPool$
> {code}
> 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, 
> {code}
>  <field name="created" type="tdate" indexed="true" stored="true"/>
> {code}
> In the prior schema:
> {code}
>  <field name="created" type="date" indexed="true" stored="true"/>
> {code}
> This seems somewhat related to:  SOLR-324 which is marked as fixed.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message