hello,I'm a student , and learning elasticsearch recently. when I use the java bulk api follow the official guides as Bulk: indexing multiple documents | Elasticsearch Java API Client [8.3] | Elastic. but it's occured a error :
co.elastic.clients.elasticsearch._types.ElasticsearchException: [es/bulk] failed: [illegal_argument_exception] Malformed action/metadata line [3], expected START_OBJECT but found [VALUE_STRING]
at co.elastic.clients.transport.rest_client.RestClientTransport.getHighLevelResponse(RestClientTransport.java:282) ~[elasticsearch-java-8.5.1.jar:na]
at co.elastic.clients.transport.rest_client.RestClientTransport.performRequest(RestClientTransport.java:148) ~[elasticsearch-java-8.5.1.jar:na]
at co.elastic.clients.elasticsearch.ElasticsearchClient.bulk(ElasticsearchClient.java:319) ~[elasticsearch-java-8.5.1.jar:na]
here is my code
my development environment is macos 10.14,es version is 8.5.2 and java 8.
I don't how to resolve the problem.If you know please help me . and meanwhile I want to know how to use the bulk api to update and delete document.
thanks.