define_index do
has :has_description, :type => :integer
has :has_website, :type => :integer
set_property(:morphology => 'stem_en')
set_property(:ignore_chars => 'U+0027')
set_property(:enable_star => true)
end
Search Code:
@listings = Listing.search(params[:q], :order => "has_description
DESC, has_website DESC, name ASC, population DESC", :page => params
[:page])
My problem is that when I have both has_description and has_website as
columns to sort by, I get no results back. However, when I just list
1 or the other as below:
@listings = Listing.search(params[:q], :order => "has_description
DESC, name ASC, population DESC", :page => params[:page])
I get search results. Any ideas why?
define_index do
indexes :name, :sortable => true
has :population, :type => :integer
has :has_description, :type => :integer
has :has_website, :type => :integer
set_property(:morphology => 'stem_en')
set_property(:ignore_chars => 'U+0027')
set_property(:enable_star => true)
end
Mind you, it worked fine for me with and without the :type - are you using MySQL? Or PostgreSQL?
--
Pat
> --
>
> You received this message because you are subscribed to the Google Groups "Thinking Sphinx" group.
> To post to this group, send email to thinkin...@googlegroups.com.
> To unsubscribe from this group, send email to thinking-sphi...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.
>
>