lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dodson <mgdod...@mac.com>
Subject Re: ArrayIndexOutOfBoundsException w/ ImageSearcher
Date Wed, 03 May 2006 17:36:24 GMT
I think I've fixed my own problem.  I was using 1.4.3 in my code and  
the index was using 1.9.1.  I updated and no longer get the error.   
Is this consistent with other people's experience though?  I want to  
make sure this was actually the problem so the error doesn't  
resurface later.

Thanks.

Mike

On May 3, 2006, at 12:46 AM, Michael Dodson wrote:

> Hi,
>
> I'm getting an ArrayIndexOutOfBoundsException when I try to create  
> an instance of IndexSearcher with an FSDirectory.
>
> for IndexSearcher searcher = new IndexSearcher(directory);
>
> I get the following stack trace:
>
> Exception in thread "main"  
> java.lang.ArrayIndexOutOfBoundsException: -1
> 	at java.util.ArrayList.get(ArrayList.java:323)
> 	at org.apache.lucene.index.FieldInfos.fieldInfo(FieldInfos.java:155)
> 	at org.apache.lucene.index.FieldInfos.fieldName(FieldInfos.java:151)
> 	at org.apache.lucene.index.SegmentTermEnum.readTerm 
> (SegmentTermEnum.java:149)
> 	at org.apache.lucene.index.SegmentTermEnum.next 
> (SegmentTermEnum.java:115)
> 	at org.apache.lucene.index.TermInfosReader.readIndex 
> (TermInfosReader.java:86)
> 	at org.apache.lucene.index.TermInfosReader.<init> 
> (TermInfosReader.java:45)
> 	at org.apache.lucene.index.SegmentReader.initialize 
> (SegmentReader.java:112)
> 	at org.apache.lucene.index.SegmentReader.<init>(SegmentReader.java: 
> 89)
> 	at org.apache.lucene.index.IndexReader$1.doBody(IndexReader.java:118)
> 	at org.apache.lucene.store.Lock$With.run(Lock.java:109)
> 	at org.apache.lucene.index.IndexReader.open(IndexReader.java:111)
> 	at org.apache.lucene.index.IndexReader.open(IndexReader.java:106)
> 	at org.apache.lucene.search.IndexSearcher.<init> 
> (IndexSearcher.java:43)
> 	at diploma.project.searching.ImageSearcher.contentSearch 
> (ImageSearcher.java:356)
> 	at diploma.project.searching.ImageSearcher.searchIndex 
> (ImageSearcher.java:136)
> 	at diploma.project.searching.ImageSearcher.main(ImageSearcher.java: 
> 666)
>
> Where the last three lines are traced into the class where I'm  
> trying to create the instance.  It is possible the index I am  
> trying to open has been created with a different version of  
> lucene.  I'm not sure if that could create this error but it was my  
> best guess.
>
> Thanks,
>
> Mike


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


Mime
View raw message