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

Commit

Permalink
#44 trying to reduce by matching allofterms
Browse files Browse the repository at this point in the history
  • Loading branch information
mrwunderbar666 committed Nov 9, 2021
1 parent e79bcf0 commit 4b9210f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flaskinventory/add/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ def new_entry():
query = form.name.data
query_string = f'''{{
field1 as var(func: regexp(name, /{query.replace('/', '').ljust(3)}/i)) @filter(type("{form.entity.data}"))
field2 as var(func: anyofterms(name, "{query}")) @filter(type("{form.entity.data}"))
field3 as var(func: anyofterms(other_names, "{query}")) @filter(type("{form.entity.data}"))
field2 as var(func: allofterms(name, "{query}")) @filter(type("{form.entity.data}"))
field3 as var(func: allofterms(other_names, "{query}")) @filter(type("{form.entity.data}"))
data(func: uid(field1, field2, field3)) {{
uid
Expand Down

0 comments on commit 4b9210f

Please sign in to comment.