Additional information: Method not found: 'Elasticsearch.Net.IApiCallDetails Elasticsearch.Net.IBodyWithApiCallDetails.get_CallDetails()'

After I upgraded the reference Elasticserach.Net from v1 to v5, I keeping getting this error:

Additional information: Method not found: 'Elasticsearch.Net.IApiCallDetails Elasticsearch.Net.IBodyWithApiCallDetails.get_CallDetails()'.

I'm not sure where it comes from, I tried to change the code for connection to elasticsearch just like here https://www.elastic.co/guide/en/elasticsearch/client/net-api/current/connecting.html

It crashes in the controller. When in debug I doesnt actually get to GetServicesStatus(), I guess it only initialize StatsFacade. And the problem is the connection settings etc.

Any ideas why this is happening?

[HttpGet]
[Route("servicesState")]
public HttpResponseMessage GetServicesState()
{
    var servicesState = StatsFacade.GetServicesStatus();
    return servicesState;
}



public class StatsFacade : BaseFacade
{
    public const int DefaultDaysRange = 10;

    static SingleNodeConnectionPool connectionPool = new SingleNodeConnectionPool(new Uri(ConfigurationManager.AppSettings["Stats:ConnectionString"]));

    static ConnectionSettings _apiCallsSettings = new ConnectionSettings(connectionPool, new InMemoryConnection())
                                                    .DefaultIndex(ConfigurationManager.AppSettings["Stats:DefaultIndex"])
                                                    .BasicAuthentication(ConfigurationManager.AppSettings["Es:User"], ConfigurationManager.AppSettings["Es:Password"])
                                                    .DisableDirectStreaming();

    public static HttpResponseMessage GetServicesStatus()
    {
        ElasticClient client = new ElasticClient(_apiCallsSettings);
        //...
        //...
    }
}

It crashes on ElasticClient initialization ElasticClient client = new ElasticClient(_apiCallsSettings);

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.