You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Michael McCandless (JIRA)" <ji...@apache.org> on 2013/10/03 13:21:43 UTC

[jira] [Commented] (LUCENE-5250) Provide API to open IR on a specific IndexCommit with ReaderManager

    [ https://issues.apache.org/jira/browse/LUCENE-5250?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13785008#comment-13785008 ] 

Michael McCandless commented on LUCENE-5250:
--------------------------------------------

I think the use case here is to restrict the ReaderManager to certain
commits, right?

So not only on initial open, but also on subsequent reopens, you want
to only allow certain IndexCommits to be reopened?

Maybe we could make a new class, e.g. FilteredReaderManager, which is
just like ReaderManager except it adds a protected {code}boolean allowCommit(IndexCommit){code}
method, which a subclass would implement to filter the allowed IndexCommits.

refreshIfNeeded would then .listCommits in the index, move backwards
through that list checking for the first accepted one, and then reopen
to that one (if the current reader isn't already on that commit).

Though this is a fairly specialized use case, so maybe just subclassing
ReferenceManager directly (outside of Lucene) is the way to go ...


> Provide API to open IR on a specific IndexCommit with ReaderManager
> -------------------------------------------------------------------
>
>                 Key: LUCENE-5250
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5250
>             Project: Lucene - Core
>          Issue Type: Wish
>          Components: core/index
>    Affects Versions: 4.4
>            Reporter: Akos Kitta
>            Priority: Trivial
>
> Currently it is not possible to create a ReaderManager instance on a given IndexCommit. Since the ReaderManager is final class, one has to extend ReferenceManager instead when IR has to be opened on a specified IndexCommit.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

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