aboutsummaryrefslogtreecommitdiff
path: root/gn3
diff options
context:
space:
mode:
authorArun Isaac2024-08-01 18:37:41 +0100
committerArun Isaac2024-08-01 18:45:45 +0100
commita37622b466f9f045db06a6f07e88fcf81b176f91 (patch)
tree3ff944ceff4744a6a58247a294f58d71f8ceb35b /gn3
parentf6335afa7643101dae3bca0160c86a6ea87b954e (diff)
downloadgenenetwork3-a37622b466f9f045db06a6f07e88fcf81b176f91.tar.gz
Stem all the time.
With the STEM_SOME, xapian does not stem query words that start with a capital letter. Hence, we switch to the STEM_ALL strategy. * gn3/api/search.py (parse_query): Set stemming strategy to STEM_ALL.
Diffstat (limited to 'gn3')
-rw-r--r--gn3/api/search.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gn3/api/search.py b/gn3/api/search.py
index 7242ac1..05a989c 100644
--- a/gn3/api/search.py
+++ b/gn3/api/search.py
@@ -199,7 +199,7 @@ def parse_query(synteny_files_directory: Path, query: str):
"""Parse search query using GeneNetwork specific field processors."""
queryparser = xapian.QueryParser()
queryparser.set_stemmer(xapian.Stem("en"))
- queryparser.set_stemming_strategy(queryparser.STEM_SOME)
+ queryparser.set_stemming_strategy(queryparser.STEM_ALL)
species_prefix = "XS"
chromosome_prefix = "XC"
queryparser.add_boolean_prefix("author", "A")