lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Avi Drissman <>
Subject Re: Bad File Descriptor Exception
Date Wed, 13 Mar 2002 14:58:07 GMT
At 6:21 PM +0530 3/13/02, you wrote:

>Hits hits =; //returns hits properly
>for (int i =0; i< hits.length();i++)
>     Document doc = hits.doc(i); // throws exception "Bad Fle Descriptor"

Are you closing the searcher between the search and the loop?

Hits objects don't contain all the results. They have about 100, and 
they a reference to the searcher so that they can get more results if 
they have to. If you close the searcher, then you will hit this type 
of behavior.


Avi Drissman
Argh! This darn mailserver is trunca

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message