Get max and min value of a column with thinking sphinx
问题 I'm working with Rails and thinking sphinx. I have a model Product indexed as following (only showing relevant information) define_index do indexes :name, :as => :name, :sortable => true indexes color, :facet => true ... indexes price, :as => :range, :facet => true has created_at, price, root_category_id ... end What I need is to get the Product with max price of the current search. I've tried something like Product.search('', :select => 'MAX(price)') but it's returning me a mess. >> Product