Hi,
I'm experiencing
"Invalid NEST response built from a unsuccessful (400) low level call on POST: /indexname/_bulk"
Bad Request with '{Type: action_request_validation_exception Reason: "Validation Failed: 1: type is missing;2: type is missing;"}'
When I'm attempting to make bulk api calls into our elasticsearch cluster.
NEST Client: 7.8.2
Elasticsearch Version: 6.5 (AWS hosted Elasticsearch Service)
Setup of the Client:
var httpConnection = new AwsHttpConnection(awsRegion);
var pool = new SingleNodeConnectionPool(new Uri(elasticSearchEndpoint));
var config = new ConnectionSettings(pool, httpConnection);
var esclient = new ElasticClient(config);
This is just an example, but I've tried multiple different variations of the bulk or index many call all with the same results:
var doc= new ProductModel
{
Id = 1,
Quantity = "5",
Price = "25"
};
var docs = new List<DocumentModel>() { doc};
BulkDescriptor bulkDescriptor = new BulkDescriptor(indexName.ToLowerInvariant()){};
BulkResponse response = ElasticClient.Bulk(bulkDescriptor.IndexMany(docs));
Couple of side notes,
-
We have a working index call below:
IndexResponse response = ElasticClient.Index(new IndexRequest(doc, indexName));
I noticed that the IndexRequest object uses the path of " /{index}/_doc/{id}" -
We have used postman to make calls into our elasticsearch hitting the bulk endpoint
POST https:/ClusterUrl/indexname/_doc/_bulk
I have a feeling the bulk call is failing because mapping types aren't supported in 7 and I can't supply the 'type' field to any of the bulk/indexmany calls.
Any help appreciated.