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

Latest Elasticsearch client not working with OpenSearch #1823

Open
1 task
automartin5000 opened this issue Nov 17, 2021 · 4 comments
Open
1 task

Latest Elasticsearch client not working with OpenSearch #1823

automartin5000 opened this issue Nov 17, 2021 · 4 comments

Comments

@automartin5000
Copy link

automartin5000 commented Nov 17, 2021

  • [✅ ] Tested with the latest Haystack release
  • Tested with the current Haystack master branch

Expected behaviour

Elasticsearch Python client works with OpenSearch

Actual behaviour

elastic/elasticsearch-py#1667

Steps to reproduce the behaviour

  1. Attempt to connect to OpenSearch cluster with latest Elasticsearch client using the elasticsearch7 backend

Recommended Steps

Support OpenSearch (API compatible with Elasticsearch 7) as a backend
https://opensearch.org/docs/latest/clients/python/

Configuration

  • Operating system version: Debian 11 Bullseye
  • Search engine version: Elasticsearch 7
  • Python version: 3.8
  • Django version: 2.2.23
  • Haystack version: 3.1.1
@artemijan
Copy link

Are there any updates?

@svandeneertwegh
Copy link

svandeneertwegh commented Feb 9, 2022

I have a working setup.

I have this in my setting:

HAYSTACK_CONNECTIONS = {
    'default': {
        'ENGINE': 'haystack.backends.elasticsearch7_backend.Elasticsearch7SearchEngine',
        'URL': 'http://127.0.0.1:9200/',
        'INDEX_NAME': 'site-haystack',
    },
}

Using:

  • django-haystack==3.1.1
  • django==3.1.9
  • elasticsearch==7.13.3
  • python 3.8.7

latest opensearch from homebrew. (opensearch 1.2.4)

The commands update_index and rebuild_index work and my search functionality also works on my test setup.

@bhrutledge
Copy link

bhrutledge commented Apr 19, 2022

Is the correct resolution to implement an opensearch_backend that's based on elasticsearch7_backend, but uses opensearch-py instead?

@acdha Looks like you're the most active recent maintainer; any thoughts?

@automartin5000
Copy link
Author

@bhrutledge I tried that, but ended down a rabbit hole of incompatible APIs: https://github.com/automartin5000/django-haystack

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

4 participants