[extensions-web] search: Use the stemmer when generating a query
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web] search: Use the stemmer when generating a query
- Date: Fri, 23 Mar 2012 11:35:51 +0000 (UTC)
commit bc038ac5bd236f8bd3eec89684b165f923d3e209
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Mar 23 05:14:41 2012 -0300
search: Use the stemmer when generating a query
The Xapian docs are wrong (and will be fixed soon) -- we need to set
the stemming strategy if we want to use the stemmer.
sweettooth/extensions/search.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/sweettooth/extensions/search.py b/sweettooth/extensions/search.py
index befbf8a..e5c2a9c 100644
--- a/sweettooth/extensions/search.py
+++ b/sweettooth/extensions/search.py
@@ -57,6 +57,7 @@ def enquire(querystring):
return None
qp = xapian.QueryParser()
+ qp.set_stemming_strategy(qp.STEM_SOME)
qp.set_stemmer(xapian.Stem("en"))
qp.set_database(db)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]