Hi together, I'm new to Solr and want to port a geographical range search from MySQL to Solr.
Currently I'm using some mathematical functions (based on GRS80 modell) directly within MySQL to calculate the actual distance from the locations within the database to a current location (lat and long are known): $query=SELECT street, zip, city, state, country, ".$radius."*ACOS(cos(RADIANS(latitude))*cos(".$theta.")*(sin(RADIANS(longitude))*sin(".$phi.")+cos(RADIANS(longitude))*cos(".$phi."))+sin(RADIANS(latitude))*sin(".$theta.")) AS Distance FROM ezgis_position WHERE ".$radius."*ACOS(cos(RADIANS(latitude))*cos(".$theta.")*(sin(RADIANS(longitude))*sin(".$phi.")+cos(RADIANS(longitude))*cos(".$phi."))+sin(RADIANS(latitude))*sin(".$theta.")) <= ".$range." ORDER BY Distance"; This works pretty fine and fast. Due to we want to include this within our Solr search result I would like to have a attribute like "actual_distance" within the result. Is there a way to use those functions like (radians, sin, acos,...) directly within Solr? Thanks in advance for any feedback Norman Leutner