You’ll want to use your user_age_range method instead of the hard-coded range.
> On 30 Nov 2014, at 3:37 pm, alexa <[email protected]> wrote: > > Oh no it's not working. But I see the issue. > > Sphinx Query (21.1ms) SELECT GEODIST(0.5904448859496816, -1.464156709498043, > latitude, longitude) AS geodist, * FROM `user_core` WHERE MATCH('@gender > Male') AND `age` BETWEEN 18 AND 55 AND `geodist` BETWEEN 0.0 AND 100000.0 AND > `sphinx_deleted` = 0 AND `user_id` <> 1 ORDER BY `geodist` ASC LIMIT 0, 20 > > > As you see it is ignoring my search params: > > Parameters: {"utf8"=>"✓", "gender"=>"Male", "start_age"=>"18", > "end_age"=>"22" > > And it's going by the :with condition instead, > > :with => {:age => 18..55, :geodist => 0.0..100_000.0}, > > > So it's pulling users from age range 18-55, even though in params I wanted to > do 18-22 for that specific search. > > Any ideas at how to adjust the with condition for age so that it is using > each specific search param instead? > > -- > 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] > <mailto:[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > Visit this group at http://groups.google.com/group/thinking-sphinx > <http://groups.google.com/group/thinking-sphinx>. > For more options, visit https://groups.google.com/d/optout > <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.
