From d33454f3e7fb7810fd4b7a987e6a68b3c48ec98e Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Tue, 24 Jan 2023 13:44:47 +0000 Subject: search: Alias the position prefix with pos. * gn3/api/search.py (parse_query): Alias the position prefix with pos. --- gn3/api/search.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gn3/api/search.py') diff --git a/gn3/api/search.py b/gn3/api/search.py index e47e2f1..0d3f9ba 100644 --- a/gn3/api/search.py +++ b/gn3/api/search.py @@ -197,6 +197,9 @@ def parse_query(synteny_files_directory: Path, query: str): range_prefixes = ["mean", "peak", "position", "peakmb", "additive", "year"] for i, prefix in enumerate(range_prefixes): queryparser.add_rangeprocessor(xapian.NumberRangeProcessor(i, prefix + ":")) + # Alias the position prefix with pos. + queryparser.add_rangeprocessor(xapian.NumberRangeProcessor(range_prefixes.index("position"), + "pos:")) # Add field processors for synteny triplets. species_shorthands = {"Hs": "human", -- cgit v1.2.3