django-elasticsearch-dsl-drf icon indicating copy to clipboard operation
django-elasticsearch-dsl-drf copied to clipboard

Standpoint on supporting OpenSearch

Open nasthagiri opened this issue 4 years ago • 11 comments

Hi there,

Assuming there will be an OpenSearch equivalent to the Django Elasticsearch DSL library, I'm wondering if the maintainers of this project will consider supporting OpenSearch in addition to ElasticSearch, moving forward?

Note: My intention is not to spark a philosophical debate. I ask only to gather information for our own open-source project that has gratefully leveraged this project.

Thanks!

nasthagiri avatar Sep 07 '21 21:09 nasthagiri

@nasthagiri:

Good that you mention this. It's very tricky. In principle, I'm open to proposals, but the bottleneck would not be this package. If compatibility is properly handled on the side of Django Elasticsearch DSL, I can (and will) make sure this one stays compatible with OpenSearch as well. However, you should be opening this issue primarily in the Django Elasticsearch DSL.

barseghyanartur avatar Sep 07 '21 21:09 barseghyanartur

@barseghyanartur Thank you for your prompt response. I have opened an issue on the Django ES DSL project to gather their input.

nasthagiri avatar Sep 07 '21 21:09 nasthagiri

@nasthagiri:

I even think the very first step would have to go back to the OpenSearch community prior to reaching out to the Django Elasticsearch DSL. There should be an analog of the Elasticsearch DSL package created first, which later on could be used in Django Elasticsearch DSL.

barseghyanartur avatar Sep 07 '21 21:09 barseghyanartur

I have reached out to the Amazon OpenSearch product team. They are forking and planning to maintain low-level libraries. For example, they've created https://github.com/opensearch-project/opensearch-py.

The question remains on whether the OpenSearch community or the Django community owns the creation and maintenance of OpenSearch equivalents of our Django DSL libraries.

nasthagiri avatar Sep 07 '21 22:09 nasthagiri

@nasthagiri:

There are two different projects.

There's elasticsearch-py and elasticsearch-dsl-py.

As far as I understand in the opensearch project there is a opensearch-py but not yet a opensearch-dsl-py.

The django-elasticsearch-dsl is heavily based on the elasticsearch-dsl-py.

Does this make it more clear for you?

barseghyanartur avatar Sep 07 '21 22:09 barseghyanartur

@nasthagiri:

I'm adding a full compatibility with django-opensearch-dsl package (which delivers first class support for opensearch-dsl package) one of these days.

Update:

As of now, I patched the django-elasticsearch-dsl to make it fully compatible with OpenSearch. See the correspondent issue opened at django-elasticsearch-dsl.

The feature/support-both-opensearch-and-elasticsearch of this library works with both Elasticsearch and OpenSearch (through my fork of django-elasticsearch-dsl).

If django-elasticsearch-dsl maintainers are open to accept a pull request with my changes, the django-elasticsearch-dsl would be used. If not, I'll rebrand the django-elasticsearch-dsl. In any case, pretty soon, this library will support both, Elasticsearch and OpenSearch.

barseghyanartur avatar Jul 04 '22 09:07 barseghyanartur

WIP.

barseghyanartur avatar Jul 21 '22 00:07 barseghyanartur

As of now, my local tests (except one which is kind of irrelevant) are passing with both Elasticsearch 7.x and OpenSearch 2.x. Please, check the feature branch and leet me know you have faced any issues,

barseghyanartur avatar Jul 22 '22 22:07 barseghyanartur

@nasthagiri

barseghyanartur avatar Jul 22 '22 22:07 barseghyanartur

Update on this. It's still work in progress due to on-going work on re-branding an own-maintained fork of django-elasticsearch-dsl into something that works for OpenSearch as well (as my proposal to have it built into django-elasticsearch-dsl was rejected).

barseghyanartur avatar Aug 15 '22 22:08 barseghyanartur

First steps have been made.

  • An engine agnostic version of django-elasticsearch-dsl has been released on PyPI under name django-anysearch-dsl. https://pypi.org/project/django-anysearch-dsl/
  • A GitHub organisation for hosting both django-anysearch-dsl and django-anysearch-dsl-drf (fork of this package based on django-anysearch-dsl) has been created. https://github.com/django-anysearch

barseghyanartur avatar Dec 30 '22 23:12 barseghyanartur