Problem with multi-search

Hi all,
I have indexes on 2 models
e.g Message model
acts_as_ferret(:store_class_name => true,
:fields =>{:message => {:store => :compressed},
:felix_user_id => {:index
=>:untokenized_omit_norms,:store => :no})

and the chat model acts_as_ferret(:store_class_name => true,
:fields => {:name => {:store => :no},)
where mesage belongs to chat.

When i search a keyword,it could be present in message or it could be
present in chat name.
So im doing a multi-search on Message and Chat model.But the results
dont
come.the keyword is indexed but doesnt show up.
Im using the paginating_ferret_find method
def paginating_ferret_multi_search(options)
count = Chat.multi_search(options[:q], [Message], {:limit => :all,
:lazy
=> false}).total_hits
PagingEnumerator.new(options[:page_size], count.total_hits, false,
options[:current], 1) do |page|
offset = (options[:current].to_i - 1) * options[:page_size]
limit = options[:page_size]

  Chat.multi_search(options[:q], [Message], {:offset => offset, 

:limit
=> limit})
end
end

Can anyone please help on what i am missing?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs