I think it's more a query setup problem - as you're using the extended match 
mode in all examples. However, you want to quote each data type inside of the 
parentheses, instead of the other way around:

  Project.search("@title \"some name\", @data_type (\"Book\" | \"Audio\")",
    :match_mode => :extended, :per_page => 20)

Cheers

-- 
Pat

On 07/07/2011, at 11:11 AM, Jeremy Peterson wrote:

> Derek,
> 
> You need to change your match mode.  Doing this will work in your project... 
> 
> YourModel.search "@data_type book @title think", :match_mode => :extended
> 
> Sincerely,
> 
> Jeremy
> 
> On Wed, Jul 6, 2011 at 2:45 PM, dwickwire <[email protected]> wrote:
> Hello,
> 
> So sometimes I find myself searching with something like this
> 
> Project.search("@title \"some name\", @data_type \"Book
> \"", :match_mode => :extended, :per_page => 20)
> 
> 
> This method works great but when I add more than one data_type it
> doesn't seem to work unless its using the conditions hash.
> 
>  -- Doesn't work
> Project.search("@title \"some name\", @data_type \"(Book | Audio)
> \"", :match_mode => :extended, :per_page => 20)
> 
>  -- Works
> Project.search("@title \"some name\"", :conditions => {:data_type =>
> "(Book | Audio)}, :match_mode => :extended, :per_page => 20)
> 
> Is the @field version limited somehow?
> 
> *I'm on TS 1.4.3
> 
> --
> 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.

-- 
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