On 10/17/06, poipu <[EMAIL PROTECTED]> wrote:
> hi dave, thanks for the reply.
>
> so just to clarify for myself....if in my view i have a category textbox
> and a query text box,,,all i need to do is
>
> model.find_by_contents(params[:category]+":"+params[:query])
>
If params[:category] is the name of the field you want to search then
yes, almost. You should also put brackets around params[:query] so the
whole query is restricted to the field.

   model.find_by_contents(params[:category]+":("+params[:query] + ")")

Other wise the query ruby AND rails on the :title field would look like this

    title:ruby AND rails

instead of:

    title:(ruby AND rails)

Hope that makes sense.
Dave
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to