如何使用SDE4.0 @Query和SearchHit将距离值存储到SortValues或实体中>
"sort": [
{
"_geo_distance" : {
"codenames.geoLocation" : [
{
"lat" : 32.846027,
"lon" : -96.84987
}
],
"unit" : "mi",
"order" : "asc",
}
}
]
如何使用SDE4.0 @Query和SearchHit“ sort”将距离值存储到SortValues或实体:[{“ _geo_distance”:{“ codenames.geoLocation”:[{“ lat”:32.846027,...
您必须在存储库查询中添加Sort
参数,请参阅the documentation for Spring Data Elasticsearch 4在此进行描述。