On Jan 9, 2009, at 8:39 AM, Michael McCandless wrote:


Jason Rutherglen wrote:

Patch #1: Expose an IndexWriter.getReader method that returns the current reader and shares the write lock

I tentatively like this approach so far...

That reader is opened using IndexWriter's SegmentInfos instance, so it
can read segments & deletions that have been flushed but not
committed.  It's allowed to do its own deletions & norms updating.
When reopen() is called, it grabs the writers SegmentInfos again.

Minor design nit...
We've spent a lot of time up until now getting write functionality out of the Reader, and now we are going to add read functionality into the Writer? Is that the right thing to do? Perhaps there is an interface or some shared objects to be used/exposed or maybe people should get Readers/Writers from a factory and you could have a RT Factory and a default Factory? Not trying to distract from the deeper issues here, but I don't think it makes sense to have the Writer coupled to the Reader.

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-dev-h...@lucene.apache.org

Reply via email to