mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 04:10:06 -05:00
add unaccent to full text search vectors
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user