Forum: Ferret acts_as_ferret - :find_by_contents returns no results

Posted by A. M. (magnifiedplaid)
on 2008-02-20 04:34
I've just installed the gem and plugin, and updated my model
accordingly. However, MyModel.find_by_contents always returns no
results, even though I know it should!

>> MyModel.find_by_contents "blah"
=> #<ActsAsFerret::SearchResults:0x6699b4 @results=[], @per_page=0,
@current_page=nil, @total_hits=0, @total_pages=0>

I'm also getting the same (non)results with another rails app, with
another database table.

What am I doing wrong?
Posted by Grant Blakeman (gblakeman)
on 2008-07-10 00:24
I'm having the exact same issue.

default field list: [:band_name]
Query: A Band's Name
total hits: 0, results delivered: 0

Every name I try that is in the Table returns 0 results.

-gb

A. M. wrote:
> I've just installed the gem and plugin, and updated my model
> accordingly. However, MyModel.find_by_contents always returns no
> results, even though I know it should!
> 
>>> MyModel.find_by_contents "blah"
> => #<ActsAsFerret::SearchResults:0x6699b4 @results=[], @per_page=0,
> @current_page=nil, @total_hits=0, @total_pages=0>
> 
> I'm also getting the same (non)results with another rails app, with
> another database table.
> 
> What am I doing wrong?
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.