search for: sale_category

Displaying 2 results from an estimated 2 matches for "sale_category".

2006 Jul 09
3
acts_as_ferret.. what does it actually do?
...e than just using find_by_contents? Thnaks in advance for any replies/help cheers caspar #####extract from model require ''ferret'' class VoObject < ActiveRecord::Base acts_as_ferret :fields=> [''short_description'',''section'',''sale_category'',''sale_type'',''outcode''] def VoObject.refine_search(search_input) bq = BooleanQuery.new bq.add_query(TermQuery.new(Term.new("section", search_input), BooleanClause::Occur::Should)) filter = QueryFilter.new(bq) @vobjects = Item....
2006 Jul 14
3
Whitespace Issues
...rch::TermQuery.new(Ferret::Index::Term.new("section",section.downcase!)), Ferret::Search::BooleanClause::Occur::MUST) filter = Ferret::Search::QueryFilter.new(bq) @vobjects = VoObject.find_by_contents(search_input,:filter => filter, :sort => ["section", "sale_category"]) This works fine when the "section" is a single word like "book" but when there is white spaces in the query like "paperback book" it does not find the appropriate result and comes back with zero hits. I changed this to use FuzzyQuery and it works but I som...