Skip to content

Commit

Permalink
prefix index with app_label
Browse files Browse the repository at this point in the history
  • Loading branch information
jrief committed May 4, 2020
1 parent ba76821 commit d5609a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shop/search/documents.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ class ProductDocument:
"""
def __new__(cls, language=None, settings=None):
if language:
index_name = 'products-{}'.format(language.lower())
index_name = '{0}.products-{1}'.format(app_settings.SHOP_APP_LABEL, language.lower())
doc_name = 'ProductDocument{}'.format(language.title())
analyzer = body_analyzers.get(language, body_analyzers['default'])
else:
index_name = 'products'
index_name = '{}.products'.format(app_settings.SHOP_APP_LABEL)
doc_name = 'ProductDocument'
analyzer = body_analyzers['default']
products_index = Index(index_name)
Expand Down

0 comments on commit d5609a3

Please sign in to comment.