Forum: Ferret acts_as_ferret: experiencing bugs with very simple search

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
5ca80172af32f2f62851048da2857c7b?d=identicon&s=25 Tony Amoyal (corgan1003)
on 2009-04-14 06:25
I am doing a very simple search on my DB using acts_as_ferret. I put
this in my "Venue" model:

   acts_as_ferret :fields => [:name, :city]

And this is in my controller search action:

   @t = Venue.find_by_contents(params[:search]+'~')

and then I just render the results.

   render :text => @t.to_json, :success => true, :status => :ok

If I run a quick test:


I see in my log that the proper query "The~" is being executed on the
index. However, I get no results. I definitely have a few "Venues" with
the word "The" in the name field.

Since this is a very simple search and acts_as_ferret is used quite a
bit, I tried rebuilding the index to see if it was dice

Any ideas?

This topic is locked and can not be replied to.