matchish / laravel-scout-elasticsearch

Search among multiple models with ElasticSearch and Laravel Scout
MIT License
711 stars 115 forks source link

[Feature] OpenSearch implementation #219

Closed SineMah closed 1 year ago

SineMah commented 2 years ago

OpenSearch and ElasticSearch are widely compatible. I forked your latest repo on master to add a compatibility layer (factory & proxy objects).

i'd push my branch if you are interested. I guess You would have some work to adept DSL a bit. I'm using plain elastic queries since i translate GraphQL to plain ElasticSearch/OpenSearch queries.

https://github.com/SineMah/laravel-scout-elasticsearch/tree/opensearch

matchish commented 2 years ago

Good job! Let's see if developers interested in it. Please add reaction to the topic so we will know if you want the feature.

hkulekci commented 2 years ago

Hey guys, I checked a little bit, and as I see tests are broken on your branch. Unfortunately, we could not say ES and OpenSearch clients are compatible after ES 8.x version. And as I see, ES side will change the client much more in every release, and in the end, we will try to manage this in this library much more than what we did now. Anyhow, I did some changes to your branch. @SineMah https://github.com/SineMah/laravel-scout-elasticsearch/pull/1

SineMah commented 2 years ago

Thanks for looking over the tests. Managing both backends could be painful in the future. I agree. Proxying client responses might be necessary in the near future. This is too much for a few maintainers and leads into a bottomless hole.

Atm we cant say if the OpenSearch-client will adept the ES-client interface. Probably OpenSearch support should never get to a stable branch for this lib. So people might be aware the feature is not maintained actively. Let's say it is a PoC for now. :D

matchish commented 2 years ago

Yeah I think you're both right. I didn't think much about it but maybe it should be even new engine if we need wrappers for response client and maybe even our own DSL root object.