diff options
author | Arun Isaac | 2023-01-24 13:44:47 +0000 |
---|---|---|
committer | Arun Isaac | 2023-01-24 13:45:53 +0000 |
commit | d33454f3e7fb7810fd4b7a987e6a68b3c48ec98e (patch) | |
tree | 4833fa9cdc4bd98391d3c9c6f5e17639fff62da7 | |
parent | ecb8929c4a749ff24e8d3086331ce149dc66b574 (diff) | |
download | genenetwork3-d33454f3e7fb7810fd4b7a987e6a68b3c48ec98e.tar.gz |
search: Alias the position prefix with pos.
* gn3/api/search.py (parse_query): Alias the position prefix with pos.
-rw-r--r-- | gn3/api/search.py | 3 |
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", |