You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shai Erera (JIRA)" <ji...@apache.org> on 2014/03/19 05:16:55 UTC
[jira] [Updated] (LUCENE-5539) Simplify
IndexWriter.commitMergedDeletesAndUpdates
[ https://issues.apache.org/jira/browse/LUCENE-5539?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Shai Erera updated LUCENE-5539:
-------------------------------
Attachment: LUCENE-5539.patch
Patch adds {{MergedDeletesAndUpdates}} holder class with {{.init()}} - this removed the code duplication around the initialization of ReaderAndUpdates and DocMap in all of the branches in the method.
This allowed to extract a {{maybeApplyMergedDVUpdates()}} which removed a lot of other code duplication that existed because of how we initialized those variables before.
It's a small refactoring, but I will let tests run for a while to make sure eclipse did it right, before I commit :).
> Simplify IndexWriter.commitMergedDeletesAndUpdates
> --------------------------------------------------
>
> Key: LUCENE-5539
> URL: https://issues.apache.org/jira/browse/LUCENE-5539
> Project: Lucene - Core
> Issue Type: Improvement
> Components: core/index
> Reporter: Shai Erera
> Assignee: Shai Erera
> Priority: Minor
> Fix For: 4.8, 5.0
>
> Attachments: LUCENE-5539.patch
>
>
> IW.commitMergedDeletes could use some simplification. For example, if we factor out a holder class for {{mergedDeletesAndUpdates}} and {{docMap}}, we can factor out a lot of the duplicated logic into a single method. I'll attach a patch shortly.
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org