elastic / elasticsearch-rails

Elasticsearch integrations for ActiveModel/Record and Ruby on Rails
Apache License 2.0
3.07k stars 797 forks source link

WIP: Elasticsearch 8.7.x #1056

Open woto opened 1 year ago

woto commented 1 year ago

It's draft version of attempt to check what should be done to make elasticsearch-rails work with new elasticsearch-ruby 8.7.x and faraday 2.x. I'm not too deep dived in this gems, but I use it in my pet project. So I decided to try.

This links could help during development:

https://www.elastic.co/blog/moving-from-types-to-typeless-apis-in-elasticsearch-7-0 https://github.com/elastic/elasticsearch-rails/pull/1048 https://github.com/elastic/elasticsearch-rails/pull/1025 https://github.com/elastic/elasticsearch-rails/issues/1049

If you have some thoughts/knowledge how to bring this PR to life faster/better, then let me know. There don't seem to be many failed tests. https://github.com/woto/elasticsearch-rails/actions/runs/4764875450/jobs/8469977261

technige commented 1 year ago

Hi @woto. Thank you very much for submitting this :heart:

@picandocodigo and I are currently in discussions to try to work out how we might be able to dedicate some time in-house to this project, but your work here will definitely be useful in that effort.

We'll try to take a look through your code next week and get back to you as soon as possible.

woto commented 1 year ago

Haha, there was a fun moment that I saw only errors from elasticsearch-persistence and elasticsearch-rails gems :) When I saw around 140 errors from elasticsearch-model I've little bit sad :)

Either way, it looks like it's easy enough to do. If I understand correct. Then all work is that include_type_name and document_type, type have to be removed.

sly7-7 commented 1 year ago

@woto Yes it seems like something like this. Also, from other PRs, something change in elasticsearch transport, the class name looks different. See for example: https://github.com/elastic/elasticsearch-rails/pull/1048/files#diff-ee98e028c59b193d58fde56ab4daf54d43c486ae674e63d50ddf300b07943e0fL166

I think quite a lot of people are interested to have this gem compatible with ES 8.X, but I didn't see any feedback from the maintainers since quite some time. I hope this gem is still aimed to be maintained though.

woto commented 1 year ago

@technige Hi, I want to inform you that I'm already using this fork in my pet project :) https://github.com/woto/hub/blob/master/Gemfile#L186

There are still some broken tests in elasticsearch-rails and I hope that you will take them into your own hands ;). It seem I'm not using this functionality.

picandocodigo commented 1 year ago

Hi @woto, this is great! I'll take a closer look into this Pull Request this week and review it. Initially I'd suggest to remove the 2.7 test suite, since it's not going to be supported. I'd also not worry about Rails 6.0 since it's almost end of life'd and I'd replace it with 6.1. Or I can fix that once I get some time to work on this PR. Thank you very much, your work is really appreciated :+1:

dani-sc commented 1 year ago

Hi @picandocodigo, I've been following the progress of this pull request and am particularly interested in the support for ES 8. I noticed your recent comment suggesting that you'll be reviewing the PR.

I was wondering if you could provide any updates on the status of this pull request and the progress towards supporting ES 8? Thank you for your time and effort in this project.

picandocodigo commented 1 year ago

Hi @dani-sc, There's been progress with Rails support for 8.x, but I can't provide a timescale just now. We're a small team and the work on Rails is on a best-effort basis at the moment. But I assure you that this project is on the To-do list.

I've been working on and off on migrating code and tests to the currently supported versions of Ruby (3.x+) and Rails (6.1 and 7.x). Hopefully I'll be able to have a release soon. Initially there will be a pre release to allow the community to test it and eventually a GA release.

Thank you for your patience.

dani-sc commented 1 year ago

Hi @picandocodigo ,

Thank you for your reply. I understand that you're working on this gem on a best-effort basis, but do you have any updates to share about the progress?

up73k commented 11 months ago

Do you have any estimates for 8.x support?

ralph commented 9 months ago

There is an 8.X branch in the official repository, but no release yet and the last work was done in September '23. Not sure they'll ever release a v8.X ¯\_(ツ)_/¯.

https://github.com/elastic/elasticsearch-rails/tree/8.x

Aubermean commented 8 months ago

😢 🎻

shawndeprey commented 6 months ago

@technige

Has there been any movement on 8.x support for rails projects?

sly7-7 commented 4 months ago

Seems like this issue could be closed now 🙌