aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gn3/api/search.py3
1 files changed, 3 insertions, 0 deletions
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",