lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dodson <mgdod...@mac.com>
Subject ArrayIndexOutOfBoundsException w/ ImageSearcher
Date Tue, 02 May 2006 23:46:04 GMT
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
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message