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

Support Elasticsearch 7.x #192

Open
jraddaoui opened this issue Apr 29, 2020 · 2 comments
Open

Support Elasticsearch 7.x #192

jraddaoui opened this issue Apr 29, 2020 · 2 comments
Assignees
Labels

Comments

@jraddaoui
Copy link
Collaborator

Upgrade elasticsearch-dsl dependency, related code, install process and development environment to work with Elasticsearch 7.x.

@tw4l
Copy link
Collaborator

tw4l commented Feb 9, 2022

There seems to be an issue with Elasticsearch in the Docker development environment:

scope on  master [!] is 📦 v1.0.0-beta.1 on 🐳 v20.10.7 via 🐍 3.9.4 took 5s 
➜ docker-compose exec scope ./manage.py index_data
Processing collections:
 - Deleting index.
Traceback (most recent call last):
  File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 381, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 323, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 364, in execute
    output = self.handle(*args, **options)
  File "/src/search/management/commands/index_data.py", line 28, in handle
    index.delete(ignore=404)
  File "/usr/local/lib/python3.8/site-packages/elasticsearch_dsl/index.py", line 405, in delete
    return self._get_connection(using).indices.delete(index=self._name, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/elasticsearch/client/utils.py", line 347, in _wrapped
    return func(*args, params=params, headers=headers, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/elasticsearch/client/indices.py", line 334, in delete
    return self.transport.perform_request(
  File "/usr/local/lib/python3.8/site-packages/elasticsearch/transport.py", line 421, in perform_request
    _ProductChecker.raise_error(self._verified_elasticsearch)
  File "/usr/local/lib/python3.8/site-packages/elasticsearch/transport.py", line 638, in raise_error
    raise UnsupportedProductError(message)
elasticsearch.exceptions.UnsupportedProductError: The client noticed that the server is not a supported distribution of Elasticsearch

This is with elasticsearch-dsl pinned to elasticsearch-dsl==7.3.0.

@tw4l
Copy link
Collaborator

tw4l commented Feb 9, 2022

The elasticsearch client library needs to be pinned to a version below 7.14 - see: elastic/elasticsearch-py#1639 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants