I'm trying to index multiple documents using bulk with c#.
Elastic version 7.5.1
Nest version 7.5.1
First I make a query excluding some fields, this query retun 1937 doc's. The response to the query I'm trying to index with the bulk.
Here is the code used:
var searchResponse = client.Search<Dictionary<string, object>>(s => s .Index("amazoninf.iica.teste") .Source(sf => sf .Excludes(e => e.Fields("_d", "_n")) ) .Size(10000) .Query(q => q .MatchAll() )); var resultado = searchResponse.Documents; var bulkIndexResponse = client.Bulk(b => b .Index("amazoninf.iica.teste.tmp") .IndexMany(resultado));
And response is:
Invalid NEST response built from a unsuccessful (413) low level call on POST: /amazoninf.iica.teste.tmp/_bulk?pretty=true # Invalid Bulk items: # Audit trail of this API call: -  BadResponse: Node: http://win-5jrakspu4gn:9200/ Took: 00:00:06.5634864 # OriginalException: Elasticsearch.Net.ElasticsearchClientException: Request failed to execute. Call: Status code 413 from: POST /amazoninf.iica.teste.tmp/_bulk?pretty=true # Request: <Request stream not captured or already read to completion by serializer. Set DisableDirectStreaming() on ConnectionSettings to force it to be set on the response.> # Response: <Response stream not captured or already read to completion by serializer. Set DisableDirectStreaming() on ConnectionSettings to force it to be set on the response.>