ok for the user, for now i am only indexing the users full name, i have

class User < ActiveRecord::Base
   acts_as_ferret :store_class_name => true, :fields => { :full_name =>
{ :boost
        => 3 }}
   has_and_belongs_to_many :friends,:class_name=>"User", :join_table=>
       "friends_users",:association_foreign_key => "friend_id",
      :after_add => :become_friend_to_friend,:after_remove=>
      :remove_user_as_friend

so thats pretty much all there is there. The thing is Im calling the
search as a multisearch - User.multisearch(query,[ Book ], (with :limit
and :offset)).




Jens Kraemer wrote:
> On Tue, Oct 31, 2006 at 10:02:50AM +0100, Eric Gross wrote:
>> Hey guys, im trying to get my friends to come up at the top of the act 
>> as ferret search. I would query the whole result set first, then move my 
>> friends to the top, but the thing is, Im paginating my results and use 
>> the offset and limit parameters in the multi_search() function.
>> 
>> Anyone know how to do this?
> 
> We'd need some more info on how you store your friend-of-relationship, 
> and
> how your index looks like (i.e. what fields does it contain).
> 
> cheers,
> Jens
> 
> --
> webit! Gesellschaft f�r neue Medien mbH          www.webit.de
> Dipl.-Wirtschaftsingenieur Jens Kr�mer       [EMAIL PROTECTED]
> Schnorrstra�e 76                         Tel +49 351 46766  0
> D-01069 Dresden                          Fax +49 351 46766 66


-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to