From a37622b466f9f045db06a6f07e88fcf81b176f91 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 1 Aug 2024 18:37:41 +0100 Subject: 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. --- gn3/api/search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gn3') 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") -- cgit v1.2.3