-
Notifications
You must be signed in to change notification settings - Fork 264
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
Views on supporting both Elasticsearch and OpenSearch #415
Comments
P.S. Please, take a look at the diff (very minimal). |
No is also a good answer. I at least would know what to do further. |
In two days from now, I'll take it as no. |
I am on travel with limited internet connection, will be back to the issue after 6th August |
Ah, I didn't expect that. Fair enough. I'll park it until then. Thanks for answering! 🥇 |
Ping. |
@barseghyanartur Thanks for raising this and pinging me. I am sorry for the late reply as I needed some time to cope up with some unfinished personal work after travel. I am not comfortable to serve both elasticsearch and opensearch at the same time and it makes this project quite complex to maintain both different (but similar) engine. I have seen django-opensearch-dsl and it seems like it is good place to have support OpenSearch. Both project can collaborate like we can cherry peak and port each others commit for specific feature or take inspiration for that project for certain features. |
Some thoughts from my side. I consider this project very small but very useful. The main purpose is the sync of data between Elasticsearch and Django - a very small but exceptionally valuable purpose. I've seen the Unfortunately, you leave me no other choice, that to re-brand and maintain my own fork of this project (which I very much dislike), but since I do want to support both OpenSearch and Elasticsearch in I'll try to make best of it and it will be a friendly fork. If you change your mind later on, I'll be happy to have things merged into this one. |
@barseghyanartur I can understand your point. What we can do is create a fork of this repository with your changes and create a seperate repo like After that, we can cherry pick and port new features for both of the repository. What do you think? |
I also don't see the point of supporting both OpenSearch and Elasticsearch. Yes, now it may work the same, but it is clear in the long run it is not sustainable as the projects went on their own paths and for later versions of Elasticsearch the difference from OpenSearch may become more drastic. |
Yet experimental backlink: https://pypi.org/project/django-anysearch-dsl/ |
I've been working on a version of django-elasticsearch-dsl-drf that would support both Elasticsearch and OpenSearch. Looked into the a fork of this library (
django-opensearch-dsl
), couldn't make it working (as it has differences), then forked this one, patched it and ran through a comprehensive series of tests (that I've written fordjango-elasticsearch-dsl-drf
, totaling 158, Elasticsearch 7.x only).ATM, both Elasticsearch and OpenSearch work just fine in my branch.
It works with help of anysearch which does necessary import replacements depending on which one (Elasticsearch or OpenSearch) is chosen (similarly to what
six
package does to support both 2.x and 3.x branches of Python).elasticsearch
andelasticsearch-dsl
become optional dependencies (as well asopensearch-py
andopensearch-dsl
) and are installed when instructed (likepip install django-elasticsearch-dsl[elasticsearch]
orpip install django-elasticsearch-dsl[opensearch]
).anysearch
becomes a required dependency.The question is, would you accept a PR for this (and thus be willing to support both Elasticsearch and OpenSearch)?
The text was updated successfully, but these errors were encountered: