On 03.08.2007, at 17:12, Joe Smith wrote:

> I'm trying to search a Model by the state field using Acts As Ferret.
> The query for this is '+state:NY' (substitute state abbreviation for
> NY).  This works find however '+state:OR' returns nothing, though just
> 'portland' will pull up matches within that state.

Ferret::Analysis::FULL_ENGLISH_STOP_WORDS.include?('or')
=> true

> I'm pretty sure it's reading OR as an or conditional instead of a  
> state.
> Anyway to escape it to fix this issue?

Index the state field untokenized:

field_infos.add_field(:state, :index => :untokenized, ...)

Cheers,
Andy

_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to