Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion @field won't accept multiple arguments
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Pat Allan  
View profile  
 More options Jul 6 2011, 9:19 pm
From: Pat Allan <p...@freelancing-gods.com>
Date: Thu, 7 Jul 2011 11:19:43 +1000
Local: Wed, Jul 6 2011 9:19 pm
Subject: Re: [ts] @field won't accept multiple arguments
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 <wickw...@gmail.com> 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 thinking-sphinx@googlegroups.com.
> To unsubscribe from this group, send email to thinking-sphinx+unsubscribe@googlegroups.com.
> 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 thinking-sphinx@googlegroups.com.
> To unsubscribe from this group, send email to thinking-sphinx+unsubscribe@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/thinking-sphinx?hl=en.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.