Not a bug XFES cannot distinguish version number between ElasticSearch and OpenSearch.

Affected version
2.2.1

Chris D

XenForo developer
Staff member
This is something we're going to keep an eye on but at this stage I don't think it's fair to start making changes to support OpenSearch given its infancy and very early development status.

This particular error is only the tip of the iceberg. Due to changes in the Elasticsearch API over many years, this is only one of many version checks that we do that would actually send OpenSearch down incorrect code paths as it stands.

These issues aren't insurmountable but of course depending on the direction they decide to take it and how much they decide to diverge, it could be the first of many issues.

At this moment in time we only support officially recognised distributions of Elasticsearch but we will keep an eye on OpenSearch as on the surface it is a good initiative being done for the right reasons.
 

dblockdotorg

New member
Thank you for the kind words about OpenSearch.

This and similar issues are tracked in https://github.com/opensearch-project/OpenSearch/issues/693. Please take a look and comment on https://github.com/opensearch-project/OpenSearch/pull/814 that attempts at resolving it. Generally, we are doing our best to keep OpenSearch 1.0 backwards compatible with ES 7.10.2, see https://opensearch.org/faq/#c3. If you find any issue like this one where a xfes does not work against OpenSearch 1.0, please take the time to report it and we'll do our best to fix!

Moving past 1.0, XFES can check the "distribution" field in this response and do OpenSearch-compatible version checks if it wants to.
 

ShikiSuen

Well-known member
Thank you for the kind words about OpenSearch.

This and similar issues are tracked in https://github.com/opensearch-project/OpenSearch/issues/693. Please take a look and comment on https://github.com/opensearch-project/OpenSearch/pull/814 that attempts at resolving it. Generally, we are doing our best to keep OpenSearch 1.0 backwards compatible with ES 7.10.2, see https://opensearch.org/faq/#c3. If you find any issue like this one where a xfes does not work against OpenSearch 1.0, please take the time to report it and we'll do our best to fix!

Moving past 1.0, XFES can check the "distribution" field in this response and do OpenSearch-compatible version checks if it wants to.
Actually, XFES works with ElasticSearch 2.x and above.
Does this indicate that it actually supports OpenSearch 1.0.0-SNAPSHOT like supporting ElasticSearch 6.x despite the version number incompatibility?
 
Last edited:

Chris D

XenForo developer
Staff member
At this moment in time, yes, it is just the version number issue as far as we know.

I will endeavour to at least try OpenSearch by hacking the version number checks but on the whole it may be too early to support. But at least if we run into anything upstream then we can feed it back.
 

dblockdotorg

New member
I would double check that XFES is not doing something based on that version number - in other plugins we see checks that say "if version is <= 6 do X, otherwise if version <= 7 do Y", so 1.0 becomes 6 and that's not good cause it's compatible with 7.
 

Xon

Well-known member
I know a couple of my XF add-ons do that. Part of the reason is ElasticSearch is a something of a compatibility mess if you want to support 2.x - 7.x.

Thankfully they've gotten a lot better about breaking backwards compatibility changes in point release updates, but they still don't have the best track record.
 
Top