File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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 @@ -58,6 +58,7 @@ class SearchFilter(BaseFilterBackend):
5858 '=' : 'iexact' ,
5959 '@' : 'search' ,
6060 '$' : 'iregex' ,
61+ '&' : 'unaccent' ,
6162 }
6263 search_title = _ ('Search' )
6364 search_description = _ ('A search term.' )
You can’t perform that action at this time.
0 commit comments