[ 
https://issues.apache.org/jira/browse/SOLR-2249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hoss Man reopened SOLR-2249:
----------------------------


I'm reopending this.

Even if the use case is incorrect, the error message needs to be fixed.

That still doesn't explain why the error is an AIOOB and not an error that 
better explains the root of the problem: too many terms in the field to build 
the field cache.

Historically, th exception thrown by the FieldCache would look something like...

java.lang.RuntimeException: there are more terms than documents in field 
"$FIELD", but it's impossible to sort on tokenized fields

...which is admittedly missleading since fieldcache can/is used in more cases 
then search, but at least it hinted at the problem.

"FieldCache.get*" should be throwing a more specific RuntimeException then 
AIOOB, and the various places Solr calls "FieldCacheImpl.get*" should be 
checking for that specifc RuntimeException and wrapping it in something that 
makes sense given the context. (ie: can't sort on this field, can't build field 
cache for this function, etc..


> ArrayIndexOutOfBoundsException
> ------------------------------
>
>                 Key: SOLR-2249
>                 URL: https://issues.apache.org/jira/browse/SOLR-2249
>             Project: Solr
>          Issue Type: Bug
>          Components: clients - php
>    Affects Versions: 1.4.1
>         Environment: Windows 7
>            Reporter: Anees shoukat
>
> When i add sort parameter in search query it generate Out of bound exception 
> know
> http://127.0.0.1:8983/solr/select/?q=great&sort=name desc
> 3
> java.lang.ArrayIndexOutOfBoundsException: 3
>       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.lucene.search.FieldComparator$StringOrdValComparator.setNextReader(FieldComparator.java:667)
>       at 
> org.apache.lucene.search.TopFieldCollector$OneComparatorNonScoringCollector.setNextReader(TopFieldCollector.java:94)
>       at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:249)
>       at org.apache.lucene.search.Searcher.search(Searcher.java:171)
>       at 
> org.apache.solr.search.SolrIndexSearcher.getDocListNC(SolrIndexSearcher.java:988)
>       at 
> org.apache.solr.search.SolrIndexSearcher.getDocListC(SolrIndexSearcher.java:884)
>       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 
> 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)
> RequestURI=/solr/select/
> Powered by Jetty://
> When run search without sort parameter it will be work fine
> http://127.0.0.1:8983/solr/select/?q=great

-- 
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to