Forum: Ferret acts_as_ferret - :find_by_contents returns no results

5edf92389b4db285d7f0147e875a1085?d=identicon&s=25 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?
Ae69a35a268082691bb320d3cfb366c3?d=identicon&s=25 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?
This topic is locked and can not be replied to.