Skip to content

Commit

Permalink
Re-added SearchField as per docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesbiggs authored and zerolab committed May 5, 2023
1 parent 00883f2 commit 35fffc4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/wagtailmedia/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,13 @@ class AbstractMedia(CollectionMember, index.Indexed, models.Model):
objects = MediaQuerySet.as_manager()

search_fields = CollectionMember.search_fields + [
index.SearchField("title", boost=10),
index.AutocompleteField("title", boost=10),
index.FilterField("title"),
index.RelatedFields(
"tags",
[
index.SearchField("name", boost=10),
index.AutocompleteField("name", boost=10),
],
),
Expand Down

0 comments on commit 35fffc4

Please sign in to comment.