mirror of https://github.com/apache/lucene.git
6b6932e8e1
* fix so that getMergePolicy() can now be called more than once * added WrapperMergePolicyFactoryTest.testUpgradeIndexMergePolicyFactory() * account for overlap between wrapping and wrapped setters (and disallow it) ** illustration: <mergePolicyFactory class="UpgradeMergePolicyFactory"> <int name="noCFSRatio">0.24</int> <str name="wrapped.prefix">mergePolicy</str> <str name="mergePolicy.class">TieredMergePolicyFactory</str> <int name="mergePolicy.noCFSRatio">0.42</int> </mergePolicyFactory> ** implementation details: the wrapping MP's setter calls the wrapped MP's setter and in the current code the wrapping MP's value prevails i.e. the 0.24 value in the illustration since the wrapped MP is constructed before the wrapping MP. an end-user however might reasonably assume that the wrapped MP's 0.42 value will prevail. at best configuring the same setter twice within the same overall <mergePolicyFactory> element is ambiguous and so the code now disallows it. |
||
---|---|---|
.. | ||
src | ||
build.xml | ||
ivy.xml |