MarkWilliams wrote:
Hi,

I am having a strange problem with Lucene and am wondering if anyone can
help me.

I have Lucene indexing my site ok, but the problem is with queries.

Search is fine with some terms but when searching with certain other terms,
it seems mainly with terms containing spaces, although others have caused
problems, I get the IOException error "The handle is invalid". I have
debuged my app. and for some reason, the hits object is being filled with
mostly null doc objects and some doc objects with field values, however when
trying to loop through the hits object, I get the "The handle is invalid"
error.

Does anyone know why I'm getting so many empty doc objects and how I can go
about fixing the IOException error.

This sounds like a symptom of closing IndexReader (or IndexSearcher) too early. Your IndexReader/IndexSearcher must be open throughout the life of the Hits object - documents are lazy-loaded into Hits only when you request them, and behind the scenes Lucene is reading them from the IndexReader.

--
Best regards,
Andrzej Bialecki     <><
___. ___ ___ ___ _ _   __________________________________
[__ || __|__/|__||\/|  Information Retrieval, Semantic Web
___|||__||  \|  ||  |  Embedded Unix, System Integration
http://www.sigram.com  Contact: info at sigram dot com



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to