#NEWLINE# @ classmethod #NEWLINE# def near_me( cls , term , latitude , longitude , distance , limit = 5 ) : #NEWLINE# #INDENT# q = Autocomplete . base_params ( ) . query ( term ) . limit ( limit ) . filter ( or_ ( ( Autocomplete . type == 'Org' ) , ( Autocomplete . type == 'Issue' ) ) ) #NEWLINE# q . params [ 'd' ] = distance #NEWLINE# q . params [ 'sfield' ] = Autocomplete . geo_location #NEWLINE# q . params [ 'pt' ] = ',' . join ( [ str ( longitude ) , str ( longitude ) ] ) #NEWLINE# q . filter ( '{!geofilt}' ) #NEWLINE# q . boost ( 'recip(geodist(),2,200,20)' ) #NEWLINE# return q . execute ( )