Giter Club home page Giter Club logo

Comments (9)

picandocodigo avatar picandocodigo commented on July 23, 2024 4

Hi, I'm the current maintainer for the Elasticsearch Ruby Client. I'd love to help supporting Elasticsearch 8.x on chewy.

Since chewy currently uses version 7.13 of elasticsearch-ruby, enabling the compatibility mode could help when using Elasticsearch 8.x. This was added to elasticsearch-ruby in 7.13:

The Elasticsearch server version 8.0 is introducing a new compatibility mode that allows you a smoother upgrade experience from 7 to 8. In a nutshell, you can use the latest 7.x Elasticsearch client with an 8.x Elasticsearch server, giving more room to coordinate the upgrade of your codebase to the next major version.

If you want to leverage this functionality, please make sure that you are using the latest 7.x client and set the environment variable ELASTIC_CLIENT_APIVERSIONING to true. The client is handling the rest internally. For every 8.0 and beyond client, you’re all set! The compatibility mode is enabled by default.

This could be introduced as an option. The code in 7.13 is here. If say, version is added to the config file, chewy could check if it's 8 (as long as it's using elasticsearch-ruby 7.x) and add the following headers in that case:

'Accept' => 'application/vnd.elasticsearch+json; compatible-with=7',
'Content-Type' => 'application/vnd.elasticsearch+json; compatible-with=7'

Or that could be set up elsewhere in the code, like checking the version in the first request to Elasticsearch and set the headers if the client is on 7 and the server on 8.

If support for newer versions of elasticsearch-ruby were considered, chewy could potentially support both 7.x and 8.x by checking which one was installed and setting the class for Elastic::Transport and changing any code accordingly. A big advantage in the latest version of the 7.x branch is compatibility with both Faraday 1 and 2.

I'm not sure if there is some weird licensing stuff with 8.x.

elasticsearch-ruby is still released under the Apache License in 8.x.

Let me know if this is something that could be considered and how I can help. I can work on a Pull Request and/or continue @gabriel's work on the fork.

from chewy.

mandarvaze avatar mandarvaze commented on July 23, 2024 1

FWIW, official elasticsearch-ruby client seems to support 8.2
https://github.com/elastic/elasticsearch-ruby - so maybe chewy automatically works on elasticsearch 8.2 πŸ€·β€β™‚οΈ

from chewy.

trey-mindtrip avatar trey-mindtrip commented on July 23, 2024 1

Hmm, 9 months out from 8.X release, no news on support from this gem. Any comments from any leads as to the status of support/health of this gem going forward?

Also @gabriel, what's the state of your fork? In truth we are really only looking for the most basic operations (define an index schema, efficient insert, convenient query), nothing as fancy as the more automatic ORM-ish features.

Thanks for any info.

from chewy.

mjankowski avatar mjankowski commented on July 23, 2024 1

A big advantage in the latest version of the 7.x branch is compatibility with both Faraday 1 and 2.

Just saw this comment ... I think allowing any 7.x ES version from chewy 7.x would be a great stopgap here to be less restrictive on faraday, until chewy 8.x with full ES 8 support is ready. May open PR to this effect.

from chewy.

gabriel avatar gabriel commented on July 23, 2024

I have a fork experimenting with chewy on elasticsearch 8.6.0 here:
https://github.com/gabriel/chewy

from chewy.

gabriel avatar gabriel commented on July 23, 2024

The fork works fine for me on 8.6.0. The changes to get it to work are pretty minor:
master...gabriel:chewy:master

from chewy.

franck avatar franck commented on July 23, 2024

Hi @gabriel, any change you could create a pull request for the main repo to make it works with 8.x ?

from chewy.

gabriel avatar gabriel commented on July 23, 2024

It's a breaking change. Also, I'm not sure if there is some weird licensing stuff with 8.x.

from chewy.

eggplants avatar eggplants commented on July 23, 2024

Note: Elasticsearch 7 will be EOL next month. (01 Aug 2023)

from chewy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.