Hi everyone
I have a document already exists in an index in elastic below
And here's my C# code for checking if this document exists:
ExistsResponse existsResponse = await _elasticClient.DocumentExistsAsync<T>(type.Id, d =>
d.Index(index));
However whenever the program runs to that line it always returns an error with invalid NEST response: (I've greyed out my node domain address with xxxx)
Invalid NEST response built from a unsuccessful (200) low level call on HEAD: /purchaseorders_test/_doc/PO1Z74FVF4
# Audit trail of this API call:
- [1] BadResponse: Node: https://xxxxxxxxx/ Took: 00:00:00.3388193
# OriginalException: Elasticsearch.Net.ElasticsearchClientException: Request failed to execute. Call: Status code 200 from: HEAD /purchaseorders_test/_doc/PO1Z74FVF4
# 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:
I've already set DisableDirectStreaming
on my ConnectionSettings
, but they don't seem to solve anything
var settings = new ConnectionSettings(new Uri(url))
.DefaultIndex(defaultIndex).BasicAuthentication("elastic", "xxxxxxx").DisableDirectStreaming();
var client = new ElasticClient(settings);
The version of Elastic NUGET I'm using is Elasticsearch.Net 7.13.0
I'm running out of idea on how to solve this, can anyone help me with this ?