Hi Dan

What you'll need to do is build the query string yourself (instead of using 
:conditions), and set the match mode to :extended, along the lines of:

  Model.search("@(name,description) John", :match_mode => :extended)

This will limit the search to just the name and description fields.

Hope this helps.

Cheers

-- 
Pat

On 14/05/2010, at 1:31 AM, dbee wrote:

> So I have a model with several fields indexed, such as name,
> description, sometext1, etc.
> 
> In the search form, I give the user the option to check which fields
> they want their term to be searched across...if they want to just
> search across the name or description fields, for instance. Is there a
> way in the controller to limit the fields used? The conditions
> attribute, as I've read described in the primers, seems to be used to
> make sure a certain field contains a specific term (such
> as :name=>"John")
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Thinking Sphinx" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/thinking-sphinx?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/thinking-sphinx?hl=en.

Reply via email to