Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchdawson1982 committed Sep 17, 2024
1 parent 70c6156 commit a918e0f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions home/service/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ def _build_entity_types(self, entity_types: list[str]) -> tuple[ResultType, ...]

def _format_query_value(self, query: str) -> str:
query_pattern: str = r"^[\"'].+[\"']$"
# We expect a quoted query to be an exact match therefore when not, we replace
# underscores with spaces.
# Datahub treats any query with underscores as exact, so if the string is not quoted,
# we convert underscores to spaces so that we get partial matches as well.
if not re.match(query_pattern, query):
query = query.replace("_", " ")
return query
Expand Down

0 comments on commit a918e0f

Please sign in to comment.