将 Elastic Search NEST 从 7.0.0-alpha2 升级到 7.0.1 后,我不再能够在 Nest.ElasticClient 中使用 IndexExistsAsync 方法。
根据文档,该方法已被删除并且是一项重大更改,因此我将调用更改为 ElasticClient.Indices.ExistsAsync 如下:
旧代码:
var existsResponse = await _elasticClient.IndexExistsAsync(model.Name);
新代码:
var existsResponse = await _elasticClient.Indices.ExistsAsync(model.Name);
使用新代码,我得到以下响应,这对于查找和解决问题并没有真正的帮助:
Invalid NEST response built from a successful (404) low level call on HEAD: /12-e449636ee7e1eb1343414698c95ce1e1
Audit trail of this API call:
- [1] HealthyResponse: Node: http://localhost:9200/ Took: 00:00:00.1208228
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.
设置connectionSettings.DisableDirectStreaming(true);
没有帮助,我得到了完全相同的响应。
非常感谢任何帮助。