lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gérard Dupont <ger.dup...@gmail.com>
Subject DocSlide.DocIterator.nextDoc()
Date Fri, 27 Aug 2010 16:16:10 GMT
Hi all,

I recently came across a strange exception while using SolR. In fact I have
an ArrayOutOfBoundsException while using the server and making "normal"
query (I mean not different from before). The trace is he following :

Caused by: java.lang.ArrayIndexOutOfBoundsException: 2
at org.apache.solr.search.DocSlice$1.nextDoc(DocSlice.java:117)
at
org.apache.solr.highlight.DefaultSolrHighlighter.doHighlighting(DefaultSolrHighlighter.java:273)
 at
org.apache.solr.handler.component.HighlightComponent.process(HighlightComponent.java:89)
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.client.solrj.embedded.EmbeddedSolrServer.request(EmbeddedSolrServer.java:139)
... 37 more

It seems to be linked to the highlighting module but as I had a look on the
code I think I could understand why it fails :

      public int nextDoc() {
        return docs[pos++];
      }

So my basic reading tells me that one may eventually come in a case where
the system will do one too much "++" ;-) . Iguess one should prevent this
call checking the "hasNext()" but it not done everywhere apparently so I
suggest just to implement it in the nextDoc() it self...

What do you think ? Any one faced this problem yet ?

-- 
Gérard Dupont
Information Processing Control and Cognition (IPCC) - EADS DS
http://weblab.ow2.org

Document & Learning team - LITIS Laboratory

Mime
View raw message