lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sonu SR" <son...@gmail.com>
Subject Re: How to reflect index changes to search automatically
Date Fri, 13 Jul 2007 09:15:57 GMT
Thanks Ard. I think option 2 is good. I will try this.

On 7/13/07, Ard Schrijvers <a.schrijvers@hippo.nl> wrote:
>
> The SearchClient is obviously not aware of a changing index, so doesn't
> know when it has to be reopened.
>
> You can at least do the following:
>
> 1) you periodically check for the index folder wether its timestamp did
> change (or if this stays the same, do it with the files in it) --> if
> changed, reopen the ParallelMultiSearcher. All you would need is some file
> monitor (filetimestamp validity cache)
>
> 2) you add eventListeners to the SearchServer, and implement something
> like jms (activeMQ , openJMS) to send events to all listeners on an index
> update, which in turn invalidate their ParallelMultiSearcher. (eventvalidity
> cache)
>
> 3) keep your searcher for X minutes, and then after x minnutes, reopen it
> (expires validity cache)
>
> obviously, number 2 is the nicest, though also the hardest
>
> Regards Ard
>
> > Hi,
> >      I have SearchServer and SearchClient programs. The SearchServer
> > using RemoteSearchable
> > for binding the indices in servers . The SearchClient using
> > ParallelMultiSearcher for searching the indices. The problem
> > is that I have
> > to restart the search servers for reflecting the index change
> > in search on
> > every index change(add or update). Is there any other
> > solution to reflect
> > the changes in search. That is without restarting the SearchServer.
> >
> > Thanks,
> > Sonu
> >
>
> ---------------------------------------------------------------------
> 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