Elasticsearch::UnsupportedProductError
is raised when your Elasticsearch server version don't match with Ruby's Elasticsearch client (gem elasticsearch
). In order to fix this properly you need a server that is up to date with latest Elasticsearch (ES) releases
that means if you are on ES provider like https://cloud.elastic.co/ where you work with latest versions of cluster it's easy peasy => server gets upgraded => this is not an issue
if you however work with provider that is slow to catch up with latest ES releases (like AWS Elasticsearch / AWS Opensearch where last version is 7.10 and will not get upgraded anytime soon) your only option is to use gem elasticsearch, "< 7.14"
(Siddhant's answer in this discussion ...and yes this means no potential security updates
other solution may be to silence the verification by overriding method verify_with_version_or_header as proposed in https://github.com/elastic/elasticsearch-ruby/issues/1429#issuecomment-958162468
but reality is both of this solutions are just "not recommended" workarounds. The real fix is a server upgrade
elasticsearch
gem e.g. addgem elasticsearch, "< 7.14"
to your Gemfile. It seems that 7.14 introduced these issues. Open Issue – Floatage