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 %} +

Results for {{ request.args.get('q') }}

{% for r in results %} @@ -12,6 +13,6 @@ {% endfor %}
{% else %} - No Results Found +

No results found for {{ request.args.get('q') }}

{% endif %} {% endblock %} diff --git a/realms/version.py b/realms/version.py index 9bdd4d2..08d79c0 100644 --- a/realms/version.py +++ b/realms/version.py @@ -1 +1 @@ -__version__ = '0.5.0' \ No newline at end of file +__version__ = '0.5.1' \ No newline at end of file