Home > Enterprise >  Guidance needed for Elastic 6.8 to 7.17 upgrade with C# client
Guidance needed for Elastic 6.8 to 7.17 upgrade with C# client

Time:04-29

We have an ES cluster running 6.8 and a C# .net core app that read/writes data using ElasticSearch.NET and NEST 6.8 libraries.

We're looking to upgrade the cluster to 7.17, but the ES.NET & NEST libraries have many breaking changes, as per the published breaking changes guide.

I am very new to the app and have no Elastic experience. The existing code is using many APIs that no longer exist in the v7.X library, and I am finding it very difficult updating the existing code to conform to the new API.

What would be the best place to look for information on replacing the use of deleted APIs to use the new APIs, preferably with examples? Something like "if you are currently using this, do that instead".

CodePudding user response:

I recommend referencing NEST.7xUpgradeAssistant to update from NEST 6.x to NEST 7.x.

The namespaces introduced in NEST 7.x are reintroduced in NEST.7xUpgradeAssistant with [Obsolete] attributes, that have descriptions of where to find the APIs in NEST 7.x. So, you can

  1. reference NEST.7xUpgradeAssistant
  2. go through the API calls in the codebase and change them to call the API method in 7.x
  3. once all API calls are changed, remove NEST.7xUpgradeAssistant and reference the latest NEST 7.x.

Take a look at "The Upgrade Assistant" section in https://www.elastic.co/blog/nest-and-elasticsearch-net-7-0-now-ga for more details.

  • Related