> I have to implement search function in my application, So i went with
> Acts_as_ferret engine.
> For that i used ferret-0.11.4-mswin32.gem and acts_as_ferret_0.4.1
> plugin
>
> I add require ''acts_as_ferret'' in config/environment.rb:
>
> add
>
> acts_as_ferret :fields => [ :firstname,:lastname] in my user model
>
> And in users table i have tuples as follows
>
> id firstname lastname
> 1 san peter
> 2 santosh patil
>
> when I query User.find_by_contents("san")
Not sure how find_by_contents works, but you need a wild card query...
"san*"
http://ferret.davebalmain.com/api/classes/Ferret/Search/WildcardQuery.html
-philip
>
> It will return only first tuple i.e. id 1
>
> Is there any setting that i nead to do or any problem with the gem and
> plugin that i used.
>
> Please help my
> --
> 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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---