Hi Ulugbek and Pat, Thanks for your suggestion. But can sphinx do filtering for date range. Since one of the filter parameter is age range which is converted to date range, can I give that to sphinx. I didn't see range filtering in documentation. Can you please point it to me
Ritesh On Jul 21, 4:56 am, Pat Allan <[email protected]> wrote: > Indeed, Sphinx will be able to do what you're requesting - and you can't > combine meta_search and Sphinx queries together (one is SQL, the other is > Sphinx, talking to completely different sources). > > -- > Pat > > On 21/07/2011, at 8:54 PM, Ulugbek Baymuradov wrote: > > > > > > > > > It's recommended that you save the .search for sphinx only. Also, you don't > > have to use meta_search, sphinx does filter by attribute, example is given > > in the documentation. > > > Bek > > > On Jul 21, 2011, at 1:40 AM, Ritesh <[email protected]> wrote: > > >> Hi, I have a very simple user table with the following fields: > > >> 1. Name > >> 2. Date of Birth > >> 3. Sex > >> 4. Location > >> 5. Latitude > >> 6. Longitude > > >> Now I want to find out all the male users whose age is in between 20 > >> to 50 and are within 50 miles of a given coordinate. To filter by sex > >> and age, I plan to use meta_search but to filter by distance I plan to > >> use Sphinx. So it is possible to chain metasearch and thinking sphinx > >> and then do offset nad limit. I am thinking of something like this: > > >> User.search({"sex_eq" => 'M', "dob_gte" => 2011-..., "dob_lte" => > >> 2011-01-01"}).sphinx_search("", :geodist => [@lat, @lng], :order => > >> "@geodist...).page(1).per(10) > > >> Ritesh > > >> -- > >> 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 > >> athttp://groups.google.com/group/thinking-sphinx?hl=en. > > > -- > > 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 > > athttp://groups.google.com/group/thinking-sphinx?hl=en. -- 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.
