diff --git a/yente/search/queries.py b/yente/search/queries.py index 52d78d70..7bc2fbe3 100644 --- a/yente/search/queries.py +++ b/yente/search/queries.py @@ -39,6 +39,8 @@ def filter_query( datasets.remove(exclude_ds) if len(datasets): filterqs.append({"terms": {"datasets": datasets}}) + else: + filterqs.append({"match_none": {}}) if schema is not None: schemata = schema.matchable_schemata if not schema.matchable: