Acts_as_ferret

Hi every one.

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”)

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

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