I can successfully perform a age search using ThinkingSphinx if I do this 
in the controller:
 
@users = User.where(age: user_age_range)

private
def user_age_range
  params[:start_age]..params[:end_age]
end
 
That requires no changes to the index. However it ignores all my previous 
rules with geo search distance, since I am overwriting my original @users = 
User.search(params[:query] by having two @users statements.
 
I'm not sure how to adjust it using `age: user_age_range` with the @users = 
User.search(params[:query] .
 
So I figured the best option would be to do a with condition, :with => { 
:age => 18..55 } and add age as a 'has' attribute so Sphinx can do that max 
computation. But setting up the 'has' attribute has been confusing for me 
lol. What should the age 'has' attribute look like if I am tying to do the 
with condition?

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