lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erick Erickson" <erickerick...@gmail.com>
Subject Re: best practices for reloading an index for a searcher
Date Thu, 06 Dec 2007 18:09:42 GMT
If by reload you mean closing and opening the reader, then yes. You need
to do this in order to see the changes since the *last* time you opened
the reader.

Think of it as the reader taking a snapshot of the index and using that
for its lifetime.

Be aware that opening a reader (and running the first searches) is an
expensive operation and shouldn't be done unnecessarily. I guess it
all depends upon your requirements for how soon changes are available
for search.

As for guidelines, to quote the famous wise ones.... it depends. The
real question is how quickly your users require seeing recent changes.

One technique for handling these updates is to periodically open a new
reader
*without* closing the old one. Fire a few warm-up queries at the new
searcher,
then close the old one and start using the new one. There are some
coordination issues here..... Also be aware that this will chew up some
disk space....

Hope this helps
Erick

On Dec 6, 2007 12:43 PM, Beyer,Nathan <NBEYER@cerner.com> wrote:

> I did some searching on the lucene site and wiki, but didn't quite find
> what I was looking for in regards to a basic approach to how and when to
> reload index data. I have a long running process that will be
> continually indexing and concurrently searching the same index and I'm
> looking for a basic approach to reloading the data for the searcher.
> Perhaps I should verify that the data does need to be reloaded. Does a
> manual reload of a changing index need to be performed for a searcher?
>
> I'd appreciate any links to documents, source or some quick pseudo code.
>
> Thanks.
>
> -Nathan
>
> ----------------------------------------------------------------------
> CONFIDENTIALITY NOTICE This message and any included attachments are from
> Cerner Corporation and are intended only for the addressee. The information
> contained in this message is confidential and may constitute inside or
> non-public information under international, federal, or state securities
> laws. Unauthorized forwarding, printing, copying, distribution, or use of
> such information is strictly prohibited and may be unlawful. If you are not
> the addressee, please promptly delete this message and notify the sender of
> the delivery error by e-mail or you may call Cerner's corporate offices in
> Kansas City, Missouri, U.S.A at (+1) (816)221-1024.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message