Elasticsearch 5 support
See original GitHub issueWhen I execute ./manage.py update_index --settings=web6c.settings.production
, I was get some Exception.
The [string] type is removed in 5.0 and automatic upgrade failed because parameters [index_analyzer, boost] are not supported for automatic upgrades. You should now use either a [text] or [keyword] field instead for field [name]
But I never used elasticsearch.
Traceback (most recent call last): File “./manage.py”, line 12, in <module> execute_from_command_line(sys.argv) File “/usr/lib/python3.5/site-packages/django/core/management/init.py”, line 367, in execute_from_command_line utility.execute() File “/usr/lib/python3.5/site-packages/django/core/management/init.py”, line 359, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File “/usr/lib/python3.5/site-packages/django/core/management/base.py”, line 294, in run_from_argv self.execute(*args, **cmd_options) File “/usr/lib/python3.5/site-packages/django/core/management/base.py”, line 345, in execute output = self.handle(*args, **options) File “/usr/lib/python3.5/site-packages/wagtail/wagtailsearch/management/commands/update_index.py”, line 120, in ha ndle self.update_backend(backend_name, schema_only=options[‘schema_only’]) File “/usr/lib/python3.5/site-packages/wagtail/wagtailsearch/management/commands/update_index.py”, line 77, in upd ate_backend index.add_model(model) File “/usr/lib/python3.5/site-packages/wagtail/wagtailsearch/backends/elasticsearch.py”, line 513, in add_model index=self.name, doc_type=mapping.get_document_type(), body=mapping.get_mapping() File “/usr/lib/python3.5/site-packages/elasticsearch/client/utils.py”, line 71, in _wrapped return func(*args, params=params, **kwargs) File “/usr/lib/python3.5/site-packages/elasticsearch/client/indices.py”, line 282, in put_mapping ‘_mapping’, doc_type), params=params, body=body) File “/usr/lib/python3.5/site-packages/elasticsearch/transport.py”, line 327, in perform_request status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout) File “/usr/lib/python3.5/site-packages/elasticsearch/connection/http_urllib3.py”, line 124, in perform_request self._raise_error(response.status, raw_data) File “/usr/lib/python3.5/site-packages/elasticsearch/connection/base.py”, line 122, in _raise_error raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info) elasticsearch.exceptions.RequestError: TransportError(400, ‘illegal_argument_exception’, ‘The [string] type is removed in 5.0 and automatic upgrade failed because parameters [index_analyzer, boost] are not supported for automatic upgrades. You should now use either a [text] or [keyword] field instead for field [name]’)
Issue Analytics
- State:
- Created 7 years ago
- Comments:13 (5 by maintainers)
Top GitHub Comments
I think that name
elasticsearch
in modules should rely on latest availableelasticsearch
version(currently 5.0, or at least latest supported bywagtail
version), and there shouldn’t be module names likeelasticsearch5
(unless there is bigger version number in current stable version). It is better to rename oldelasticsearch
toelasticsearch1
than to have latest one aselasticsearch5
. Everything can be described in docs. It is normal practice out there, that all installs rely on latest available stable version. If needed older one - then need to come with specific actions like adding version numbers etc, but by default module nameelasticsearch
should use latest stable one… It’s likepip
orapt
orhomebrew
… if I ask to installelasticsearch
, it installs latest version for me, not first one. If i need some specific one, I should deal with versioning. Currently I have'BACKEND': 'wagtail.wagtailsearch.backends.elasticsearch2',
in my settings and it feels like I’m using something “custom and unusual” when I look at 2 at the end…As per http://docs.wagtail.io/en/v1.7/topics/search/backends.html#wagtailsearch-backends-elasticsearch , only Elasticsearch 1.x and 2.x are currently supported. Will leave this ticket open as a feature request to support later versions.