File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -230,6 +230,7 @@ The search behavior may be specified by prefixing field names in `search_fields`
230230| ` $ ` | ` iregex ` | Regex search. |
231231| ` @ ` | ` search ` | Full-text search (Currently only supported Django's [ PostgreSQL backend] [ postgres-search ] ). |
232232| None | ` icontains ` | Contains search (Default). |
233+ | ` & ` | ` unaccent ` | Accent-insensitive search. (Currently only supported Django's [ PostgreSQL backend] [ postgres-lookups ] ). |
233234
234235For example:
235236
@@ -370,3 +371,4 @@ The [djangorestframework-word-filter][django-rest-framework-word-search-filter]
370371[ HStoreField ] : https://docs.djangoproject.com/en/stable/ref/contrib/postgres/fields/#hstorefield
371372[ JSONField ] : https://docs.djangoproject.com/en/stable/ref/models/fields/#django.db.models.JSONField
372373[ postgres-search ] : https://docs.djangoproject.com/en/stable/ref/contrib/postgres/search/
374+ [ postgres-lookups ] : https://docs.djangoproject.com/en/stable/ref/contrib/postgres/lookups/#unaccent
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ class SearchFilter(BaseFilterBackend):
6868 '=' : 'iexact' ,
6969 '@' : 'search' ,
7070 '$' : 'iregex' ,
71+ '&' : 'unaccent' ,
7172 }
7273 search_title = _ ('Search' )
7374 search_description = _ ('A search term.' )
You can’t perform that action at this time.
0 commit comments