Skip to content

Commit

Permalink
Use elasticsearch 2.x by default
Browse files Browse the repository at this point in the history
  • Loading branch information
artursmet committed Dec 22, 2016
1 parent 80cf0f6 commit 54419e7
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ services:
ports:
- '6379:6379'
search:
image: elasticsearch:5.1.1
image: elasticsearch:2.4
ports:
- '9200:9200'
web:
Expand Down
6 changes: 1 addition & 5 deletions docs/elasticsearch.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@ Installation
Elasticsearch search backend requires an Elasticsearch server. For development purposes docker-compose will create a Docker container running an Elasticsearch server instance.

Integration can be configured with set of environment variables.

.. warning::

Saleor requires Elasticsearch 5.1 or higher.

When you're deploying on Heroku - you can use add-on that provides Elasticsearch as a service.
By default Saleor uses Elasticsearch 2.4, but integration is compatibile with Elasticsearch 5 as well
Services available on Heroku:

- https://elements.heroku.com/addons/searchbox
Expand Down
2 changes: 1 addition & 1 deletion requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ django-selectable>=0.8.0
django-storages>=1.4.1
django-versatileimagefield>=1.0.1
django-webpack-loader>=0.3.0
elasticsearch>=5.0.1
elasticsearch>=2.0.0,<3.0.0
fake-factory>=0.3.2
google-measurement-protocol>=0.1.2,<0.2a0
google-i18n-address>=2.0.1
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ django-versatileimagefield==1.6
django-webpack-loader==0.4.1
django==1.10.3
djangorestframework==3.5.2
elasticsearch==5.0.1
elasticsearch==2.4.0
fake-factory==0.7.2
google-i18n-address==2.0.1
google-measurement-protocol==0.1.6
Expand Down
2 changes: 1 addition & 1 deletion saleor/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@
if ES_URL:
SEARCH_BACKENDS = {
'default': {
'BACKEND': 'saleor.search.backends.elasticsearch5',
'BACKEND': 'saleor.search.backends.elasticsearch2',
'URLS': [ES_URL],
'INDEX': os.environ.get('ELASTICSEARCH_INDEX_NAME', 'storefront'),
'TIMEOUT': 5,
Expand Down

0 comments on commit 54419e7

Please sign in to comment.