Я получаю предупреждение:
"[types removal] Specifying types in bulk requests is deprecated."]
Что я делаю не так?Это мой код:
BulkRequest request = new BulkRequest();
for(Item item : items) {
IndexRequest indexRequest = new IndexRequest(INDEX_NAME, DOC_TYPE, item.getIdentifier());
indexRequest
.opType(DocWriteRequest.OpType.INDEX) // Index the source. If there an existing document with the id, it will be replaced.
.source(JsonUtility.toJson(item), XContentType.JSON);
request.add(indexRequest);
}
elastic.bulk(request, RequestOptions.DEFAULT);