lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alan Chandler" <a...@chandlerfamily.org.uk>
Subject Re: Confused about boolean query and how an IndexReader is associated with Hits
Date Wed, 07 Dec 2005 12:06:24 GMT
Erik Hatcher writes: 

> 
> On Dec 7, 2005, at 2:38 AM, Alan Chandler wrote:
>> Worse than that, when I attempt to access Hits.doc(0) I am getting an
>> immediate IOException with the message "Bad file descriptor".  I  think 
...
> 
> You must keep your IndexSearcher instance alive and well when working  
> with Hits.  Hits internally uses the searcher to page through results  - 
> it does not keep all results in memory.  I'm not sure why you  aren't 
> seeing all the documents you expect, but if you package it up  as a simple 
> RAMDirectory-using JUnit TestCase then I'd be happy to  run it and see.

mmm!  Going to have to rething my "Database" interface, so that I actually 
get the page of results I need coupled with the search. 

How do you get over the fact that the hits may be on several web pages and 
the user may go away between getting the hits and actually retrieving a 
document in detail.  Do you have to serialize the searcher and put it into a 
session? 


 --
Alan Chandler
alan@chandlerfamily.org.uk 



---------------------------------------------------------------------
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