Hi,

 In my DB i have a table with a column named gender and has two values: 
male and female.
 In my search gender is a conditon and i also use star. 
 Is there a way to search for male and not have female in my result. 
Here is the query :

condition[:gender] =  params[:gender] if params[:gender].present?
>
> @results = ThinkingSphinx.search s, 
>                                         :star => /[\w@:]+/u, 
>                                         :with     => filters, 
>                                         :conditions =>  condition,  
>                                         :order    => 'model_order ASC ', 
> #order result by model
>                                         :page     => params[:page],
>                                         :per_page => 1000 
>

on the console:

SELECT * FROM `episode_core`, `episode_delta`, `organization_core`, 
> `organization_delta`, `person_core`, `person_delta`, `position_core`, 
> `position_delta`, `profession_core`, `profession_delta`, `segment_core`, 
> `segment_delta`, `tv_show_core`, `tv_show_delta` WHERE MATCH('@gender 
> **male*'*) AND `sphinx_deleted` = 0 ORDER BY `model_order` ASC LIMIT 0, 
> 1000 OPTION max_matches=10000
>
>
Thanks
 
 

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