mirror of
https://github.com/TandoorRecipes/recipes.git
synced 2026-01-01 12:18:45 -05:00
add unaccent to full text search vectors
This commit is contained in:
@@ -89,8 +89,8 @@ admin.site.register(Step, StepAdmin)
|
||||
def rebuild_index(modeladmin, request, queryset):
|
||||
with scopes_disabled():
|
||||
search_vector = (
|
||||
SearchVector('name', weight='A')
|
||||
+ SearchVector('description', weight='B'))
|
||||
SearchVector('name__unaccent', weight='A')
|
||||
+ SearchVector('description__unaccent', weight='B'))
|
||||
queryset.update(search_vector=search_vector)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user