Skip to content

Commit

Permalink
DUG-155 Consistently incorrect concept counts in some cases (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimir2217 authored Jul 12, 2023
1 parent 9d7eaf2 commit d97e85c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/dug/core/async_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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})
Expand Down

0 comments on commit d97e85c

Please sign in to comment.