On Fri, Aug 03, 2007 at 06:48:46AM -0700, isha kakodkar wrote:
> ok...and how do i achieve find_id_by_contents search with where condition
> but support of "or" and "and"?
>
> when i search a query string and provide
> Messages.full_text_search("searching, user_id:#{user_id} name:#{name}",
> {:page =>(params[:page]||1), :sort => s})
> It searches for all ids where user_id is the given value and name is the
> given value.
> But if i want to achieve a "or" between the 2 conditions how do i do it?
By specifying 'OR' between them in your query :-)
You can also change the default behaviour to OR queries with the
:or_default Ferret configuration variable.
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