Avishai
unread,Nov 8, 2009, 1:30:39 PM11/8/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Thinking Sphinx
Hi, I have defined my index as
define_index do
...
has sex
has sex_seeking
has age
has min_age
has max_age
...
end
and I'm trying to search against it, but every way I try to do it, TS
seems to ignore the :sex => current_user.sex_seeking parameter, and
shows me only females (in the database, the data is stored as "M" and
"F".
@users = User.search(:with => {:age => min_age...max_age, :sex =>
current_user.sex_seeking}, :lat => degrees_to_radians
(current_user.lat.to_f), :lng => degrees_to_radians
(current_user.lng.to_f), :order => "@geodist ASC, created_at
DESC", :page => params[:page])
Does anyone know why this is happening?
Thanks a lot,
Avishai