Hi ..

I tried to exclude certain objects from my search, by adding appropriate
term queries ..

i = Ferret::Index::Index.new
i.field_infos.add_field(:type, :index => :untokenized, :term_vector => :no)
i << {:type => "Movie", :name => "Indiana" }
i << {:type => "Movie", :name => "Forrest" }
i << {:type => "People", :name => "Forrest" }

now searching for forrest should give 2 results..

>> i.search_each("forrest") do end
=> 2

now i would like to exclude the movie, so i tried to do this:

>> i.search_each("forrest AND NOT type:movie") do end
=> 2
>> i.search_each("forrest AND NOT type:Movie") do end
=> 2

So how to exclude objects with a certain untokenized value in it? having
the field tokenized works great ..

Ben

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

Reply via email to