# An help with the OR condition... is this a bug?

**URL:** <https://www.ruby-forum.com/t/an-help-with-the-or-condition-is-this-a-bug/156493>\
**Category:** Ferret\
**Created:** [December 29, 2008, 12:35am UTC](https://www.ruby-forum.com/t/an-help-with-the-or-condition-is-this-a-bug/156493 "2008-12-29T00:35:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xdmx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/53a042/32.png) [@xdmx](https://www.ruby-forum.com/u/xdmx)\
**Post date:** [December 29, 2008, 12:35am UTC](https://www.ruby-forum.com/t/an-help-with-the-or-condition-is-this-a-bug/156493/1 "2008-12-29T00:35:26Z")

</div>

Hi, i’m playing with ferret and some records in the db. This is what i’m  
doing:

> > Model.find\_with\_ferret(’+title:\* +countries:IT’)  
> > =\> 3 records (right)

> > Model.find\_with\_ferret(’+title:\* +countries:(IT OR IT)’)  
> > =\> 3 records (right)

> > Model.find\_with\_ferret(’+title:\* +countries:(IT AND IT)’)  
> > =\> 3 records (right)

> > Model.find\_with\_ferret(’+title:\* +countries:(US OR IT)’)  
> > =\> 0 records (damn wrong)

Why this? I mean, what’s wrong on the OR condition? I used it in a very  
old version and worked, does it changed in the meanwhile? Now i’m using  
the last ferret and acts\_as\_ferret.

I almost forgot, another not so nice thing is this:

> > Model.find\_with\_ferret(’+countries:IT’)  
> > =\> 0 records (damn wrong)

Why? ☹

My acts\_as\_ferret config is:

acts\_as\_ferret(:fields =\> {:title =\> {},  
:countries =\> {},  
:created\_at\_int =\> {:index =\>  
:untokenized\_omit\_norms,  
:term\_vector =\> :no}},  
:analyzer =\>  
Ferret::Analysis::StandardAnalyzer.new([]))

Thanks

---

<div class="post-metadata">

**Author:** ![xdmx](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/53a042/32.png) [@xdmx](https://www.ruby-forum.com/u/xdmx)\
**Post date:** [December 29, 2008, 3:50pm UTC](https://www.ruby-forum.com/t/an-help-with-the-or-condition-is-this-a-bug/156493/2 "2008-12-29T15:50:22Z")

</div>

Solved, i was using the old way for the stop words. The new one is

:ferret =\> {:analyzer =\> Ferret::Analysis::StandardAnalyzer.new([])}
