diff --git a/docs/api-guide/filtering.md b/docs/api-guide/filtering.md index d305ede6ba..3e004ed8b6 100644 --- a/docs/api-guide/filtering.md +++ b/docs/api-guide/filtering.md @@ -226,6 +226,7 @@ The search behavior may be restricted by prepending various characters to the `s * '=' Exact matches. * '@' Full-text search. (Currently only supported Django's [PostgreSQL backend](https://docs.djangoproject.com/en/dev/ref/contrib/postgres/search/).) * '$' Regex search. +* '&' Accent-insensitive search. (Currently only supported Django's [PostgreSQL backend](https://docs.djangoproject.com/en/dev/ref/contrib/postgres/lookups/#unaccent).) For example: diff --git a/rest_framework/filters.py b/rest_framework/filters.py index 3665775195..017fbc7dd0 100644 --- a/rest_framework/filters.py +++ b/rest_framework/filters.py @@ -45,6 +45,7 @@ class SearchFilter(BaseFilterBackend): '=': 'iexact', '@': 'search', '$': 'iregex', + '&': 'unaccent', } search_title = _('Search') search_description = _('A search term.')