Код: Выделить всё
List listIndexOperations = productionList.stream()
.map(production -> BulkOperation.of(bulkOpBuilder -> bulkOpBuilder
.index(indexOpBuilder -> indexOpBuilder
.id(production.getId().toString())
.document(production)
)
))
.collect(Collectors.toList());
BulkRequest bulkRequest = BulkRequest.of(buckBuilder -> buckBuilder
.index(indexName)
.operations(listIndexOperations)
);
getElasticsearchClient().bulk(bulkRequest);
Код: Выделить всё
"type":"illegal_argument_exception","reason":"Malformed action/metadata line [3], expected START_OBJECT but found [VALUE_STRING]
Код: Выделить всё
getElasticsearchClient().index(indexReqBuilder -> indexReqBuilder.index(getAliasName())
.id(String.valueOf(productionToIndex.getId()))
.document(productionToIndex));
Подробнее здесь: https://stackoverflow.com/questions/786 ... ava-client
Мобильная версия