use of org.apache.jackrabbit.oak.plugins.index.lucene.writer.CommitMitigatingTieredMergePolicy in project jackrabbit-oak by apache.
the class IndexDefinition method createMergePolicy.
private MergePolicy createMergePolicy() {
String mmp = System.getProperty("oak.lucene.cmmp");
if (mmp != null) {
return new CommitMitigatingTieredMergePolicy();
}
String mergePolicyName = getOptionalValue(definition, LuceneIndexConstants.MERGE_POLICY_NAME, null);
MergePolicy mergePolicy = null;
if (mergePolicyName != null) {
if (mergePolicyName.equalsIgnoreCase("no")) {
mergePolicy = NoMergePolicy.COMPOUND_FILES;
} else if (mergePolicyName.equalsIgnoreCase("mitigated")) {
mergePolicy = new CommitMitigatingTieredMergePolicy();
} else if (mergePolicyName.equalsIgnoreCase("tiered") || mergePolicyName.equalsIgnoreCase("default")) {
mergePolicy = new TieredMergePolicy();
} else if (mergePolicyName.equalsIgnoreCase("logbyte")) {
mergePolicy = new LogByteSizeMergePolicy();
} else if (mergePolicyName.equalsIgnoreCase("logdoc")) {
mergePolicy = new LogDocMergePolicy();
}
}
if (mergePolicy == null) {
mergePolicy = new TieredMergePolicy();
}
return mergePolicy;
}
Aggregations