How to organize range search in sphinx

danko Posted by danko on December 28, 2012

I have two range fields in a form. Min and max fields.

= form_tag search_items_path, :method => :get do
%label
= t('form.price')
= text_field_tag :min_price, params[:min_price]
= text_field_tag :max_price, params[:max_price]

= submit_tag t('form.search')

How to organize range search in sphinx?

Answers

piyush Answered by piyush on August 26, 2013

define_index do indexes name

has mileage end Car.search :with => {:mileage => 100..150000}

Worked