theablefew / stretchy

Elasticsearch Models for Rails with an ActiveRecord-like behavior
https://theablefew.github.io/stretchy/#/
MIT License
2 stars 0 forks source link

Create separate gems for OpenSearch and Elasticsearch support #118

Open esmarkowski opened 3 months ago

esmarkowski commented 3 months ago

With older version of stretchy-model it was relatively easy to provide common functionality between OpenSearch and Elasticsearch, however the features have started to diverge in pretty significant ways.

Additionally, elasticsearch-persistence has fallen behind and currently only supports Elasticsearch 7. This means the additional namespaces in the elasticsearch-api gem aren't available and is why we currently patch them into the client.

For opensearch-ruby it is a similar situation.

Pull Requests need to be made to use 'elasticsearch', '~> 8'

Pull Request for opensearch-ruby to add the namespaces for new features in 2.12

But that's not even the issue

I think we should be more explicit about what backend we're using with stretchy-model and break out support into separate plugin gems. This would help keep tests focused and allow stretchy-model to provide a unified interface for things like Opensearch's ml commons and Elasticsearch's ML implementation.

stretchy-elasticsearch stretchy-opensearch

### Tasks
- [ ] https://github.com/theablefew/stretchy/issues/107