On 24 Oct 2005, at 10:07, Dan Adams wrote:
If I have a directory open and I open an index writer and add a
document
do I have to close the directory and re-open it before I can open a
searcher and have the new document be included in the search?
Yes.
In general, is it good to keep the directory open or is it better to
open the document each time you need a searcher or writer or
something.
In general it all depends :)
But, it is best to keep IndexSearcher cached over multiple searches
and only recreate it when the index changes and you need to reflect
those changes with future searches.
Erik
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]