Browse Source

Remove erroneous index.SearchField('title') entries from search_fields

title is already included in Page.search_fields, so adding it again A) is redundant and B) makes it fail when run against Elasticsearch, due to the two occurrences having different indexing parameters.
Matt Westcott 7 năm trước cách đây
mục cha
commit
af6c4953bc
2 tập tin đã thay đổi với 0 bổ sung2 xóa
  1. 0 1
      bakerydemo/blog/models.py
  2. 0 1
      bakerydemo/breads/models.py

+ 0 - 1
bakerydemo/blog/models.py

@@ -89,7 +89,6 @@ class BlogPage(Page):
     ]
 
     search_fields = Page.search_fields + [
-        index.SearchField('title'),
         index.SearchField('body'),
     ]
 

+ 0 - 1
bakerydemo/breads/models.py

@@ -141,7 +141,6 @@ class BreadPage(Page):
     ]
 
     search_fields = Page.search_fields + [
-        index.SearchField('title'),
         index.SearchField('body'),
     ]