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

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? :frowning:

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

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

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

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