Search code examples
elasticsearchelasticsearch.net

Elasticsearch.Net.ElasticSearch.Path is deprecated, what should I use instead?


In ElasticSearch.Net v.5 there is a property Elasticsearch.Net.RequestData.Path which has been deprecated in ElasticSearch.Net v.6. What should I use instead?


Solution

  • If you look at the history in github, Path gets replaced with a more descriptive property, PathAndQuery. If you look at the constructor, both Path and PathAndQuery are set using the CreatePathWithQueryStrings(...) method.