Comments (9)
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.
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.
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.
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.
I have a fork experimenting with chewy on elasticsearch 8.6.0 here:
https://github.com/gabriel/chewy
from chewy.
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.
Hi @gabriel, any change you could create a pull request for the main repo to make it works with 8.x ?
from chewy.
It's a breaking change. Also, I'm not sure if there is some weird licensing stuff with 8.x.
from chewy.
Note: Elasticsearch 7 will be EOL next month. (01 Aug 2023)
from chewy.
Related Issues (20)
- Old indices are not being cleared up after a reset
- Port PR #874 to the 7.0.x branch
- Trying to use Pagy pagination with Chewy, running into autoloading will_paginate gem
- Breaking change at 7.2.4
- I have a question regarding elasticsearch-ruby gem
- Support rails parallel testing HOT 1
- Warning when upgrading to Rails 7.1
- "#<Chewy::UndefinedUpdateStrategy: Index update strategy is undefined for current context.\n Please wrap your code with `Chewy.strategy(:strategy_name) block.`\n>"} HOT 3
- Update Index Derived from Multiple Associated Models
- Index#order - add missing first/last option
- Deprecated the `zrangebyscore` command
- How to migrate to chewy 7.2 HOT 1
- can not use import to delete missings source objects
- Rake chewy:sync should work for complex "outdated_sync_field" values HOT 2
- Use ENV variable to name index by default HOT 1
- Run some code after indexing has completed
- Status of indexes
- Add inner_hits DSL
- Closing open connections to Elasticsearch
- Per-query client configuation adjustments.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chewy.