lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
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.




-Hoss


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