Skip to content
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.

Commit

Permalink
#159 only perform regex at beginning of string
Browse files Browse the repository at this point in the history
  • Loading branch information
mrwunderbar666 committed Jul 22, 2022
1 parent e13ae17 commit 038e132
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flaskinventory/endpoints/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
def quicksearch():
query = request.args.get('q')
# query_string = f'{{ data(func: regexp(name, /{query}/i)) @normalize {{ uid unique_name: unique_name name: name type: dgraph.type channel {{ channel: name }}}} }}'
query_regex = f'/{strip_query(query)}/i'
query_regex = f'/^{strip_query(query)}/i'
query_string = f'''
query quicksearch($name: string, $name_regex: string)
{{
Expand Down

0 comments on commit 038e132

Please sign in to comment.