ExAliyunOts.Search.geo_distance_query
You're seeing just the function
geo_distance_query
, go back to ExAliyunOts.Search module for more information.
Specs
geo_distance_query( field_name(), distance :: float() | integer(), center_point :: String.t() ) :: map()
Use GeoDistanceQuery as the nested :query
option of :search_query
option in ExAliyunOts.search/4
.
Official document in Chinese | English
Example
import MyApp.TableStore
search "table", "index_name",
search_query: [
query: geo_distance_query("location", 500_000, "5,5")
]
Please notice that all geographic coordinates are in "$latitude,$longitude" format.