ElasticSearch 6.0 beta1 - BulkRequestBuilder error


BulkRequestBuilder throws this exception:
java.lang.IllegalArgumentException: The number of object passed must be even but was [1]

when invoking it via:
bulkRequest.add(new IndexRequest(:"indexName", "typeName", null).source(json));

This has worked in pre-60 versions without any deprecation warnings.

The issue is resolved if invoked with the source type indicator as:
bulkRequest.add(new IndexRequest(:"indexName", "typeName", null).source(json,XContentType.json));

(system) #2

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.