lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <>
Subject [jira] Commented: (LUCENE-2691) Consolidate Near Real Time and Reopen API semantics
Date Thu, 25 Nov 2010 14:15:13 GMT


Michael McCandless commented on LUCENE-2691:

bq. You're still okay with an API that allows you to reopen IRs on different directories?

Well, that's no good - we can catch this and throw an exc?

bq. I think reopen should have no parameters, and IR.reopen(IC) moved elsewhere.

But where would you move IR.reopen(IC)?

bq. I'd personally like to see a special subclass of DIR that is returned from IW.getReader(),
that knows about specifics of being opened over an active writer.

That sounds great!

If we allow reopen to switch readers between modes, we're introducing yet more checking and
switching around.
Also we'll get irreversible circular dependency between readers and writers, which is also
a sign of things going wrong.

Really, there are two separate "things" open/reopen needs:

  # The SegmentInfos -- either by finding the latest & greatest in the
    Directory, latest & greatest via IW, or explicitly via an

  # A prior pool of readers so that anything needing a reader (IW
    doing a merge, IW applying deletes, app opening new readers, etc.)
    can re-use any already open sub readers.

Maybe we can split these out.

EG we've wanted for a while now to factor out the reader pool hidden
inside IW.  If we did this, and then allowed optionally passing a pool
to, I think we could do away with IR.reopen entirely?  We'd
have variants of taking IW, Dir, IndexCommit, to say where the
SegmentInfos come from, and then optionally also taking the explicit
reader pool.

> Consolidate Near Real Time and Reopen API semantics
> ---------------------------------------------------
>                 Key: LUCENE-2691
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Improvement
>            Reporter: Grant Ingersoll
>            Assignee: Grant Ingersoll
>            Priority: Minor
>             Fix For: 4.0
>         Attachments: LUCENE-2691.patch, LUCENE-2691.patch
> We should consolidate the IndexWriter.getReader and the IndexReader.reopen semantics,
since most people are already using the IR.reopen() method, we should simply add::
> {code}
> IR.reopen(IndexWriter)
> {code}
> Initially, it could just call the IW.getReader(), but it probably should switch to just
using package private methods for sharing the internals

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message