Added prefixes support for queries
Ranges and Haystack backend sort of working