From 745a40e19ce09fac958497611bed523db611d932 Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Fri, 22 Mar 2013 10:33:20 +0000 Subject: [PATCH] Index "name" as a keyword field, not text This means that exact matches are preferred, and e.g. "python-foo" is treated as a unit and so no longer matches for just "python" (typically it will get a lower-scoring match for "python" in the summary or description). --- index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.py b/index.py index a83e78d..2aa2593 100644 --- a/index.py +++ b/index.py @@ -17,7 +17,7 @@ from zeroinstall.injector.namespaces import XMLNS_IFACE sa = StemmingAnalyzer() schema = fields.Schema( uri = fields.ID(unique=True, stored=True), - name = fields.TEXT(stored=True,field_boost=50.0), + name = fields.KEYWORD(stored=True, field_boost=50.0, lowercase=True), summary = fields.TEXT(stored=True, field_boost=5.0), description = fields.TEXT(analyzer=sa), category = fields.KEYWORD(stored=True), -- 2.11.4.GIT