title: Ordering by multiple columns in Sunspot?
body: <h2>Solved</h2>
  
  <p>I want to have my <code>:price</code> and <code>:purchase_date</code> fields to be ordered together in my search index. So it will give the most present date and then the lowest price of the following date. How is this done?</p>
  
  <p>I think there is a bug when doing:</p>
  
  <pre><code>order_by :purchase_date, :desc
  order_by :price,:asc
  </code></pre>
  
  <p>compared to:</p>
  
  <pre><code>order_by(:purchase_date, :desc)
  order_by(:price,:asc)
  </code></pre>
  
  <p>My finished code is like this:</p>
  
  <pre><code>class SearchController &lt; ApplicationController
  
    def index
      @search = UserPrice.search do
        fulltext params[:search]
        paginate(:per_page =&gt; 5, :page =&gt; params[:page])
        facet :business_retail_store_id, :business_online_store_id
        order_by(:purchase_date, :desc) 
        order_by(:price,:asc)
      end
      @user_prices = @search.results
    end
  end
  </code></pre>