Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Index orders
Jakub Draganek00903f1092fa
diff --git a/saleor/search/documents.py b/saleor/search/documents.pyindex 00a1dbd410..afae99600f 100644--- a/saleor/search/documents.py+++ b/saleor/search/documents.py@@ -1,6 +1,7 @@from django_elasticsearch_dsl import DocType, Indexfrom ..product.models import Productfrom ..userprofile.models import User+from ..order.models import Orderstorefront = Index('storefront')storefront.settings(number_of_shards=1, number_of_replicas=0)@@ -18,10 +19,24 @@ class ProductDocument(DocType):'is_published']+users = Index('users')+users.settings(number_of_shards=1, number_of_replicas=0)+@users.doc_typeclass UserDocument(DocType):class Meta:model = Userfields = ['email', 'is_staff']+++orders = Index('orders')+orders.settings(number_of_shards=1, number_of_replicas=0)++[email protected]_type+class OrderDocument(DocType):+ class Meta:+ model = Order+ fields = ['status', 'created', 'user_email', 'discount_name']