Improve SimpleSearch with subdirs
This commit is contained in:
parent
6d62d6b8b4
commit
57067a9f95
|
@ -40,7 +40,7 @@ class SimpleSearch(BaseSearch):
|
|||
res = []
|
||||
for entry in g.current_wiki.get_index():
|
||||
name = filename_to_cname(entry['name'])
|
||||
if set(query.split()).intersection(name.split('-')):
|
||||
if set(query.split()).intersection(name.replace('/', '-').split('-')):
|
||||
page = g.current_wiki.get_page(name)
|
||||
res.append(dict(name=name, content=page['data']))
|
||||
return res
|
||||
|
|
Loading…
Reference in a new issue