IndexUpdateListener

2006-05-13 Thread karl wettin
This might exist? How about a list of index listeners that is called when an index is updated? I want it to clear my hits cache. Perhaps it could be interesting for other people to know what document was changed. - To unsubscri

Re: IndexUpdateListener

2006-05-14 Thread Erik Hatcher
Lucene itself doesn't provide this, but Solr does. And with Solr you don't need your own custom Hits cache - it already provides caches in several areas. Erik On May 13, 2006, at 9:12 AM, karl wettin wrote: This might exist? How about a list of index listeners that is called whe

Re: IndexUpdateListener

2006-05-14 Thread karl wettin
On Sun, 2006-05-14 at 07:05 -0400, Erik Hatcher wrote: > Lucene itself doesn't provide this, but Solr does. I'm not using Solr :) But what you suggest is that I should try to fit in in my own layer around Lucene rather than in Lucene? May I ask why? Not sure if I would do it that way. To me it

Re: IndexUpdateListener

2006-05-14 Thread Yonik Seeley
On 5/14/06, karl wettin <[EMAIL PROTECTED]> wrote: To me it feels as the index is the only thing that knows for sure if it has been updated. I guess that would be whenever an IndexReader that had new deletions is closed, or an IndexWriter that changed the segments file? An app using Lucene sti

Re: IndexUpdateListener

2006-05-14 Thread Marc Dauncey
t;[EMAIL PROTECTED]> To: java-user@lucene.apache.org Sent: Sunday, 14 May, 2006 3:50:27 PM Subject: Re: IndexUpdateListener On 5/14/06, karl wettin <[EMAIL PROTECTED]> wrote: > To me it feels as the index is the > only thing that knows for sure if it has been updated. I guess that would be

Re: IndexUpdateListener

2006-05-14 Thread karl wettin
On Sun, 2006-05-14 at 10:50 -0400, Yonik Seeley wrote: > On 5/14/06, karl wettin <[EMAIL PROTECTED]> wrote: > > To me it feels as the index is the > > only thing that knows for sure if it has been updated. > > I guess that would be whenever an IndexReader that had new deletions > is closed, or an

Re: IndexUpdateListener

2006-05-14 Thread Erik Hatcher
On May 14, 2006, at 10:32 AM, karl wettin wrote: On Sun, 2006-05-14 at 07:05 -0400, Erik Hatcher wrote: Lucene itself doesn't provide this, but Solr does. I'm not using Solr :) But what you suggest is that I should try to fit in in my own layer around Lucene rather than in Lucene? May I ask

Re: IndexUpdateListener

2006-05-14 Thread Erik Hatcher
On May 14, 2006, at 1:48 PM, karl wettin wrote: An app using Lucene still needs to coordinate all the activity surrounding IndexReaders and IndexWriters, including explicit closure, so the app will know anyway when the index has changed, right? A car could go 600 miles in reverse, but I'd p

Re: IndexUpdateListener

2006-05-14 Thread karl wettin
On Sun, 2006-05-14 at 22:32 -0400, Erik Hatcher wrote: > On May 14, 2006, at 1:48 PM, karl wettin wrote: > >> An app using Lucene still needs to coordinate all the activity > >> surrounding IndexReaders and IndexWriters, including explicit > >> closure, > >> so the app will know anyway when the i

Re: IndexUpdateListener

2006-05-14 Thread karl wettin
On Sun, 2006-05-14 at 22:27 -0400, Erik Hatcher wrote: > What are the boundaries of what you call an "index"? Is it the > current Lucene API, or could it be a service-like layer such as Solr > on top of it? The persistence mechanism. So that would be a part of the the current Lucene API. >

Re: IndexUpdateListener

2006-05-14 Thread Yonik Seeley
On 5/14/06, karl wettin <[EMAIL PROTECTED]> wrote: On Sun, 2006-05-14 at 22:27 -0400, Erik Hatcher wrote: > What are the boundaries of what you call an "index"? Is it the > current Lucene API, or could it be a service-like layer such as Solr > on top of it? The persistence mechanism. So that wo

Re: IndexUpdateListener

2006-05-14 Thread Chris Hostetter
: As deep as possible. : : All the user would need to know is Directory.getListerners() I don't really get what the point of such a low level callback mechanism would be ... do you have uses cases where you're really going to want to know every time someone uses a Directory object to do something

Re: IndexUpdateListener

2006-05-14 Thread karl wettin
On Sun, 2006-05-14 at 21:09 -0700, Chris Hostetter wrote: > > Personally: I think the best way to be "notified" that the index is > changed at a really fine level of granularity is to just poll on > IndexReader.getCurrentVersion (and compare with > IndexReader.getVersion) ... that way you don't ha

Re: IndexUpdateListener

2006-05-15 Thread Eric Jain
Chris Hostetter wrote: THe only usefull callback/listner abstractions i can think of are when you want to know if someone has finished with a set of changes -- wether that change is adding one document, deleting one document, or adding/deleting a whole bunch of documents isn't really relevent, yo

Re: IndexUpdateListener

2006-05-15 Thread karl wettin
On Mon, 2006-05-15 at 06:35 +0200, karl wettin wrote: > Perhaps I can find a way to select notification strategy using > the same listener interface. I mostly look for the Solr-kind-of-solution for now, but I will absolutely keep my mind set on that the layer should allow hooks deep in the code.

Re: IndexUpdateListener

2006-05-27 Thread karl wettin
On Sun, 2006-05-14 at 22:32 -0400, Erik Hatcher wrote: > > On May 14, 2006, at 1:48 PM, karl wettin wrote: > >> An app using Lucene still needs to coordinate all the activity > >> surrounding IndexReaders and IndexWriters, including explicit > >> closure, so the app will know anyway when the ind