Showing
1 changed file
with
3 additions
and
5 deletions
@@ -187,8 +187,10 @@ public class YohoIndexServiceImpl implements IYohoIndexService, ApplicationEvent | @@ -187,8 +187,10 @@ public class YohoIndexServiceImpl implements IYohoIndexService, ApplicationEvent | ||
187 | indexSettings.putAll(index.getAnalysisSettings());//设置分词器信息 | 187 | indexSettings.putAll(index.getAnalysisSettings());//设置分词器信息 |
188 | indexSettings.put("max_result_window", "100000000"); | 188 | indexSettings.put("max_result_window", "100000000"); |
189 | indexSettings.put("number_of_replicas", this.genNumberOfReplicas(client, index.getIndexSettings()));//处理复制分片 | 189 | indexSettings.put("number_of_replicas", this.genNumberOfReplicas(client, index.getIndexSettings()));//处理复制分片 |
190 | - | ||
191 | client.createIndex(newRealIndexName, type, indexSettings, mappingContent); | 190 | client.createIndex(newRealIndexName, type, indexSettings, mappingContent); |
191 | + // 打印索引设置 | ||
192 | + INDEX_REBUILD_LOG.info("rebuild [{}],step=[3.createTempIndex success],newRealIndexName = [{}], mappingContent=[{}],indexSettings=[{}]", yohoIndexName, newRealIndexName, mappingContent, indexSettings); | ||
193 | + | ||
192 | // 5、删除旧索引别名 | 194 | // 5、删除旧索引别名 |
193 | if (oldRealIndexNames != null && !oldRealIndexNames.isEmpty()) { | 195 | if (oldRealIndexNames != null && !oldRealIndexNames.isEmpty()) { |
194 | client.removeAlias(oldRealIndexNames, alias); | 196 | client.removeAlias(oldRealIndexNames, alias); |
@@ -333,10 +335,6 @@ public class YohoIndexServiceImpl implements IYohoIndexService, ApplicationEvent | @@ -333,10 +335,6 @@ public class YohoIndexServiceImpl implements IYohoIndexService, ApplicationEvent | ||
333 | 335 | ||
334 | // 3、获取临时索引的别名 | 336 | // 3、获取临时索引的别名 |
335 | String yohoTemplateIndexName = yohoIndexNameHelper.genYohoTemplateIndexName(yohoIndexName); | 337 | String yohoTemplateIndexName = yohoIndexNameHelper.genYohoTemplateIndexName(yohoIndexName); |
336 | - | ||
337 | - // 4、创建临时索引 | ||
338 | - INDEX_REBUILD_LOG.info("rebuild [{}],step=[3.createTempIndex begin],mappingContent=[{}],properties=[{}]", yohoIndexName, yohoIndex.getMappingContent(), | ||
339 | - yohoIndex.getIndexSettings()); | ||
340 | String tempIndexRealName = this.createIndex(yohoIndexName, yohoTemplateIndexName, false); | 338 | String tempIndexRealName = this.createIndex(yohoIndexName, yohoTemplateIndexName, false); |
341 | INDEX_REBUILD_LOG.info("rebuild [{}],step=[3.createTempIndex success],tempIndexRealName=[{}],", yohoIndexName, tempIndexRealName); | 339 | INDEX_REBUILD_LOG.info("rebuild [{}],step=[3.createTempIndex success],tempIndexRealName=[{}],", yohoIndexName, tempIndexRealName); |
342 | 340 |
-
Please register or login to post a comment