Hi,
I'm working with Ruby on rails 2.3.2, TS 1.3.14 and Sphinx 0.9.9.
I found out that none of my filters work actually, while without them
the search works correctly! I mean, in my announcements table I've got
a province_id integer field. When I set up the index as follows it
won't work either:
class Announcement < ActiveRecord::Base
belongs_to :announcement_type
belongs_to :user
belongs_to :province
has_many :announcement_favorites
has_many :announcement_comments
has_many :announcement_subscriptions
has_many :announcement_views
acts_as_taggable_on :tags
validates_presence_of :title, :description, :expirationDate
define_index do
indexes title, :as => :title
indexes description, :as => :description
has province_id, :as => :province_id #or without the alias
end
Then I search this way:
Announcement.search params[:search], :with => {:province_id =>
1}, :page=>params[:page], :per_page => 10
Am I missing something?
Please help!
Thanks,
Brian
--
You received this message because you are subscribed to the Google Groups
"Thinking Sphinx" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/thinking-sphinx?hl=en.