Skip to content

Commit

Permalink
Fixed query to search using also title
Browse files Browse the repository at this point in the history
  • Loading branch information
luisg0nc committed Dec 18, 2018
1 parent 3d8eaba commit 396dfbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def list_profiles(self, query):
# all() is used to achieve a AND search (include all keywords)
keywords = query.split(" ")
# if (query in base.lower()) or (query in desc.lower()):
if (query in base.lower()) or all(x in desc for x in keywords):
if (query in base.lower()) or (query in title.lower()) or all(x in desc for x in keywords):
items_cache.append(create_item(title, proto, p, desc, p))

items_cache = sorted(items_cache, key=sort_by_usage, reverse=True)
Expand Down

0 comments on commit 396dfbc

Please sign in to comment.