lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shai Erera (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LUCENE-4575) Allow IndexWriter to commit, even just commitData
Date Thu, 29 Nov 2012 10:40:58 GMT

     [ https://issues.apache.org/jira/browse/LUCENE-4575?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Shai Erera updated LUCENE-4575:
-------------------------------

    Attachment: LUCENE-4575.patch

Patch adds setCommitData to IndexWriter and increase changeCount as well as sets that commitData
on segmentInfos. It also adds a test to verify the behavior.

Regarding back-compat - I prefer to nuke commit(data) and prepcommit(data), in exchange for
this API, for both trunk and 4.x.

This patch however supports the old commit/prepcommit(data) API, but I think that it will
be simpler if we just nuke these API. The migration to the new API is a no-brainer, just call
setCommitData before your commit().

I don't intend to commit it yet, depending on how we decide to handle back-compat. If we decide
to keep the back-compat support, I want to move the commit(data) and prepCommit(data) impls
to their respective no-data versions, and then have these API deprecated and call setCommitData()
followed by the respective no-data version.
                
> Allow IndexWriter to commit, even just commitData
> -------------------------------------------------
>
>                 Key: LUCENE-4575
>                 URL: https://issues.apache.org/jira/browse/LUCENE-4575
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: core/index
>            Reporter: Shai Erera
>            Priority: Minor
>         Attachments: LUCENE-4575.patch
>
>
> Spinoff from here http://lucene.472066.n3.nabble.com/commit-with-only-commitData-td4022155.html.
> In some cases, it is valuable to be able to commit changes to the index, even if the
changes are just commitData. Such data is sometimes used by applications to register in the
index some global application information/state.
> The proposal is:
> * Add a setCommitData() API and separate it from commit() and prepareCommit() (simplify
their API)
> * When that API is called, flip on the dirty/changes bit, so that this gets committed
even if no other changes were made to the index.
> I will work on a patch a post.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


Mime
View raw message