Skip to content

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

Remove elasticsearch and postgresql search for dashboard

IKarbowiak6fd196bc25f6
diff --git a/saleor/search/backends/elasticsearch.py b/saleor/search/backends/elasticsearch.py
index e78dbb5099..627dfc8a6f 100644
--- a/saleor/search/backends/elasticsearch.py
+++ b/saleor/search/backends/elasticsearch.py
@@ -1,9 +1,5 @@
-from . import elasticsearch_dashboard, elasticsearch_storefront
+from . import elasticsearch_storefront
def search_storefront(phrase):
return elasticsearch_storefront.search(phrase)
-
-
-def search_dashboard(phrase):
- return elasticsearch_dashboard.search(phrase)
diff --git a/saleor/search/backends/elasticsearch_dashboard.py b/saleor/search/backends/elasticsearch_dashboard.py
deleted file mode 100644
index c0e81e104e..0000000000
--- a/saleor/search/backends/elasticsearch_dashboard.py
+++ /dev/null
@@ -1,53 +0,0 @@
-from elasticsearch_dsl.query import MultiMatch
-
-from ..documents import OrderDocument, ProductDocument, UserDocument
-
-
-def _search_products(phrase):
- prod_query = MultiMatch(
- fields=["name", "title", "description"], query=phrase, type="cross_fields"
- )
- return ProductDocument.search().query(prod_query).sort("_score").source(False)
-
-
-def _search_users(phrase):
- user_query = MultiMatch(
- fields=["user", "email", "first_name", "last_name"],
- query=phrase,
- type="cross_fields",
- operator="and",
- )
- return UserDocument.search().query(user_query).source(False)
-
-
-def _search_orders(phrase):
- order_query = MultiMatch(
- fields=["user", "first_name", "last_name", "discount_name"], query=phrase
- )
- return OrderDocument.search().query(order_query).source(False)
-
-
-def get_search_queries(phrase):
- """Return querysets to lookup different types of objects.
-
- Args:
- phrase (str): searched phrase
-
- """
- return {
- "products": _search_products(phrase),
- "users": _search_users(phrase),
- "orders": _search_orders(phrase),
- }
-
-
-def search(phrase):
- """Return all matching objects for dashboard views.
-
- Composes independent search querysets into a single dictionary.
-
- Args:
- phrase (str): searched phrase
-
- """
- return {k: s.to_queryset() for k, s in get_search_queries(phrase).items()}
diff --git a/saleor/search/backends/picker.py b/saleor/search/backends/picker.py
index 5c37ddb6bc..6a18ec93e0 100644
--- a/saleor/search/backends/picker.py
+++ b/saleor/search/backends/picker.py
@@ -8,11 +8,3 @@ def pick_backend():
Returns a callable that accepts the search phrase.
"""
return import_module(settings.SEARCH_BACKEND).search_storefront
-
-
-def pick_dashboard_backend():
- """Return the currently configured dashboard search function.
-
- Returns a callable that accepts the search phrase.
- """
- return import_module(settings.SEARCH_BACKEND).search_dashboard
diff --git a/saleor/search/backends/postgresql.py b/saleor/search/backends/postgresql.py
index 70d1fd37eb..4a1093d3fa 100644
--- a/saleor/search/backends/postgresql.py
+++ b/saleor/search/backends/postgresql.py
@@ -1,9 +1,5 @@
-from . import postgresql_dashboard, postgresql_storefront
+from . import postgresql_storefront
def search_storefront(phrase):
return postgresql_storefront.search(phrase)
-
-
-def search_dashboard(phrase):
- return postgresql_dashboard.search(phrase)
diff --git a/saleor/search/backends/postgresql_dashboard.py b/saleor/search/backends/postgresql_dashboard.py
deleted file mode 100644
index 90bdee8bb0..0000000000
--- a/saleor/search/backends/postgresql_dashboard.py
+++ /dev/null
@@ -1,64 +0,0 @@
-from django.contrib.postgres.search import SearchQuery, SearchRank, SearchVector
-
-from ...account.models import User
-from ...order.models import Order
-from ...product.models import Product
-
-
-def search_products(phrase):
- """Return matching products for dashboard views."""
- sv = SearchVector("name", weight="A") + SearchVector("description", weight="B")
- rank = SearchRank(sv, SearchQuery(phrase))
- return Product.objects.annotate(rank=rank).filter(rank__gte=0.2).order_by("-rank")
-
-
-def search_orders(phrase):
- """Return matching orders for dashboard views.
-
- When phrase is convertable to int, no full text search is performed,
- just order with matching id is looked up.
- """
- try:
- order_id = int(phrase.strip())
- return Order.objects.filter(id=order_id)
- except ValueError:
- pass
-
- sv = (
- SearchVector("user__first_name", weight="B")
- + SearchVector("user__last_name", weight="B")
- + SearchVector("user__default_shipping_address__first_name", weight="B")
- + SearchVector("user__default_shipping_address__last_name", weight="B")
- + SearchVector("user__email", weight="A")
- )
- rank = SearchRank(sv, SearchQuery(phrase))
- return Order.objects.annotate(rank=rank).filter(rank__gte=0.2).order_by("-rank")
-
-
-def search_users(phrase):
- """Return matching users for dashboard views."""
- sv = (
- SearchVector("email", weight="A")
- + SearchVector("first_name", weight="B")
- + SearchVector("last_name", weight="B")
- + SearchVector("default_billing_address__first_name", weight="B")
- + SearchVector("default_billing_address__last_name", weight="B")
- )
- rank = SearchRank(sv, SearchQuery(phrase))
- return User.objects.annotate(rank=rank).filter(rank__gte=0.2).order_by("-rank")
-
-
-def search(phrase):
- """Return all matching objects for dashboard views.
-
- Composes independent search querysets into a single dictionary.
-
- Args:
- phrase (str): searched phrase
-
- """
- return {
- "products": search_products(phrase),
- "orders": search_orders(phrase),
- "users": search_users(phrase),
- }
diff --git a/saleor/search/backends/test_elasticsearch_dashboard.py b/saleor/search/backends/test_elasticsearch_dashboard.py
deleted file mode 100644
index 45afec8096..0000000000
--- a/saleor/search/backends/test_elasticsearch_dashboard.py
+++ /dev/null
@@ -1,42 +0,0 @@
-from . import elasticsearch_dashboard
-
-PHRASE = "You can go to the west"
-PRODUCT_QUERY = {
- "_source": False,
- "query": {
- "multi_match": {
- "fields": ["name", "title", "description"],
- "query": PHRASE,
- "type": "cross_fields",
- }
- },
- "sort": ["_score"],
-}
-ORDERS_QUERY = {
- "_source": False,
- "query": {
- "multi_match": {
- "fields": ["user", "first_name", "last_name", "discount_name"],
- "query": PHRASE,
- }
- },
-}
-USERS_QUERY = {
- "_source": False,
- "query": {
- "multi_match": {
- "fields": ["user", "email", "first_name", "last_name"],
- "operator": "and",
- "query": PHRASE,
- "type": "cross_fields",
- }
- },
-}
-
-
-def test_dashboard_search_query_syntax():
- """Check if generated ES queries have desired syntax."""
- searches = elasticsearch_dashboard.get_search_queries(PHRASE)
- assert PRODUCT_QUERY == searches["products"].to_dict()
- assert ORDERS_QUERY == searches["orders"].to_dict()
- assert USERS_QUERY == searches["users"].to_dict()
diff --git a/tests/cassettes/test_dashboard_search_orders_by_user.yaml b/tests/cassettes/test_dashboard_search_orders_by_user.yaml
deleted file mode 100644
index abccb94a65..0000000000
--- a/tests/cassettes/test_dashboard_search_orders_by_user.yaml
+++ /dev/null
@@ -1,51 +0,0 @@
-interactions:
-- request:
- body: '{"query": {"multi_match": {"query": "[email protected]", "fields":
- ["name", "description"]}}, "_source": {"exclude": ["*"]}}'
- headers:
- connection: [keep-alive]
- content-type: [application/json]
- method: GET
- uri: http://search:9200/storefront/doc/_search
- response:
- body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}'}
- headers:
- Warning: ['299 Elasticsearch-5.4.3-eed30a8 "Deprecated field [exclude] used,
- expected [excludes] instead" "Thu, 16 Nov 2017 09:44:26 GMT"']
- content-length: ['122']
- content-type: [application/json; charset=UTF-8]
- status: {code: 200, message: OK}
-- request:
- body: '{"query": {"multi_match": {"query": "[email protected]", "fields":
- ["user", "status", "discount_name"]}}, "_source": {"exclude": ["*"]}}'
- headers:
- connection: [keep-alive]
- content-type: [application/json]
- method: GET
- uri: http://search:9200/orders/doc/_search
- response:
- body: {string: '{"took":2,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":2,"max_score":2.1282318,"hits":[{"_index":"orders","_type":"doc","_id":"19","_score":2.1282318,"_source":{}},{"_index":"orders","_type":"doc","_id":"18","_score":2.1282318,"_source":{}}]}}'}
- headers:
- Warning: ['299 Elasticsearch-5.4.3-eed30a8 "Deprecated field [exclude] used,
- expected [excludes] instead" "Thu, 16 Nov 2017 09:44:26 GMT"']
- content-length: ['302']
- content-type: [application/json; charset=UTF-8]
- status: {code: 200, message: OK}
-- request:
- body: '{"query": {"multi_match": {"query": "[email protected]", "type":
- "cross_fields", "operator": "and", "fields": ["user", "email", "first_name",
- "last_name"]}}, "_source": {"exclude": ["*"]}}'
- headers:
- connection: [keep-alive]
- content-type: [application/json]
- method: GET
- uri: http://search:9200/users/doc/_search
- response:
- body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":1,"max_score":5.115776,"hits":[{"_index":"users","_type":"doc","_id":"117","_score":5.115776,"_source":{}}]}}'}
- headers:
- Warning: ['299 Elasticsearch-5.4.3-eed30a8 "Deprecated field [exclude] used,
- expected [excludes] instead" "Thu, 16 Nov 2017 09:44:26 GMT"']
- content-length: ['211']
- content-type: [application/json; charset=UTF-8]
- status: {code: 200, message: OK}
-version: 1
diff --git a/tests/cassettes/test_dashboard_search_orders_by_user_email.yaml b/tests/cassettes/test_dashboard_search_orders_by_user_email.yaml
deleted file mode 100644
index 77f315ae8c..0000000000
--- a/tests/cassettes/test_dashboard_search_orders_by_user_email.yaml
+++ /dev/null
@@ -1,47 +0,0 @@
-interactions:
-- request:
- body: '{"query": {"multi_match": {"fields": ["name", "title", "description"],
- "query": "[email protected]", "type": "cross_fields"}}, "sort":
- ["_score"], "_source": {"excludes": ["*"]}}'
- headers:
- connection: [keep-alive]
- content-type: [application/json]
- method: GET
- uri: http://search:9200/storefront/doc/_search
- response:
- body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":3,"max_score":5.373132,"hits":[{"_index":"storefront","_type":"doc","_id":"1","_score":5.373132,"_source":{}},{"_index":"storefront","_type":"doc","_id":"18","_score":3.740644,"_source":{}},{"_index":"storefront","_type":"doc","_id":"38","_score":3.740644,"_source":{}}]}}'}
- headers:
- content-length: ['403']
- content-type: [application/json; charset=UTF-8]
- status: {code: 200, message: OK}
-- request:
- body: '{"query": {"multi_match": {"fields": ["user", "email", "first_name", "last_name"],
- "query": "[email protected]", "type": "cross_fields", "operator":
- "and"}}, "_source": {"excludes": ["*"]}}'
- headers:
- connection: [keep-alive]
- content-type: [application/json]
- method: GET
- uri: http://search:9200/users/doc/_search
- response:
- body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":1,"max_score":5.1992044,"hits":[{"_index":"users","_type":"doc","_id":"102","_score":5.1992044,"_source":{}}]}}'}
- headers:
- content-length: ['213']
- content-type: [application/json; charset=UTF-8]
- status: {code: 200, message: OK}
-- request:
- body: '{"query": {"multi_match": {"fields": ["user", "first_name", "last_name",
- "discount_name"], "query": "[email protected]"}}, "_source": {"excludes":
- ["*"]}}'
- headers:
- connection: [keep-alive]
- content-type: [application/json]
- method: GET
- uri: http://search:9200/orders/doc/_search
- response:
- body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":2,"max_score":2.1282318,"hits":[{"_index":"orders","_type":"doc","_id":"17","_score":2.1282318,"_source":{}},{"_index":"orders","_type":"doc","_id":"11","_score":2.1282318,"_source":{}}]}}'}
- headers:
- content-length: ['302']
- content-type: [application/json; charset=UTF-8]
- status: {code: 200, message: OK}
-version: 1
diff --git a/tests/cassettes/test_dashboard_search_orders_by_user_name.yaml b/tests/cassettes/test_dashboard_search_orders_by_user_name.yaml
deleted file mode 100644
index 917dbe74f1..0000000000
--- a/tests/cassettes/test_dashboard_search_orders_by_user_name.yaml
+++ /dev/null
@@ -1,46 +0,0 @@
-interactions:
-- request:
- body: '{"query": {"multi_match": {"fields": ["name", "title", "description"],
- "query": "Martin", "type": "cross_fields"}}, "sort": ["_score"], "_source":
- {"excludes": ["*"]}}'
- headers:
- connection: [keep-alive]
- content-type: [application/json]
- method: GET
- uri: http://search:9200/storefront/doc/_search
- response:
- body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":3,"max_score":5.373132,"hits":[{"_index":"storefront","_type":"doc","_id":"1","_score":5.373132,"_source":{}},{"_index":"storefront","_type":"doc","_id":"18","_score":3.740644,"_source":{}},{"_index":"storefront","_type":"doc","_id":"38","_score":3.740644,"_source":{}}]}}'}
- headers:
- content-length: ['403']
- content-type: [application/json; charset=UTF-8]
- status: {code: 200, message: OK}
-- request:
- body: '{"query": {"multi_match": {"fields": ["user", "email", "first_name", "last_name"],
- "query": "Martin", "type": "cross_fields", "operator": "and"}}, "_source": {"excludes":
- ["*"]}}'
- headers:
- connection: [keep-alive]
- content-type: [application/json]
- method: GET
- uri: http://search:9200/users/doc/_search
- response:
- body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":1,"max_score":2.7725887,"hits":[{"_index":"users","_type":"doc","_id":"102","_score":2.7725887,"_source":{}}]}}'}
- headers:
- content-length: ['213']
- content-type: [application/json; charset=UTF-8]
- status: {code: 200, message: OK}
-- request:
- body: '{"query": {"multi_match": {"fields": ["user", "first_name", "last_name",
- "discount_name"], "query": "Martin"}}, "_source": {"excludes": ["*"]}}'
- headers:
- connection: [keep-alive]
- content-type: [application/json]
- method: GET
- uri: http://search:9200/orders/doc/_search
- response:
- body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":2,"max_score":1.1631508,"hits":[{"_index":"orders","_type":"doc","_id":"17","_score":1.1631508,"_source":{}},{"_index":"orders","_type":"doc","_id":"11","_score":1.1631508,"_source":{}}]}}'}
- headers:
- content-length: ['302']
- content-type: [application/json; charset=UTF-8]
- status: {code: 200, message: OK}
-version: 1
diff --git a/tests/cassettes/test_dashboard_search_orders_by_user_name_without_address.yaml b/tests/cassettes/test_dashboard_search_orders_by_user_name_without_address.yaml
deleted file mode 100644
index 0d2b56048f..0000000000
--- a/tests/cassettes/test_dashboard_search_orders_by_user_name_without_address.yaml
+++ /dev/null
@@ -1,46 +0,0 @@
-interactions:
-- request:
- body: '{"query": {"multi_match": {"fields": ["name", "title", "description"],
- "query": "Rachel", "type": "cross_fields"}}, "sort": ["_score"], "_source":
- {"excludes": ["*"]}}'
- headers:
- connection: [keep-alive]
- content-type: [application/json]
- method: GET
- uri: http://search:9200/storefront/doc/_search
- response:
- body: {string: '{"took":0,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}'}
- headers:
- content-length: ['122']
- content-type: [application/json; charset=UTF-8]
- status: {code: 200, message: OK}
-- request:
- body: '{"query": {"multi_match": {"fields": ["user", "email", "first_name", "last_name"],
- "query": "Rachel", "type": "cross_fields", "operator": "and"}}, "_source": {"excludes":
- ["*"]}}'
- headers:
- connection: [keep-alive]
- content-type: [application/json]
- method: GET
- uri: http://search:9200/users/doc/_search
- response:
- body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":1,"max_score":2.261763,"hits":[{"_index":"users","_type":"doc","_id":"117","_score":2.261763,"_source":{}}]}}'}
- headers:
- content-length: ['211']
- content-type: [application/json; charset=UTF-8]
- status: {code: 200, message: OK}
-- request:
- body: '{"query": {"multi_match": {"fields": ["user", "first_name", "last_name",
- "discount_name"], "query": "Rachel"}}, "_source": {"excludes": ["*"]}}'
- headers:
- connection: [keep-alive]
- content-type: [application/json]
- method: GET
- uri: http://search:9200/orders/doc/_search
- response:
- body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":1,"max_score":1.6739764,"hits":[{"_index":"orders","_type":"doc","_id":"15","_score":1.6739764,"_source":{}}]}}'}
- headers:
- content-length: ['214']
- content-type: [application/json; charset=UTF-8]
- status: {code: 200, message: OK}
-version: 1
diff --git a/tests/cassettes/test_dashboard_search_user_by_email.yaml b/tests/cassettes/test_dashboard_search_user_by_email.yaml
deleted file mode 100644
index 2375af9196..0000000000
--- a/tests/cassettes/test_dashboard_search_user_by_email.yaml
+++ /dev/null
@@ -1,51 +0,0 @@
-interactions:
-- request:
- body: '{"query": {"multi_match": {"query": "[email protected]", "fields":
- ["name", "description"]}}, "_source": {"exclude": ["*"]}}'
- headers:
- connection: [keep-alive]
- content-type: [application/json]
- method: GET
- uri: http://search:9200/storefront/doc/_search
- response:
- body: {string: '{"took":0,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}'}
- headers:
- Warning: ['299 Elasticsearch-5.4.3-eed30a8 "Deprecated field [exclude] used,
- expected [excludes] instead" "Thu, 16 Nov 2017 09:44:26 GMT"']
- content-length: ['122']
- content-type: [application/json; charset=UTF-8]
- status: {code: 200, message: OK}
-- request:
- body: '{"query": {"multi_match": {"query": "[email protected]", "fields":
- ["user", "status", "discount_name"]}}, "_source": {"exclude": ["*"]}}'
- headers:
- connection: [keep-alive]
- content-type: [application/json]
- method: GET
- uri: http://search:9200/orders/doc/_search
- response:
- body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}'}
- headers:
- Warning: ['299 Elasticsearch-5.4.3-eed30a8 "Deprecated field [exclude] used,
- expected [excludes] instead" "Thu, 16 Nov 2017 09:44:26 GMT"']
- content-length: ['122']
- content-type: [application/json; charset=UTF-8]
- status: {code: 200, message: OK}
-- request:
- body: '{"query": {"multi_match": {"query": "[email protected]", "type":
- "cross_fields", "operator": "and", "fields": ["user", "email", "first_name",
- "last_name"]}}, "_source": {"exclude": ["*"]}}'
- headers:
- connection: [keep-alive]
- content-type: [application/json]
- method: GET
- uri: http://search:9200/users/doc/_search
- response:
- body: {string: '{"took":3,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":1,"max_score":5.115776,"hits":[{"_index":"users","_type":"doc","_id":"109","_score":5.115776,"_source":{}}]}}'}
- headers:
- Warning: ['299 Elasticsearch-5.4.3-eed30a8 "Deprecated field [exclude] used,
- expected [excludes] instead" "Thu, 16 Nov 2017 09:44:26 GMT"']
- content-length: ['211']
- content-type: [application/json; charset=UTF-8]
- status: {code: 200, message: OK}
-version: 1
diff --git a/tests/cassettes/test_dashboard_search_user_name.yaml b/tests/cassettes/test_dashboard_search_user_name.yaml
deleted file mode 100644
index c916f959e8..0000000000
--- a/tests/cassettes/test_dashboard_search_user_name.yaml
+++ /dev/null
@@ -1,51 +0,0 @@
-interactions:
-- request:
- body: '{"query": {"multi_match": {"query": "Rhonda", "fields": ["user", "status",
- "discount_name"]}}, "_source": {"exclude": ["*"]}}'
- headers:
- connection: [keep-alive]
- content-type: [application/json]
- method: GET
- uri: http://search:9200/orders/doc/_search
- response:
- body: {string: '{"took":0,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}'}
- headers:
- Warning: ['299 Elasticsearch-5.4.3-eed30a8 "Deprecated field [exclude] used,
- expected [excludes] instead" "Thu, 16 Nov 2017 09:37:53 GMT"']
- content-length: ['122']
- content-type: [application/json; charset=UTF-8]
- status: {code: 200, message: OK}
-- request:
- body: '{"query": {"multi_match": {"query": "Rhonda", "fields": ["name", "description"]}},
- "_source": {"exclude": ["*"]}}'
- headers:
- connection: [keep-alive]
- content-type: [application/json]
- method: GET
- uri: http://search:9200/storefront/doc/_search
- response:
- body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}'}
- headers:
- Warning: ['299 Elasticsearch-5.4.3-eed30a8 "Deprecated field [exclude] used,
- expected [excludes] instead" "Thu, 16 Nov 2017 09:37:53 GMT"']
- content-length: ['122']
- content-type: [application/json; charset=UTF-8]
- status: {code: 200, message: OK}
-- request:
- body: '{"query": {"multi_match": {"query": "Rhonda", "type": "cross_fields", "operator":
- "and", "fields": ["user", "email", "first_name", "last_name"]}}, "_source":
- {"exclude": ["*"]}}'
- headers:
- connection: [keep-alive]
- content-type: [application/json]
- method: GET
- uri: http://search:9200/users/doc/_search
- response:
- body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":1,"max_score":2.6855774,"hits":[{"_index":"users","_type":"doc","_id":"106","_score":2.6855774,"_source":{}}]}}'}
- headers:
- Warning: ['299 Elasticsearch-5.4.3-eed30a8 "Deprecated field [exclude] used,
- expected [excludes] instead" "Thu, 16 Nov 2017 09:37:53 GMT"']
- content-length: ['213']
- content-type: [application/json; charset=UTF-8]
- status: {code: 200, message: OK}
-version: 1
diff --git a/tests/cassettes/test_dashboard_search_user_name_without_address.yaml b/tests/cassettes/test_dashboard_search_user_name_without_address.yaml
deleted file mode 100644
index 2f1d4c5189..0000000000
--- a/tests/cassettes/test_dashboard_search_user_name_without_address.yaml
+++ /dev/null
@@ -1,46 +0,0 @@
-interactions:
-- request:
- body: '{"query": {"multi_match": {"fields": ["name", "title", "description"],
- "query": "Brett", "type": "cross_fields"}}, "sort": ["_score"], "_source": {"excludes":
- ["*"]}}'
- headers:
- connection: [keep-alive]
- content-type: [application/json]
- method: GET
- uri: http://search:9200/storefront/doc/_search
- response:
- body: {string: '{"took":2,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}'}
- headers:
- content-length: ['122']
- content-type: [application/json; charset=UTF-8]
- status: {code: 200, message: OK}
-- request:
- body: '{"query": {"multi_match": {"fields": ["user", "email", "first_name", "last_name"],
- "query": "Brett", "type": "cross_fields", "operator": "and"}}, "_source": {"excludes":
- ["*"]}}'
- headers:
- connection: [keep-alive]
- content-type: [application/json]
- method: GET
- uri: http://search:9200/users/doc/_search
- response:
- body: {string: '{"took":23,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":1,"max_score":2.730029,"hits":[{"_index":"users","_type":"doc","_id":"122","_score":2.730029,"_source":{}}]}}'}
- headers:
- content-length: ['212']
- content-type: [application/json; charset=UTF-8]
- status: {code: 200, message: OK}
-- request:
- body: '{"query": {"multi_match": {"fields": ["user", "discount_name"], "query":
- "Brett"}}, "_source": {"excludes": ["*"]}}'
- headers:
- connection: [keep-alive]
- content-type: [application/json]
- method: GET
- uri: http://search:9200/orders/doc/_search
- response:
- body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}'}
- headers:
- content-length: ['122']
- content-type: [application/json; charset=UTF-8]
- status: {code: 200, message: OK}
-version: 1
diff --git a/tests/cassettes/test_dashboard_search_with_empty_results.yaml b/tests/cassettes/test_dashboard_search_with_empty_results.yaml
deleted file mode 100644
index 9dfb77c233..0000000000
--- a/tests/cassettes/test_dashboard_search_with_empty_results.yaml
+++ /dev/null
@@ -1,51 +0,0 @@
-interactions:
-- request:
- body: '{"query": {"multi_match": {"query": "foo", "fields": ["name", "description"]}},
- "_source": {"exclude": ["*"]}}'
- headers:
- connection: [keep-alive]
- content-type: [application/json]
- method: GET
- uri: http://search:9200/storefront/doc/_search
- response:
- body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}'}
- headers:
- Warning: ['299 Elasticsearch-5.4.3-eed30a8 "Deprecated field [exclude] used,
- expected [excludes] instead" "Thu, 16 Nov 2017 09:44:24 GMT"']
- content-length: ['122']
- content-type: [application/json; charset=UTF-8]
- status: {code: 200, message: OK}
-- request:
- body: '{"query": {"multi_match": {"query": "foo", "fields": ["user", "status",
- "discount_name"]}}, "_source": {"exclude": ["*"]}}'
- headers:
- connection: [keep-alive]
- content-type: [application/json]
- method: GET
- uri: http://search:9200/orders/doc/_search
- response:
- body: {string: '{"took":0,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}'}
- headers:
- Warning: ['299 Elasticsearch-5.4.3-eed30a8 "Deprecated field [exclude] used,
- expected [excludes] instead" "Thu, 16 Nov 2017 09:44:24 GMT"']
- content-length: ['122']
- content-type: [application/json; charset=UTF-8]
- status: {code: 200, message: OK}
-- request:
- body: '{"query": {"multi_match": {"query": "foo", "type": "cross_fields", "operator":
- "and", "fields": ["user", "email", "first_name", "last_name"]}}, "_source":
- {"exclude": ["*"]}}'
- headers:
- connection: [keep-alive]
- content-type: [application/json]
- method: GET
- uri: http://search:9200/users/doc/_search
- response:
- body: {string: '{"took":3,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}'}
- headers:
- Warning: ['299 Elasticsearch-5.4.3-eed30a8 "Deprecated field [exclude] used,
- expected [excludes] instead" "Thu, 16 Nov 2017 09:44:24 GMT"']
- content-length: ['122']
- content-type: [application/json; charset=UTF-8]
- status: {code: 200, message: OK}
-version: 1
diff --git a/tests/cassettes/test_dashboard_search_with_product_result.yaml b/tests/cassettes/test_dashboard_search_with_product_result.yaml
deleted file mode 100644
index 37953708d1..0000000000
--- a/tests/cassettes/test_dashboard_search_with_product_result.yaml
+++ /dev/null
@@ -1,51 +0,0 @@
-interactions:
-- request:
- body: '{"query": {"multi_match": {"query": "Group", "fields": ["name", "description"]}},
- "_source": {"exclude": ["*"]}}'
- headers:
- connection: [keep-alive]
- content-type: [application/json]
- method: GET
- uri: http://search:9200/storefront/doc/_search
- response:
- body: {string: '{"took":2,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":3,"max_score":2.9128819,"hits":[{"_index":"storefront","_type":"doc","_id":"23","_score":2.9128819,"_source":{}},{"_index":"storefront","_type":"doc","_id":"58","_score":2.9128819,"_source":{}},{"_index":"storefront","_type":"doc","_id":"56","_score":2.9128819,"_source":{}}]}}'}
- headers:
- Warning: ['299 Elasticsearch-5.4.3-eed30a8 "Deprecated field [exclude] used,
- expected [excludes] instead" "Thu, 16 Nov 2017 09:44:25 GMT"']
- content-length: ['408']
- content-type: [application/json; charset=UTF-8]
- status: {code: 200, message: OK}
-- request:
- body: '{"query": {"multi_match": {"query": "Group", "fields": ["user", "status",
- "discount_name"]}}, "_source": {"exclude": ["*"]}}'
- headers:
- connection: [keep-alive]
- content-type: [application/json]
- method: GET
- uri: http://search:9200/orders/doc/_search
- response:
- body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}'}
- headers:
- Warning: ['299 Elasticsearch-5.4.3-eed30a8 "Deprecated field [exclude] used,
- expected [excludes] instead" "Thu, 16 Nov 2017 09:44:25 GMT"']
- content-length: ['122']
- content-type: [application/json; charset=UTF-8]
- status: {code: 200, message: OK}
-- request:
- body: '{"query": {"multi_match": {"query": "Group", "type": "cross_fields", "operator":
- "and", "fields": ["user", "email", "first_name", "last_name"]}}, "_source":
- {"exclude": ["*"]}}'
- headers:
- connection: [keep-alive]
- content-type: [application/json]
- method: GET
- uri: http://search:9200/users/doc/_search
- response:
- body: {string: '{"took":1,"timed_out":false,"_shards":{"total":1,"successful":1,"failed":0},"hits":{"total":0,"max_score":null,"hits":[]}}'}
- headers:
- Warning: ['299 Elasticsearch-5.4.3-eed30a8 "Deprecated field [exclude] used,
- expected [excludes] instead" "Thu, 16 Nov 2017 09:44:25 GMT"']
- content-length: ['122']
- content-type: [application/json; charset=UTF-8]
- status: {code: 200, message: OK}
-version: 1