kopia lustrzana https://github.com/wagtail/wagtail
Merge branch 'searchchanges/title-boost-fix' of https://github.com/kaedroho/wagtail into kaedroho-searchchanges/title-boost-fix
Conflicts: wagtail/wagtailcore/models.pypull/664/head
commit
a72943025f
|
@ -84,7 +84,7 @@ Options
|
|||
```````
|
||||
|
||||
- **partial_match** (boolean) - Setting this to true allows results to be matched on parts of words. For example, this is set on the title field by default so a page titled "Hello World!" will be found if the user only types "Hel" into the search box.
|
||||
- **boost** (number) - This allows you to set fields as being more important than others. Setting this to a high number on a field will make pages with matches in that field to be ranked higher. By default, this is set to 100 on the title field and 1 on all other fields.
|
||||
- **boost** (number) - This allows you to set fields as being more important than others. Setting this to a high number on a field will make pages with matches in that field to be ranked higher. By default, this is set to 2 on the Page title field and 1 on all other fields.
|
||||
- **es_extra** (dict) - This field is to allow the developer to set or override any setting on the field in the ElasticSearch mapping. Use this if you want to make use of any ElasticSearch features that are not yet supported in Wagtail.
|
||||
|
||||
|
||||
|
|
|
@ -268,7 +268,7 @@ class Page(six.with_metaclass(PageBase, MP_Node, ClusterableModel, index.Indexed
|
|||
expired = models.BooleanField(default=False, editable=False)
|
||||
|
||||
search_fields = (
|
||||
index.SearchField('title', partial_match=True, boost=100),
|
||||
index.SearchField('title', partial_match=True, boost=2),
|
||||
index.FilterField('id'),
|
||||
index.FilterField('live'),
|
||||
index.FilterField('owner'),
|
||||
|
|
Ładowanie…
Reference in New Issue