diff --git a/src/dug/core/async_search.py b/src/dug/core/async_search.py index d0140f24..bcca8797 100644 --- a/src/dug/core/async_search.py +++ b/src/dug/core/async_search.py @@ -97,6 +97,14 @@ async def search_concepts(self, query, offset=0, size=None, fuzziness=1, prefix_ """ query = { "bool": { + "filter": { + "bool": { + "must": [ + {"wildcard": {"description": "?*"}}, + {"wildcard": {"name": "?*"}} + ] + } + }, "should": [ { "match_phrase": { @@ -184,7 +192,8 @@ async def search_concepts(self, query, offset=0, size=None, fuzziness=1, prefix_ } } } - ] + ], + "minimum_should_match": 1, } } body = json.dumps({'query': query})