Код: Выделить всё
Validation Failed: 1: compare and write operations can not be used with upsert;
Вот где я получаю ошибку в своем коде: < /p>
private UpdateResponse doAction(UUID esId, List comments, dSeqNoPrimaryTerm seqPrimNo, String indexName) {
UpdateResponse response = null;
Map params = new HashMap();
params.put("comments", comments);
Builder builder = UpdateQuery
.builder(esId.toString())
.withDocAsUpsert(true)
.withDocument(Document.from(params))
.withRefresh(Refresh.True);
if (seqPrimNo != null) {
builder.withIfSeqNo((int) seqPrimNo.getSequenceNumber());
builder.withIfPrimaryTerm((int) seqPrimNo.getPrimaryTerm());
}
UpdateQuery query = builder.build();
response = elasticsearchTemplate.update(query, IndexCoordinates.of(indexName)); //
Значит ли это, что мы не можем сделать оптимистичную блокировку при выходе на подъем? Чего мне не хватает?
Подробнее здесь: https://stackoverflow.com/questions/729 ... tic-upsert