I can not make it work in any way. I'm dealing with this a whole workday 
today.

So, I have tried all of these setups:
----------------
class Video < ActiveRecord::Base
  ...
  belongs_to :topic
  ...
  is_indexed :fields => ['title','description','created_at'],
             :include => [
                {:association_name => 'topic', :field => 'id', :as => 
'topic_id'}
              ],
              :delta => {:field => 'created_at'}
  ...
end

@sphinx = Ultrasphinx::Search.new(:query => "london", :class_names => 
"Video", :filters => {:topic_id => 17} ).run.total_entries

Ultrasphinx::UsageError: field "topic_id" is invalid

---------------
  is_indexed :fields => ['title','description','created_at','topic_id'],

@sphinx = Ultrasphinx::Search.new(:query => "london", :class_names => 
"Video", :filters => {:topic_id => 17} ).run.total_entries

Ultrasphinx::UsageError: field "topic_id" is invalid

--------------
  is_indexed :fields => ['title','description','created_at'],
             :include => [
                {:association_name => 'topic', :field => 'id', :as => 
'topic_id2'}


@sphinx = Ultrasphinx::Search.new(:query => "london", :class_names => 
"Video", :filters => {:topic_id2 => 17} ).run.total_entries

Ultrasphinx::UsageError: field "topic_id2" is invalid

----------

After each change of configuration I run
rake ultrasphinx:configure
rake ultrasphinx:index

No real results. I just can't make it work with :filters . I'm using 
ultrasphinx 1.11 .

Every idea and help is highly appreciated.

10x in advance.
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to