Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Rename elasticsearch backend

Jakub Draganekf497a739a9ee
diff --git a/saleor/search/backends/newelastic.py b/saleor/search/backends/elasticsearch.py
similarity index 100%
rename from saleor/search/backends/newelastic.py
rename to saleor/search/backends/elasticsearch.py
diff --git a/saleor/search/backends/test_newelastic.py b/saleor/search/backends/test_elasticsearch.py
similarity index 86%
rename from saleor/search/backends/test_newelastic.py
rename to saleor/search/backends/test_elasticsearch.py
index 4428dc64b2..daa8223b23 100644
--- a/saleor/search/backends/test_newelastic.py
+++ b/saleor/search/backends/test_elasticsearch.py
@@ -1,5 +1,5 @@
from __future__ import unicode_literals
-from . import newelastic
+from . import elasticsearch
PHRASE = 'How fortunate man with none'
FIELDS = ['title', 'name', 'description']
@@ -26,4 +26,4 @@ QUERY = {
def test_storefront_product_search_query_syntax():
- assert QUERY == newelastic.get_search_query(PHRASE).to_dict()
+ assert QUERY == elasticsearch.get_search_query(PHRASE).to_dict()
diff --git a/saleor/search/forms.py b/saleor/search/forms.py
index e8a1d8f2a8..2e301b4f40 100644
--- a/saleor/search/forms.py
+++ b/saleor/search/forms.py
@@ -1,6 +1,6 @@
from django import forms
from django.utils.translation import pgettext
-from .backends import newelastic
+from .backends import elasticsearch
class SearchForm(forms.Form):
@@ -8,4 +8,4 @@ class SearchForm(forms.Form):
label=pgettext('Search form label', 'Query'), required=True)
def search(self, model_or_queryset):
- return newelastic.search(self.cleaned_data['q'], model_or_queryset)
+ return elasticsearch.search(self.cleaned_data['q'], model_or_queryset)