Right, well it's likely this is the bigger issue. Do all addresses have a city? And do all have at least one listing? What's the output when you run the ts:index rake task?
-- Pat On 03/12/2011, at 10:43 PM, Manish M. Shah wrote: > There should be - but it's not returning all of them :( > > On Dec 3, 2011, at 10:36 AM, Pat Allan wrote: > >> Wait, there's 49 addresses, but only 11 get returned if you don't use a geo >> point? Surely there should be a full page of 20? >> >> -- >> Pat >> >> On 03/12/2011, at 10:32 PM, Manish M. Shah wrote: >> >>> >>> I have 49 total addresses and 15 don't have valid lat/lng values (they are >>> null). >>> >>> For those that are null, at least from an app perspective, this is fine - >>> but could that be causing Sphinx to get confused? >>> >>> >>> >>> On Dec 3, 2011, at 6:39 AM, Pat Allan wrote: >>> >>>> Right, well it seems Sphinx is doing something odd when you supply >>>> co-ordinates then, even through you're not filtering on geodist. Do all >>>> Addresses have valid lat/lng values? >>>> >>>> -- >>>> Pat >>>> >>>> On 02/12/2011, at 7:42 PM, Manish M. Shah wrote: >>>> >>>>> That's correct, this is the version I use if no lat/lng is set : >>>>> @addresses = Address.search :order => :listing_created_at, :sort_mode => >>>>> :desc >>>>> >>>>> It returns 11 results. >>>>> >>>>> >>>>> On Dec 2, 2011, at 4:47 AM, Pat Allan wrote: >>>>> >>>>>> Hm, and if you search with no arguments, you get a full paginated set of >>>>>> results, right? >>>>>> >>>>>> -- >>>>>> Pat >>>>>> >>>>>> On 02/12/2011, at 11:53 AM, Manish M. Shah wrote: >>>>>> >>>>>>> Ahh :) >>>>>>> >>>>>>> I got rid of has latitude, longitude and reindexed and got 2 items for >>>>>>> SF and 4 items for NY :< >>>>>>> >>>>>>> Manish >>>>>>> >>>>>>> On Dec 1, 2011, at 11:49 PM, Pat Allan wrote: >>>>>>> >>>>>>>> Sorry, just to confirm - you want to keep the radians attributes, but >>>>>>>> remove the ones that aren't in radians. So, keep these: >>>>>>>> has "RADIANS(latitude)", :as => :lat, :type => :float >>>>>>>> has "RADIANS(longitude)", :as => :lng, :type => :float >>>>>>>> >>>>>>>> But remove this: >>>>>>>> has latitude, longitude >>>>>>>> >>>>>>>> -- >>>>>>>> Pat >>>>>>>> >>>>>>>> On 02/12/2011, at 11:43 AM, Manish M. Shah wrote: >>>>>>>> >>>>>>>>> Without Radians - it returns 1 result for Chicago and 5 results for >>>>>>>>> San Francisco, much less then db has. >>>>>>>>> >>>>>>>>> >>>>>>>>> >>>>>>>>> On Dec 1, 2011, at 11:38 PM, Pat Allan wrote: >>>>>>>>> >>>>>>>>>> Is it any better if you don't have the non-radians latitude and >>>>>>>>>> longitude attributes? >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> Pat >>>>>>>>>> >>>>>>>>>> On 02/12/2011, at 11:35 AM, Manish M. Shah wrote: >>>>>>>>>> >>>>>>>>>>> Hi Path, >>>>>>>>>>> >>>>>>>>>>> Thanks for helping - >>>>>>>>>>> >>>>>>>>>>> define_index looks like this in Address model: >>>>>>>>>>> >>>>>>>>>>> define_index do >>>>>>>>>>> has latitude, longitude >>>>>>>>>>> has "RADIANS(latitude)", :as => :lat, :type => :float >>>>>>>>>>> has "RADIANS(longitude)", :as => :lng, :type => :float >>>>>>>>>>> >>>>>>>>>>> indexes city >>>>>>>>>>> indexes listings.title, :as => :listing_title >>>>>>>>>>> indexes listings.description, :as => :listing_description >>>>>>>>>>> indexes listings.categories.name, :as => :category_names >>>>>>>>>>> indexes listings.created_at, :as => :listing_created_at, :sortable >>>>>>>>>>> => true >>>>>>>>>>> set_property :delta => true >>>>>>>>>>> end >>>>>>>>>>> >>>>>>>>>>> That's the full query I'm running. >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> On Dec 1, 2011, at 11:31 PM, Pat Allan wrote: >>>>>>>>>>> >>>>>>>>>>>> Is that the entire search query you're running? There's no >>>>>>>>>>>> keywords or distance filters? >>>>>>>>>>>> >>>>>>>>>>>> Also, what does your define_index block look like for the Address >>>>>>>>>>>> model? >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> Pat >>>>>>>>>>>> >>>>>>>>>>>> On 02/12/2011, at 11:24 AM, mrmanishs wrote: >>>>>>>>>>>> >>>>>>>>>>>>> When I do a: >>>>>>>>>>>>> >>>>>>>>>>>>> @addresses = Address.search :geo => [@lat, @lng], :order => >>>>>>>>>>>>> "@geodist >>>>>>>>>>>>> ASC, @relevance DESC" >>>>>>>>>>>>> >>>>>>>>>>>>> I only get 4 results back. I know for a fact that I have a lot >>>>>>>>>>>>> more >>>>>>>>>>>>> addresses available with further geo-distances then the 4 returned >>>>>>>>>>>>> when I select the city of Chicago >>>>>>>>>>>>> >>>>>>>>>>>>> However, for the city of San Francisco, I only get 2. >>>>>>>>>>>>> >>>>>>>>>>>>> Is there a configuration that tells geo search to return only a >>>>>>>>>>>>> certain distance away, or is there a default set? >>>>>>>>>>>>> >>>>>>>>>>>>> I can't figure out what's going on... >>>>>>>>>>>>> >>>>>>>>>>>>> -- >>>>>>>>>>>>> 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. >>>>>>>>>>>>> >>>>>>>>>>>> >>>>>>>>>>>> -- >>>>>>>>>>>> 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. >>>>>>>>>>> >>>>>>>>>>> -- >>>>>>>>>>> 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. >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> -- >>>>>>>>>> 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. >>>>>>>>> >>>>>>>>> -- >>>>>>>>> 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. >>>>>>>>> >>>>>>>> >>>>>>>> -- >>>>>>>> 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. >>>>>>> >>>>>>> -- >>>>>>> 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. >>>>>>> >>>>>> >>>>>> -- >>>>>> 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. >>>>> >>>>> -- >>>>> 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. >>>>> >>>> >>>> -- >>>> 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. >>> >>> -- >>> 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. >>> >> >> -- >> 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. > > -- > 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. > -- 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.
