I have error when try to get data from elastic.
MacBook Pro 16 M1Pro JetBrains Rider 2023.3.3 project: net6.0 c#10 using Nest client version: 7.13.2 remote elastic version: "version" : { "7.17.8" }
Invalid NEST response built from a unsuccessful (400) low level call on POST: /{someIndex}/_search?typed_keys=true Audit trail of this API call: - [1] BadResponse: Node: http://{someService}.loc:9200/ Took: 00:00:00.4839970 OriginalException: Elasticsearch.Net.ElasticsearchClientException: Request failed to execute. Call: Status code 400 from: POST /{someIndex}/_search?typed_keys=true. ServerError: Type: Reason: "no handler found for uri [http://{someService}.loc:9200/{someIndex}/_search?typed_keys=true] and method [POST]" Request: {"query":{"term":{"someParam":{"value":"someId"}}}} Response: {"error":"no handler found for uri [http://{someService}:9200/{someIndex}/_search?typed_keys=true] and method [POST]"}
When i Update Nest to version 7.14.0 (and newest) i have different error:
Invalid NEST response built from a unsuccessful () low level call on POST: /{someIndex}/_search?typed_keys=true Audit trail of this API call:
- [1] ProductCheckOnStartup: Took: 00:00:00.5287770
- [2] ProductCheckFailure: Node: http://{someService}:9200/ Took: 00:00:00.5068840 OriginalException: Elasticsearch.Net.ElasticsearchClientException: The client is unable to verify that the server is Elasticsearch due to an unsuccessful product check call. Some functionality may not be compatible if the server is running an unsupported product. Call: Status code 400 from: GET / ---> Elasticsearch.Net.PipelineException: The client is unable to verify that the server is Elasticsearch due to an unsuccessful product check call. Some functionality may not be compatible if the server is running an unsupported product. at Elasticsearch.Net.RequestPipeline.ThrowIfTransientProductCheckFailure() at Elasticsearch.Net.RequestPipeline.Ping(Node node) at Elasticsearch.Net.Transport
1.Ping(IRequestPipeline pipeline, Node node) at Elasticsearch.Net.Transport
1.Request[TResponse](HttpMethod method, String path, PostData data, IRequestParameters requestParameters) --- End of inner exception stack trace --- 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:
But if i curl {elasticUrlIndex} in terminal - data returnes.
I already try change versions. on 7.14.0 (and newest) one type of error on latest - different error.
create elastic client instance:
var connectionPool = new SingleNodeConnectionPool(new Uri("http://{service}:9200")); connSettings = new ConnectionSettings(connectionPool).DisableDirectStreaming(); OperationElastic = new ElasticClient(connSettings); var indexName = $"{EntityIndex}-{DateTime.Now.ToString("yyyyMM")}"; var result = OperationElastic.Search( s => s.Query(q => q.Term(p => p.Field(e => e.{Param}).Value({value}))) .Index(indexName));