Developers, Ok this is the latest test program to reproduce the original problem reported. When I submitted the first test program, I was unable to reproduce the original, however this new test program reproduces both the original error and the second error which I reported in my last mail. I believe the problem lies in the second line of the SegmentsReader.readerIndex(int n) method. It doesn't compensate for the fact that if "readers.length" returns an int of value "0", the "hi" variable will be assigned a value of "-1", which is then returned to any calling methods!
Hope this is helpful, Rasik Pandey -----Message d'origine----- De : Rasik Pandey [mailto:[EMAIL PROTECTED]] Envoy� : lundi 9 septembre 2002 18:46 � : 'Lucene Developers List' Objet : RE : Possible Bug with MultiSearcher? Lucene Developers, A test program is attached. I reiterate that the searcher for the empty index must be added first. The exception thrown at the end of the program is an ArrayIndexOutOfBoundsException. I will continue trying to recreate the orginal exception which I reported, but I think this one may be related. I was unable to recreate the exception using RAMDirectory stores, but only two FSDirectory stores. It maybe necessary to delete these directories from time to time???? Please let me know if I can provide any more information. Rasik Pandey -----Message d'origine----- De : Doug Cutting [mailto:[EMAIL PROTECTED]] Envoy� : jeudi 5 septembre 2002 23:22 � : Lucene Developers List Objet : Re: Possible Bug with MultiSearcher? Can you please submit a complete, self-contained test program that demonstrates the problem? That will make it much easier for someone to debug and fix it. Thanks, Doug Rasik Pandey wrote: > Hello, > I am getting the following exception when searching using a > MultiSearcher and the first Searchable added is an empty IndexSearcher > with a segments file, the second is a normal IndexSearcher from a > populated Index . I am able to reproduce this without fail. The > exception is thrown when trying to retrieve a document from the Hits. > Is the exception really waranted, given there are hits in the second > index, I don't think the search should fail completely? When searching > an individual index, adding it to a Multisearcher, and performing the > search causes no problems. Any help or suggestions would be > appreciated. > > > Please see org.apache.lucene.store.InputStream.java 192:46 for the > location where the Exception is generated. > > > Rasik Pandey > > > java.io.IOException: read past EOF > at org.apache.lucene.store.InputStream.refill(Unknown Source) > at org.apache.lucene.store.InputStream.readByte(Unknown Source) > at org.apache.lucene.store.InputStream.readInt(Unknown Source) > at org.apache.lucene.store.InputStream.readLong(Unknown Source) > at org.apache.lucene.index.FieldsReader.doc(Unknown Source) > at org.apache.lucene.index.SegmentReader.document(Unknown Source) > at org.apache.lucene.search.IndexSearcher.doc(Unknown Source) > at org.apache.lucene.search.MultiSearcher.doc(Unknown Source) > at org.apache.lucene.search.Hits.doc(Unknown Source) > > > > > > -- > To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
TestMultiSearcher.java
Description: Binary data
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
