changeset 433:406966afa113

Using name_exact schema field for wildcard searching Fixes #26.
author Michael Mayorov <marchael@kb.csu.ru>
date Sat, 13 Aug 2011 19:24:59 +0000
parents 66981eb25822
children 5d805b9f5e91
files MoinMoin/apps/frontend/views.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/apps/frontend/views.py	Sat Aug 13 16:20:46 2011 +0000
+++ b/MoinMoin/apps/frontend/views.py	Sat Aug 13 19:24:59 2011 +0000
@@ -141,7 +141,7 @@
     index_object = WhooshIndex()
     ix = index_object.all_revisions_index if request.values.get('search_in_all') else index_object.latest_revisions_index
     with ix.searcher() as searcher:
-        mparser = MultifieldParser(["name", "content"], schema=ix.schema)
+        mparser = MultifieldParser(["name_exact", "name", "content"], schema=ix.schema)
         q = mparser.parse(query)
         results = searcher.search_page(q, int(pagenum), pagelen=int(pagelen))
         return render_template('search_results.html',