Hi all,
I have a model Competition with related translations on a separated
model CompetitionTranslation, I need to perform full text searches on
a locale basis.

#app/models/competition.rb
class Competition < ActiveRecord::Base
  has_many :competition_translations

  define_index do
    indexes competition_translations(:title), :as => :title
    has "competitions.end_on > DATE(NOW())", :as => :active, :boolean
=> true
    has "competition_translations.locale = 'hu'", :as
=> :hungarian, :type => :boolean
  end
end

So, I can use it in this way:
Competition.search "iskola", :with => { :hungarian => true }

Unfortunately this approach doesn't work, even if I only use the :with
option:
Competition.search :with => { :hungarian => true }

I suspect TS can't create "multi-tables" attributes, because
Competition.search :with => { :active => true } works fine.

Did anyone experienced a similar issue? Do you have suggestions/
patterns for the main feature?

Thanks in advance,
Luca

-- 
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.

Reply via email to