Acts_as_ferret: experiencing bugs with very simple search

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 corrupted…no dice

Any ideas?


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