Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bundle gem chewy 7.2.x auto install gem elasticsearch 8.x ?? #866

Open
namdv-1375 opened this issue Nov 25, 2022 · 8 comments
Open

bundle gem chewy 7.2.x auto install gem elasticsearch 8.x ?? #866

namdv-1375 opened this issue Nov 25, 2022 · 8 comments

Comments

@namdv-1375
Copy link

i add gem file gem "chewy", "~> 7.2", ">= 7.2.2"
-> run bundle -> gemlock installed, example:

elastic-transport (8.1.0)
      faraday (< 3)
      multi_json
    elasticsearch (8.4.0)
      elastic-transport (~> 8)
      elasticsearch-api (= 8.4.0)
    elasticsearch-api (8.4.0)
      multi_json
    elasticsearch-dsl (0.1.10)

while my computer is installing elasticsearch version 7.x
so when running the command create index, e.x:

rescue Elasticsearch::Transport::Transport::Errors::NotFound
                            ^^^^^^^^^^^
from /usr/share/rvm/gems/ruby-3.1.2/gems/chewy-7.2.2/lib/chewy/index/actions.rb:88:in `rescue in delete'
Caused by Elasticsearch::UnsupportedProductError: The client noticed that the server is not Elasticsearch and we do not support this unknown product.
from /usr/share/rvm/gems/ruby-3.1.2/gems/elasticsearch-8.4.0/lib/elasticsearch.rb:115:in `verify_with_version_or_header'

Please, show me how to fix it, i want to use elastic ver 7.x
Thanksssssssssssssssss!

@gabriel
Copy link

gabriel commented Jan 12, 2023

Elasticsearch::Transport was renamed to Elastic::Transport in 8.x

You can't use this chewy repo with 8.x out of the box.

I am experimenting with a fork that uses 8.x here:
https://github.com/gabriel/chewy

@benjaminwols
Copy link

@konalegi Are there any plans to support the 8.x version of elastisearch by this gem?

@konalegi
Copy link
Contributor

konalegi commented May 9, 2023

@benjaminwols I’m not sure exactly about it, let me take a look and get back with the answer. I’ll create a patch to lock chewy 7 to elastic 7 today to tomorrow

@konalegi
Copy link
Contributor

konalegi commented May 9, 2023

@namdv-1375 please upgrade to chewy 7.2.6 it has fix for your issue. e48f091

@mjankowski
Copy link
Contributor

@benjaminwols I’m not sure exactly about it, let me take a look and get back with the answer.

@konalegi any progress on this front? Were you able to review either the @gabriel repo with 8.x support, or any other approaches? If so, would you be open to a PR along the lines of what gabriel has there?

Separately - do you have a preference versioning-wise to do either a) a hard version bump to chewy 8.x which would require the ES 8.x gems (this is what gabriel fork does); or b) a softer bump where chewy allows but does not require 8.x gems, and still supports the 7.x gems (possible, but would need some conditional branches in code to detect the diff classes in the ES gems.

@konalegi
Copy link
Contributor

konalegi commented Dec 6, 2023

@mjankowski Sorry for the long delay with a response. I was extremely busy and only now started looking at the transition into ES 8.x.

@mjankowski
Copy link
Contributor

Thanks for the update, glad to hear you're looking at it.

@konalegi
Copy link
Contributor

I've started my work here, #917, although need to confirm how we are going to release 8.x version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants