NEST - C# - Target multiple elasticsearch versions

In C# we are using NEST as library to access ElasticSearch. We are currently on ES 2.x with NEST 2.x driver, and clearly we want to give support to ES 5.x version, but without breaking support to the 2.4 version.

Is there an easy way to obtain this? Actually the only solution is creating two different DLL that contain all ES interaction , each one refers to a specific version of the library, and the host program should dynamically load the Dll with the correct version.

Compare this with the use of a standard Db like mongo, if I use the 3.X C# driver, I can connect to a 2.x instance. I'd like for NEST 5.x C# library to being able to target also ES 2.x elasticsearch engine. It is perfectly fine for me to create two distinct mapping, to create two distinct query (because query capabilities changes between 2.x and 5.x) but everything inside a single dll.

Thanks.

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