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.

Était-ce utile?

La 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

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top