search for: search_input

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

Did you mean: search_init
2006 Jul 09
3
acts_as_ferret.. what does it actually do?
...el 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.find_by_contents(search_text,:filter => filter, :sort => ["section", "sale_category"])...
2006 Jul 14
3
Whitespace Issues
...c below. bq = Ferret::Search::BooleanQuery.new bq.add_query(Ferret::Search::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...