|
|
|
@@ -245,6 +245,7 @@ public class BaseServiceImpl<Q extends BaseEntity, D extends BaseEntity, IDG ext |
|
|
|
log.info(products.acknowledged()?"索引创建成功" : "索引创建失败"); |
|
|
|
} |
|
|
|
} catch (IOException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
throw new RuntimeException(e); |
|
|
|
} |
|
|
|
} |
|
|
|
@@ -255,6 +256,7 @@ public class BaseServiceImpl<Q extends BaseEntity, D extends BaseEntity, IDG ext |
|
|
|
try { |
|
|
|
// CharsetUtil |
|
|
|
String indexName = activeProfile+"_"+StrUtil.camelCaseToUnderscore(dto.getClass().getSimpleName()); |
|
|
|
log.info("indexName:{}", indexName); |
|
|
|
createEsIndex((D)dto); |
|
|
|
String finalIndexName = indexName; |
|
|
|
client.index(i -> i |
|
|
|
@@ -262,6 +264,7 @@ public class BaseServiceImpl<Q extends BaseEntity, D extends BaseEntity, IDG ext |
|
|
|
.id(dto.getId().toString()) |
|
|
|
.document(dto)); |
|
|
|
} catch (IOException e) { |
|
|
|
e.printStackTrace(); |
|
|
|
throw new RuntimeException(e); |
|
|
|
} |
|
|
|
} |