Interestingly, I'm getting the same error, using ES version:
"version" : {
"number" : "6.2.2",
"build_hash" : "10b1edd",
"build_date" : "2018-02-16T19:01:30.685723Z",
"build_snapshot" : false,
"lucene_version" : "7.2.1",
"minimum_wire_compatibility_version" : "5.6.0",
"minimum_index_compatibility_version" : "5.0.0"
},
And using the NEST API in dotnet core via v6.0.1 of the Nuget package.
I seem to get ?typed_keys=true on the end of my queries:
Invalid NEST response built from a unsuccessful low level call on POST: /post/post/_search?typed_keys=true
# Audit trail of this API call:
- [1] BadResponse: Node: xxx Took: 00:00:00.0683456
# OriginalException: Elasticsearch.Net.ElasticsearchClientException: Request failed to execute. ServerError: Type: illegal_argument_exception Reason: "request [/post/post/_search] contains unrecognized parameter: [typed_keys]"
# Request:
{"from":0,"size":1000,"query":{"bool":{"should":[{"terms":{"title":["a"]}},{"terms":{"content":["a"]}}]}}}
# Response:
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"request [/post/post/_search] contains unrecognized parameter: [typed_keys]"}],"type":"illegal_argument_exception","reason":"request [/post/post/_search] contains unrecognized parameter: [typed_keys]"},"status":400}
Even though this is not being specified (and I can't seem to see how to specify it) when creating a query:
var result = await _elasticService.ExecuteQueryAsync<Post>(s => s.From(from).Size(size).Source(src => src)
.Sort(sort => sort.Descending(x => x.CreationDate))
.Index(_elasticService.GetIndexName(typeof(Post))));
Just to add, we have recently upgraded from NEST 5.0 on ES 5.4 to NEST 6.0.1 on ES 6.2.2, which seems to have introduced this, but this has also been a decent amount of refactoring work, so it is possible that we have introduced it there.