lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <>
Subject Re: How to re-open the IndexSearcher's IndexReader
Date Fri, 11 May 2007 17:50:01 GMT

: Opening a new  IndexReader  is trivial.  But then how do I set the
: IndexSearcher's reader to the new one without getting a new instance?

just reopen a new IndexSearcher ... IndexSearchers are extremely light
weight and cheap, the meat they have is the IndexReader itself, so there
wouldn't be much benefit to changing the IndexReader for an IndexSearcher
.. it would be dangerous however for some of the APIs (like Hits), which
maintain a refrence to the Searcher that constructed them and expect the
view of the index to be consistent.


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

View raw message