This should work:

  Article.search :conditions => {:title => ‘linux’}

On 20 Mar 2014, at 11:17 pm, Jeremy Li <[email protected]> wrote:

> i want to get all of data contains "linux" in the field :title, i am not sure 
> is below works?
>>  Article.search "linux", :conditions => {:title => ‘*’}
> 
> 在 2014年3月20日星期四UTC+8下午8时04分36秒,Pat Allan写道:
> I’m sorry, I don’t understand your question. Can you please elaborate on what 
> you mean by “I just want to search data from a specific field”?
> 
> On 20 Mar 2014, at 11:02 pm, Jeremy Li <[email protected]> wrote:
> 
>> but i want to search a specific field without value('something'), i just 
>> want to search data from a specific field.
>> 
>> 在 2014年3月20日星期四UTC+8下午7时21分44秒,Pat Allan写道:
>> Hi Jeremy
>> 
>> To search on a specific field, you can use the :conditions option:
>> 
>>   Article.search :conditions => {:title => ‘something’}
>> 
>> http://pat.github.io/thinking-sphinx/searching.html#conditions
>> 
>> Cheers
>> 
>> — 
>> Pat
>> 
>> On 20 Mar 2014, at 10:14 pm, Jeremy Li <[email protected]> wrote:
>> 
>>> I create two index(:title, :content) in a model Article, and if i want to 
>>> search data only in the :title index, how to do that?
>>> 
>>> -- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "Thinking Sphinx" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to [email protected].
>>> To post to this group, send email to [email protected].
>>> Visit this group at http://groups.google.com/group/thinking-sphinx.
>>> For more options, visit https://groups.google.com/d/optout.
>> 
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Thinking Sphinx" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected].
>> To post to this group, send email to [email protected].
>> Visit this group at http://groups.google.com/group/thinking-sphinx.
>> For more options, visit https://groups.google.com/d/optout.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Thinking Sphinx" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/thinking-sphinx.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Thinking Sphinx" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/thinking-sphinx.
For more options, visit https://groups.google.com/d/optout.

Reply via email to