Currently dialect configuration requires some prior knowledge: one needs to know the available dialects in order to configure it. Worse, we sometimes require to use a different dialect when upgrading from a minor version of Elasticsearch.
We could simply request the user to specify the Elasticsearch version they expect to connect to, and infer the dialect from there.
This would have two advantages:
Users wouldn't need to know the list of available dialects, just the version of the Elasticsearch server they want to connect to.
Dialect changes would become transparent to the user: as they upgrade the Elasticsearch version, we would automatically change the dialect if necessary.
In order to make that practical, we should not require to specify the full version: sometimes, just specifying the major is enough. Let's try to be lenient and only fail if we cannot pick a dialect from the provided information.