From b26d711e56f1a80c80379fe4fb3e2210f363ab30 Mon Sep 17 00:00:00 2001 From: Ben Sturmfels Date: Thu, 24 Aug 2017 05:41:02 +1000 Subject: [PATCH] Update docs for Amazon ElasticSearch service as backend. This change moves the "connection_class" key into "OPTIONS", resolving error ``AttributeError: 'AWS4Auth' object has no attribute 'encode'``. --- docs/topics/search/backends.rst | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/docs/topics/search/backends.rst b/docs/topics/search/backends.rst index bbb36004c..111893c53 100644 --- a/docs/topics/search/backends.rst +++ b/docs/topics/search/backends.rst @@ -183,17 +183,19 @@ The Elasticsearch backend is compatible with `Amazon Elasticsearch Service`_, bu WAGTAILSEARCH_BACKENDS = { 'default': { - 'BACKEND': 'wagtail.wagtailsearch.backends.elasticsearch', + 'BACKEND': 'wagtail.wagtailsearch.backends.elasticsearch2', 'INDEX': 'wagtail', 'TIMEOUT': 5, 'HOSTS': [{ - 'host': 'YOURCLUSTER.REGION.es.amazonaws.com', - 'port': 443, - 'use_ssl': True, - 'verify_certs': True, - 'http_auth': AWS4Auth('ACCESS_KEY', 'SECRET_KEY', 'REGION', 'es'), + 'host': 'YOURCLUSTER.REGION.es.amazonaws.com', + 'port': 443, + 'use_ssl': True, + 'verify_certs': True, + 'http_auth': AWS4Auth('ACCESS_KEY', 'SECRET_KEY', 'REGION', 'es'), }], - 'connection_class': RequestsHttpConnection, + 'OPTIONS': { + 'connection_class': RequestsHttpConnection, + }, } }