thanx..i actually did it using the :conditions with find_by_contents.
But when i do find_id_by_contents,which searches from the filesystem,can i
search within data based on this index value?and not just the full data
field?

On 7/24/07, Jens Kraemer <[EMAIL PROTECTED]> wrote:

On Tue, Jul 24, 2007 at 12:33:47AM -0700, isha kakodkar wrote:
> Hi all,
>   Im a newbie to ferret.I have installed the act_as_ferret gem and i
> actually want to search for some content in the model,but per user.
> My model has data,user_id.So within the data column i have to serach for
a
> word if it exists for a given user.
> So can i achieve that ? presently i know that it just searches the
"data"
> column irrespective of the user given.
> Can someone help me with this?

Index the user_id field (as untokenized) and append " user_id:#{user.id}"
to the query.

cheers,
Jens


--
Jens Krämer
http://www.jkraemer.net/ - Blog
http://www.omdb.org/     - The new free film database
_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

_______________________________________________
Ferret-talk mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/ferret-talk

Reply via email to