High Level Rest Snapshot Creation Error

CreateSnapshotRequest request = new CreateSnapshotRequest();
request.repository(repositoryName);
request.snapshot(snapshotName);
request.partial(false);
request.waitForCompletion(true);
CreateSnapshotResponse response = client.snapshot().create(request, RequestOptions.DEFAULT);

ElasticsearchStatusException[Elasticsearch exception [type=illegal_argument_exception, reason=request [/_snapshot/abc] contains unrecognized parameter: [wait_for_completion]]]

Current 6.4 doc lists this as an option.

https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.4/java-rest-high-snapshot-create-snapshot.html

request.waitForCompletion(true);
Waits for the snapshot to be completed before a response is returned.

ElasticsearchStatusException[Elasticsearch exception [type=action_request_validation_exception, reason=Validation Failed: 1: type is missing;]]

Also receiving a 'type missing' exception. Don't see this referenced in the doc, and was not a parameter in the Transport Client. The repository create does require a type param, request.type(FsRepository.TYPE);

Thanks

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