본문 바로가기
개발/ALGOLIA

알고리아 Managing Results(3-39)

by dev_caleb 2022. 4. 28.
728x90

 

https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/how-to/geo-ranking-info/

 

Geo ranking info | Algolia

The data Algolia uses for geo ranking.

www.algolia.com

 

Geo Ranking Info(지역 순위 정보)

When you use Algolia’s Geo feature, you can get information about each record’s geo ranking. This information can be useful to detect bad or missing geo data, and can indicate whether you need to adjust precision or tweak your geo settings.

Algolia의 Geo 기능을 사용하면 각 레코드의 Geo 순위에 대한 정보를 얻을 수 있습니다. 이 정보는 잘못된 또는 누락된 지오 데이터를 탐지하는 데 유용하며, 정밀도를 조정하거나 지오 설정을 조정해야 하는지 여부를 나타낼 수 있습니다.

 

To get geo-ranking data, you need to set getRankingInfo=true on your query parameter. Doing this adds two new attributes to _rankingInfo: matchedGeoLocation and aroundLatLng.

지역 순위 데이터를 가져오려면 쿼리 매개 변수에 getRankingInfo=true를 설정해야 합니다. 이렇게 하면 _rankingInfo에 일치하는 GeoLocation과 LatLng 주변의 두 가지 새로운 속성이 추가됩니다.

matchedGeoLocation(일치하는 지리적 위치)

The matchedGeoLocation attribute will contain geo-related information, including the geo-location that matched when you were performing a geo-query. By using this information, you’ll be able to identify the geo-location that was used and to retrieve some associated information like the name.

matchedGeoLocation 속성은 지오 쿼리를 수행할 때 일치하는 위치 정보를 포함하여 지리 관련 정보를 포함합니다. 이 정보를 사용하여, 사용된 지리적 위치를 식별하고 이름과 같은 일부 관련 정보를 검색할 수 있습니다.

 

matchedGeoLocation:

  • geo location that matched the query
  • lat (float): latitude of matched location
  • lng (float): longitude of matched location
  • distance (integer): distance between the matched location and the search location (in meters). Caution: contrary to geoDistance, this value is not divided by the geo precision. 일치하는 위치와 검색 위치 사이의 거리(미터)입니다. 주의: GeoDistance와 달리 이 값은 GeoPrecision으로 나누지 않습니다.

Here is an example of _rankingInfo attribute returned on a record with several geo-location (the matchedGeoLocation attribute will be in _rankingInfo only if a geo-query is performed):

다음은 여러 지리적 위치가 있는 레코드에서 반환되는 _rankingInfo 속성의 예입니다(일치된 GeoLocation 속성은 지리 쿼리를 수행하는 경우에만 _rankingInfo에 포함됩니다).

 

"_rankingInfo": {
    "nbTypos": 0,
    "firstMatchedWord": 0,
    "proximityDistance": 0,
    "userScore": 7,
    "geoDistance": 1600,
    "geoPrecision": 1,
    "nbExactWords": 0,
    "words": 0,
    "filters": 0,
    "matchedGeoLocation": {
        "lat": 37.3688,
        "lng": -122.036,
        "distance": 1600
    }
}

aroundLatLng#

aroundLatLng (string, optional):

  • only returned when aroundLatLngViaIP is set
  • computed geo location
  • legacy reason (param is a string not an object) –> “${lat}, ${lng}”

 

 

 

 

 

728x90

'개발 > ALGOLIA' 카테고리의 다른 글

algolia 써보고 느낀점  (0) 2022.08.07
알고리아 Managing Results(3-40)  (0) 2022.04.28
알고리아 Managing Results(3-38)  (0) 2022.04.28
알고리아 Managing Results(3-37)  (0) 2022.04.27
알고리아 Managing Results(3-36)  (0) 2022.04.27