diff --git a/frappe/utils/help.py b/frappe/utils/help.py index 9d607caba7..87697d3102 100644 --- a/frappe/utils/help.py +++ b/frappe/utils/help.py @@ -81,7 +81,9 @@ class HelpDatabase(object): def search(self, words): self.connect() - return self.db.sql('select title, intro, path from help where match(content) against (%s) limit 10', words) + return self.db.sql(''' + select title, intro, path from help where title like '%{term}%' union + select title, intro, path from help where match(content) against ('{term}') limit 10'''.format(term=words)) def get_content(self, path): self.connect()