Some time ago (Nov 5) Otis suggested to use one IndexSearcher instance for
search and recreate this instance when the index changed:

> Use a single instance of IndexSearcher.
> When you detect that the index has changed, through that instance (see
> javadoc for the exact method name, I don't recall its exact name now),
> discard that instance, and make a new one.

My problem is that I don't find an apropriate method in the javadoc.
Do I miss something?

There are static methods 'lastModified' in the IndexReader class.
So one might use these (together with a timestamp, when the IndexSearcher
was opened) to do the check.

But it would be nice to have some 'isUpToDate' method in the class itself.
Or should I do that myself by subclassing IndexSearcher?

Morus


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

Reply via email to