-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Description
NEST: 6.x >
Client: 6.x >
We are updating from 5.6 to 6.6 and have found that GetAsync sets IsValid=false when the document is not found. This is change from 5.6 where IsValid=true and Found=false. This is on .NET Core.
var response = await client.GetAsync (new DocumentPath<Person>("invalid"));
Response data:
IsValid: false
Found: false
DebugInformation: Invalid NEST response built from a unsuccessful low level call on GET: /people/person/invalid Audit trail of this API call: [1] BadResponse: Node: http://127.0.0.1:9200/ Took: 00:00:00.1815146 OriginalException: Elasticsearch.Net.ElasticsearchClientException: The remote server returned an error: (404) Not Found
I can't find any information stating this change. And can't see how the exception could be used to infer it's valid but not found without doing something like if(response.DebugInformation.Contains("(404) Not Found")) which is not ideal.
Please advise if this is expected behaviour. Thanks.