lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (JIRA)" <>
Subject [jira] [Commented] (LUCENE-8330) Detach IndexWriter from MergePolicy
Date Thu, 24 May 2018 12:44:00 GMT


Robert Muir commented on LUCENE-8330:

Can we remove the hasDeletions from the interface? It makes the interface harder/seems redundant
since its just numDeletesToMerge > 0. I never understood the crazy == writer.getDirectory()
from before, but i didn't have the time to change it to an assert and see why its really needed
from tests.  At least if its really needed, the javadocs of the interface should explain enough
so we understand why it has this crazy check. 

In general though, the cleanup will be great for tests.

> Detach IndexWriter from MergePolicy
> -----------------------------------
>                 Key: LUCENE-8330
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Improvement
>    Affects Versions: 7.4, master (8.0)
>            Reporter: Simon Willnauer
>            Priority: Major
>             Fix For: 7.4, master (8.0)
>         Attachments: LUCENE-8330.patch
>  This change introduces a new MergePolicy.MergeContext interface
>     that is easy to mock and cuts over all instances of IW to MergeContext.
>     Since IW now implements MergeContext the cut over is straight forward.
>     This reduces the exposed API available in MP dramatically and allows
>     efficient testing without relying on IW to improve the coverage and
>     testability of our MP implementations.

This message was sent by Atlassian JIRA

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

View raw message