add unaccent to full text search vectors

This commit is contained in:
smilerz
2021-04-25 19:35:17 -05:00
parent 447324e673
commit 6eaf519fd6
5 changed files with 10 additions and 10 deletions

View File

@ -12,8 +12,8 @@ def set_default_search_vector(apps, schema_editor):
return
with scopes_disabled():
search_vector = (
SearchVector('name', weight='A')
+ SearchVector('description', weight='B'))
SearchVector('name__unaccent', weight='A')
+ SearchVector('description__unaccent', weight='B'))
Recipe.objects.all().update(search_vector=search_vector)