Browse Source

[enhance] search results in help (#2022)

version-14
Faris Ansari 9 years ago
committed by Rushabh Mehta
parent
commit
add9c74779
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      frappe/utils/help.py

+ 3
- 1
frappe/utils/help.py View File

@@ -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()


Loading…
Cancel
Save