Question

Trying to setup a price range with haystack and xapian. We had it working with solr by passing in a query like this via HTTP GET.

To get a price from 2 to 3 dollars:

selected_facets=price:[2+TO+3]

But using the xapian backend, it returns nothing. I am getting a list of facets so i know the database is present and working. Doing an exact query works too, just the ranges that don't work.

Was it helpful?

Solution

Xapian syntax for range queries is:

field:range_from..range_to

In your case it would be something like

selected_facets=price:2..3

See: http://xapian.org/docs/valueranges.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top