diff --git a/rest_framework/filters.py b/rest_framework/filters.py index c15723ec3..d8de81d55 100644 --- a/rest_framework/filters.py +++ b/rest_framework/filters.py @@ -90,6 +90,9 @@ class SearchFilter(BaseFilterBackend): parts = search_field.split(LOOKUP_SEP) for part in parts: field = opts.get_field(part) + if field.get_internal_type() in ('JSONField', 'HStoreField'): + # These fields support arbitrary key lookups + break if hasattr(field, 'get_path_info'): # This field is a relation, update opts to follow the relation path_info = field.get_path_info()