Код: Выделить всё
public Mono addContent(RequestDoc requestDoc) {
IndexRequest indexRequest = IndexRequest.of(request -> request
.index("test-index")
.document(requestDoc)
.pipeline("test-ingest-pipeline"));
return reactiveElasticsearchClient.index(indexRequest)
.onErrorResume(IOException.class,
e -> Mono.error(new ElasticsearchPublishException(ES_INDEX_INTERNAL_SERVER_ERROR, e)));
}
Подробнее здесь: https://stackoverflow.com/questions/786 ... sticsearch