diff --git a/realms/modules/search/models.py b/realms/modules/search/models.py index eacce27..a9f019c 100644 --- a/realms/modules/search/models.py +++ b/realms/modules/search/models.py @@ -33,7 +33,7 @@ class SimpleSearch(BaseSearch): res = [] for entry in g.current_wiki.get_index(): name = filename_to_cname(entry['name']) - if query in name.split('-'): + if set(query.split()).intersection(name.split('-')): page = g.current_wiki.get_page(name) res.append(dict(name=name, content=page['data'])) return res diff --git a/realms/templates/search/search.html b/realms/templates/search/search.html index 8de77af..bb0e4ba 100644 --- a/realms/templates/search/search.html +++ b/realms/templates/search/search.html @@ -1,6 +1,7 @@ {% extends 'layout.html' %} {% block body %} {% if results %} +