var node = new Uri("http://localhost:9200/");
var settings = new ConnectionSettings(node);
var client = new ElasticClient(settings);
var result = client.Search<Person>(s => s.Index("accounts"));
总是检索报错
Invalid NEST response built from a unsuccessful low level call on POST: /accounts/person/_search?typed_keys=true
# Audit trail of this API call:
- [1] BadResponse: Node: http://localhost:9200/ Took: 00:00:00.2356308
# OriginalException: System.Net.WebException: 远程服务器返回错误: (400) 错误的请求。
在 System.Net.HttpWebRequest.GetResponse()
在 Elasticsearch.Net.HttpConnection.Request[TResponse](RequestData requestData)
# 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.>
检索应该是get 为什么这里生成的是post呢?求大神帮忙