On Wed, May 02, 2007 at 02:17:19PM +0200, Steven Garcia wrote:
> Setting the boost as you specified didn't work.
>
> How would I set up two queries?
>
> My code: http://pastie.caboo.se/58230
that should do the trick:
class Search
attr_accessor :query
def initialize(query)
@query = query
end
def do_search
returning [] do |results|
results << Term.multi_search("title:(#{query})", [Article, Term])
results << Term.multi_search("#{query} -title:(#{query})", [Article,
Term])
end
end
end
Jens
--
Jens Krämer
webit! Gesellschaft für neue Medien mbH
Schnorrstraße 76 | 01069 Dresden
Telefon +49 351 46766-0 | Telefax +49 351 46766-66
[EMAIL PROTECTED] | www.webit.de
Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk