You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Steve Gaunt <SG...@emeraldinsight.com> on 2005/08/03 15:34:20 UTC

The best way to know when an index has been changed

Hi

We have a web app, which keep a copy of the index searcher, then reloads
the index searcher every night to obtain the latest version of the
index( as it updates every day).  
However, we have a fail over mode, which will eventually use another
index on another server, it there anyway to know if the underlying index
has been replaced with another index??? 


Cheers in advance 

Steve


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: The best way to know when an index has been changed

Posted by Luke <lu...@lukeshannon.com>.
Hi Steve;

Not sure if this would work...

Each day you could get the value from IndexReader's  getCurrentVersion and
store it somewhere (DB or serialize it). The next day when you grab the
value again you could compare it to the stored one, if they differ you would
know it has been replaced.

Luke

----- Original Message ----- 
From: "Steve Gaunt" <SG...@emeraldinsight.com>
To: <ja...@lucene.apache.org>
Sent: Wednesday, August 03, 2005 9:34 AM
Subject: The best way to know when an index has been changed


> Hi
>
> We have a web app, which keep a copy of the index searcher, then reloads
> the index searcher every night to obtain the latest version of the
> index( as it updates every day).
> However, we have a fail over mode, which will eventually use another
> index on another server, it there anyway to know if the underlying index
> has been replaced with another index???
>
>
> Cheers in advance
>
> Steve
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email
> ______________________________________________________________________
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org