You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by "jayson.minard" <ja...@gmail.com> on 2009/05/14 20:22:54 UTC

Re: Getting errors reading lucene indexes using recent lucene from Solr

It is the reverse case, created with solr, optimized and then in the
post-optimize listener open snapshot with lucene.

Code used is this: 

Directory directory = new FSDirectory(new File(luceneIndexDir), null); 
reader = IndexReader.open(directory, true); // open directory read-only 

... 
reader.document(curDoc++, FIELD_SELECTOR); 
... 

and it bombs on the document() call. 

I'll check our build to be sure we have the right lucene, but should... 
Obviously not though if the stack trace is off.

--j


Yonik Seeley-2 wrote:
> 
> On Thu, May 14, 2009 at 2:01 PM, jayson.minard <ja...@gmail.com>
> wrote:
>>
>> When using the Solr trunk tip, get this error now when reading an index
>> created by Solr with Lucene directly:
>>
>> java.lang.IndexOutOfBoundsException: Index: 24, Size: 0
>>        at java.util.ArrayList.RangeCheck(ArrayList.java:547)
>>        at java.util.ArrayList.get(ArrayList.java:322)
>>        at
>> org.apache.lucene.index.FieldInfos.fieldInfo(FieldInfos.java:253)
>>        at org.apache.lucene.index.FieldsReader.doc(FieldsReader.java:218)
>>        at
>> org.apache.lucene.index.SegmentReader.document(SegmentReader.java:914)
>>
>>
>> Anyone know what could cause this error?  Is it something writing the
>> index
>> incorrectly, or a read-side issue, or other?
> 
> Hmmm, OK... so you created the index with Lucene and are reading it with
> Solr.
> What version of Lucene did you use to create?
> 
> Your stack trace also doesn't line up with the last version of Lucene
> that Mark put in (r773862)
> 
> -Yonik
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Getting-errors-reading-lucene-indexes-using-recent-lucene-from-Solr-tp23545868p23546170.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org