Hi Avishai
Unfortunately, you can't filter on string attributes, you can only
sort by them. Sphinx doesn't store them as strings, and so it can't
compare the values. I've just added a section to the documentation
site about this, and possible changes that may get you the solution
you'd like:
http://freelancing-god.github.com/ts/en/common_issues.html#string_filters
--
Pat
On 09/11/2009, at 5:30 AM, Avishai wrote:
>
> 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
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Thinking Sphinx" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/thinking-sphinx?hl=en
-~----------~----~----~----~------~----~------~--~---