# Acts\_as\_ferret - :find\_by\_contents returns no results

**URL:** <https://www.ruby-forum.com/t/acts-as-ferret-find-by-contents-returns-no-results/129622>\
**Category:** Ferret\
**Created:** [February 20, 2008, 4:34am UTC](https://www.ruby-forum.com/t/acts-as-ferret-find-by-contents-returns-no-results/129622 "2008-02-20T04:34:06Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![magnifiedplaid](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/45deac/32.png) [@magnifiedplaid](https://www.ruby-forum.com/u/magnifiedplaid)\
**Post date:** [February 20, 2008, 4:34am UTC](https://www.ruby-forum.com/t/acts-as-ferret-find-by-contents-returns-no-results/129622/1 "2008-02-20T04:34:06Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![magnifiedplaid](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/45deac/32.png) [@magnifiedplaid](https://www.ruby-forum.com/u/magnifiedplaid)\
**Post date:** [July 10, 2008, 12:24am UTC](https://www.ruby-forum.com/t/acts-as-ferret-find-by-contents-returns-no-results/129622/2 "2008-07-10T00:24:37Z")

</div>

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?
