search for: typesquery

Displaying 1 result from an estimated 1 matches for "typesquery".

2006 Jun 27
2
Using QueryParser vs building my own query
Hello all I finally caved in and decided I should build my own query instead of relying on QueryParser to do the job for me, but I''ve hit a strange problem.. Here''s how I build my query: #Main query query = Ferret::Search::BooleanQuery.new #Build query to match types typesquery = Ferret::Search::BooleanQuery.new @selected_types.each{|type| typesquery.add_query( Ferret::Search::TermQuery.new(Ferret::Index::Term.new(''type'', type)), Ferret::Search::BooleanClause::Occur::SHOULD ) } #Add types query to main query query.add_query(typesquery, Ferr...