SOLR-8621: Fix SolrIndexConfig.toMap() to use mergePolicyFactoryInfo if present

This commit is contained in:
Shai Erera 2016-02-08 23:19:51 +02:00
parent 03d7f80b27
commit fe2cf25079
1 changed files with 5 additions and 1 deletions

View File

@ -188,7 +188,11 @@ public class SolrIndexConfig implements MapSerializable {
"lockType", lockType,
"infoStreamEnabled", infoStream != InfoStream.NO_OUTPUT);
if(mergeSchedulerInfo != null) m.put("mergeScheduler",mergeSchedulerInfo.toMap());
if(mergePolicyInfo != null) m.put("mergePolicy",mergePolicyInfo.toMap());
if (mergePolicyInfo != null) {
m.put("mergePolicy", mergePolicyInfo.toMap());
} else if (mergePolicyFactoryInfo != null) {
m.put("mergePolicy", mergePolicyFactoryInfo.toMap());
}
if(mergedSegmentWarmerInfo != null) m.put("mergedSegmentWarmer",mergedSegmentWarmerInfo.toMap());
return m;
}