public boolean putPipelineApi(String pipeId) throws IOException {
String source =
"{\"description\":\"my set of processors\"," +
"\"processors\":[{\"attachment\":{\"field\":\"data\",\"indexed_chars\":\"-1\"}}]}";
PutPipelineRequest request = new PutPipelineRequest(
pipeId,
new BytesArray(source.getBytes(StandardCharsets.UTF_8)),
XContentType.JSON
);
AcknowledgedResponse response = restHighLevelClient.ingest().putPipeline(request, RequestOptions.DEFAULT);
logger.info("管道创建接口执行完毕,{}", response.isAcknowledged());
return response.isAcknowledged();
}
elasticsearch管道创建java API
最新推荐文章于 2023-12-23 19:51:37 发布