알고리아 Managing Results(3-2)
The 8 Ranking Criteria
https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/
The 8 ranking criteria | Algolia
Discover the 8 tie-breaking criteria that Algolia uses to rank your results.
www.algolia.com
Ranking criteria(순위 기준)
These eight ranking criteria of Algolia’s tie-breaking algorithm help define what’s both textually and business relevant.
알골리아의 묶음 알고리즘의 이 8가지 순위 기준은 텍스트와 비즈니스 모두에 적합한 것을 정의하는 데 도움이 됩니다.
Typo(오타)
Algolia can retrieve the records searched by the user even if a typing mistake was made. By default, words with 0, 1, or 2 typos per word will match. This is called typo-tolerance.
The Typo criterion in the ranking formula makes sure that records that match a query without typos (in other words, an exact match) ranks higher than ones that match with one typo, themselves ranking higher than ones that match with two typos.
알골리아는 오타가 발생해도 사용자가 검색한 기록을 검색할 수 있다. 기본적으로 단어당 오타가 0, 1, 2개인 단어가 일치합니다. 이를 오타 허용이라고 합니다.
순위 계산식의 오타 기준은 오타가 없는 쿼리와 일치하는 레코드(즉, 정확한 일치)가 하나의 오타와 일치하는 레코드보다 높은 순위를 차지하도록 한다.
Geo (if applicable)지역(해당되는 경우)
If you’re using the geo-search feature, results will be ranked by distance, from the closest to the farthest.
The precision of this ranking is set by the parameter aroundPrecision. For example, with aroundPrecision=100, two results up to 100 meters apart will be considered equal.
지리 검색 기능을 사용하는 경우 가장 가까운 거리부터 가장 먼 거리까지 결과의 순위가 매겨집니다.
이 순위의 정밀도는 Precision 주변의 파라미터에 의해 설정됩니다. 예를 들어, aroundPrecision=100인 경우 최대 100m 간격의 두 결과가 동일한 것으로 간주됩니다.
Words (if applicable)단어(해당되는 경우)
This criterion is only applicable if you are using the optionalWords setting.
By default, Algolia discards all results that don’t contain all the words of the query. But with optionalWords, where you declare some words as optional, the Words criterion will rank them by the number of words typed by the user that matched. Keep in mind that this isn’t a count of the number of times the word appears in the record, but rather a count of the number of words typed by the user that matched.
For example, if the user typed two words, the maximum score for this criterion is 2 - even if a record contains this word 10 times.
이 기준은 선택적 Words 설정을 사용하는 경우에만 적용됩니다.
기본적으로 Algolia는 쿼리의 모든 단어를 포함하지 않는 모든 결과를 무시합니다. 그러나 일부 단어를 선택사항으로 선언하는 선택적 Words의 경우 Words 기준은 일치하는 사용자가 입력한 단어 수에 따라 순위를 지정합니다. 이 값은 단어가 레코드에 나타나는 횟수보다 사용자가 입력한 단어 수와 일치합니다.
예를 들어, 사용자가 두 단어를 입력한 경우 레코드에 이 단어가 10번 포함된 경우에도 이 기준의 최대 점수는 2입니다.
Filters
If a query has used filters or optional filters, the filters criterion will rank records according to a filtering score. All filters default to a score of 1. Records that match a single filter will have a score of 1 and will therefore score higher than records that don’t match any filter (1 > 0). Equally, records that match more than one filter will score higher than records with less matches - because Algolia counts each match.
For purposes of tie-breaking, all records with the same score are ranked the same, and so the ranking formula will drop to the next criterion to break the tie. You can adjust the scoring in 2 significant ways:
- With filter scoring, you can use variable scores, scoring some filters higher than 1. By setting a filter with a score = 2, or score=3, you can favor that filter over others.
- With sumOrFiltersScores, you can accumulate the scores of disjunctive (OR) matches to come up with a total score, ranking records higher than records with a lesser total score.
The Filters criterion can be quite powerful in defining relevance, as seen in the promoting resultsexample.
쿼리에 필터 또는 선택적 필터가 사용된 경우 필터 기준은 필터링 점수에 따라 레코드의 순위를 지정합니다. 모든 필터는 기본적으로 1점으로 설정됩니다. 단일 필터와 일치하는 레코드는 점수가 1이므로 필터와 일치하지 않는 레코드(1 > 0)보다 점수가 높습니다. 마찬가지로, 두 개 이상의 필터와 일치하는 레코드는 더 적은 일치 수를 가진 레코드보다 더 높은 점수를 받습니다.
동점 처리의 경우 점수가 같은 기록은 모두 순위가 같기 때문에 순위 공식이 다음 기준으로 떨어져 동률을 깨게 된다. 두 가지 중요한 방법으로 점수를 조정할 수 있습니다.
필터 스코어링에서는 변수 점수를 사용하여 일부 필터를 1보다 높은 점수를 매길 수 있습니다. 점수 = 2 또는 점수 = 3으로 필터를 설정하면 해당 필터를 다른 필터보다 선호할 수 있습니다.
sumOrFiltersScores를 사용하면 개별(OR) 일치의 점수를 누적하여 총점을 산출할 수 있으며, 총점이 낮은 레코드보다 높은 순위를 매길 수 있습니다.
필터 기준은 promoting 결과 예제에서 볼 수 있듯이 관련성을 정의하는 데 매우 강력할 수 있습니다.
Proximity(근접성)
For a query that contains two or more words, Proximity calculates how physically near those words are to each other in the matching record. This criterion will rank higher the objects that have the words closer to each other.
For example, George Clooney is a better proximity match than George Timothy Clooney.
두 개 이상의 단어가 포함된 쿼리의 경우 근접성은 일치 레코드에서 해당 단어가 실제로 서로 얼마나 가까운지 계산합니다. 이 기준은 단어들이 서로 가까이 있는 객체들의 순위를 더 높게 매깁니다.
예를 들어, 조지 클루니는 조지 티모시 클루니보다 더 근접한 매치이다.
Attribute(속성)
The Attribute criterion only considers attributes you have placed in the searchableAttributes(also referred to as AttributesToIndex). Additionally, attributes at the top of the searchableAttributes list rank higher than lower ones.
There is also an importance to the order of the matches within the attribute itself. By default, records whose matched words are closer to the beginning of a given attribute will be ranked higher. For example, words in position 2 of an attribute are ranked higher than words in position 5. Otherwise, the position of the word isn’t taken into account.
속성 기준은 searchableAttributes(특성이라고도 함)에 입력한 속성만 고려합니다.ToIndex). 또한 searchableAttributes 목록의 맨 위에 있는 특성이 더 낮은 특성보다 순위가 높습니다.
속성 자체 내에서 일치 항목의 순서도 중요합니다. 기본적으로 일치하는 단어가 주어진 특성의 시작에 더 가까운 레코드가 더 높은 순위를 매깁니다. 예를 들어, 속성의 위치 2에 있는 단어는 위치 5에 있는 단어보다 순위가 높습니다. 그렇지 않으면 단어의 위치가 고려되지 않습니다.
Exact(정확도)
Records with words that match query terms exactly are ranked higher. The more matching words in a record’s attribute, the higher a record is ranked. By default, an exact match occurs when a full word in a query is matched without typos to a word in an attribute. An inexact match is one that has typos or only matches on a prefix.
Additionally, synonym matching and plural/singular matching are considered exact. Thus, a word is considered an exact match if its synonym matches a query exactly.
쿼리 용어와 정확히 일치하는 단어가 있는 레코드는 순위가 높습니다. 레코드의 속성에서 일치하는 단어가 많을수록 레코드의 순위가 높아집니다. 기본적으로 쿼리의 전체 단어가 오타 없이 속성의 단어와 일치할 때 정확한 일치가 발생합니다. 정확하지 않은 일치는 오타가 있거나 접두사에만 일치합니다.
또한 동의어 일치와 복수/단수 일치가 정확한 것으로 간주된다. 따라서 단어의 동의어가 쿼리와 정확히 일치하면 단어가 정확히 일치하는 것으로 간주됩니다.
You can configure the settings for the exact criterion to change the default behavior.정확한 기준에 대한 설정을 구성하여 기본 동작을 변경할 수 있습니다.
Custom(사용자)
This criterion takes into account the settings that you have selected using Custom Ranking.
If you have multiple attributes in your Custom Ranking, the behavior will be the same as for the rest of the Ranking Formula: a criterion is only looked to refine the ranking when there is a tie on all the previous criteria.
For example, if you have the following Custom Ranking:
이 기준은 사용자 지정 순위를 사용하여 선택한 설정을 고려합니다.
사용자 정의 랭킹에 여러 속성이 있는 경우, 동작은 나머지 랭킹 공식과 동일합니다. 모든 이전 기준에 동점이 있는 경우에만 순위를 세분화합니다.
예를 들어 다음과 같은 사용자 지정 순위가 있는 경우:
with featured being either true or false, and number_of_likes being a numerical value, then the tie-breaker for objects with the same ranking after the 6 first criteria will be as follows:
- Featured objects, ranked from the most to the least liked
- Not featured objects, ranked from the most to the least liked
특색이 참 또는 거짓이고 number_of_likes가 숫자 값인 경우, 6번째 기준 다음에 동일한 순위를 가진 객체에 대한 타이브레이커는 다음과 같습니다.
가장 좋아하는 것부터 가장 싫어하는 것까지 순위를 매긴 특징적인 객체
가장 좋아하는 것부터 가장 싫어하는 것까지 순위를 매긴 특색 없는 객체
Criteria combinations(조합 기준)
For the most part, the ranking formula follows the preceding record scoring process. However, some combinations of criteria can score differently depending on their relative position to each other. One such combination is attribute and proximity.
대부분의 경우, 랭킹 공식은 앞선 기록 점수 매기기 과정을 따른다. 그러나 일부 조합의 기준은 상대적인 위치에 따라 점수가 달라질 수 있습니다. 그러한 조합 중 하나는 속성과 근접성이다.
Attribute and proximity(속성 및 근접성)
When proximity appears before attribute in the ranking, the calculation of the attribute ranking will be different than if proximity had appeared after attribute. This is called best-matched attribute. For tie-breaking purposes, the ranking formula looks to the best-matched attribute.
순위에서 속성 앞에 근접이 나타나면 속성 순위의 계산은 속성 뒤에 근접이 나타났던 경우와 다릅니다. 이를 최상의 일치 특성이라고 합니다. 동점 처리의 경우 순위 수식은 가장 일치하는 속성을 찾습니다.
Computing the “best-matched attribute”
As you will see below, Algolia uses two computation methods: closest in proximity and best position. The closest in proximity method refers to scoring based on how close two or more query terms are to each other. Best position considers words near the beginning of an attribute betterthan those towards the end.
As seen in the ordering of the eight criteria, the default ranking formula puts proximity before attribute, which has a subtle but important effect on computing the best-matched attribute: attributes whose matched terms are closest in proximity to each other will be ranked highest.
"최적 일치 속성" 계산
아래에서 볼 수 있듯이, 알골리아는 두 가지 계산 방법을 사용합니다: 근접에서 가장 가까운 것과 가장 좋은 위치. 가장 근접한 방법은 둘 이상의 쿼리 용어가 서로 얼마나 가까운지에 따라 점수를 매기는 것입니다. 가장 좋은 위치는 속성의 시작 부근에 있는 단어들이 끝에 있는 단어들보다 더 낫다고 생각합니다.
8가지 기준의 순서에서 볼 수 있듯이, 기본 순위 공식은 속성보다 근접성을 우선시하는데, 이는 가장 잘 일치하는 속성을 계산하는 데 미묘하지만 중요한 영향을 미친다.
On the other hand, if you change the default by putting proximity after attribute, or removing proximity altogether, the best-matched attributes will be those whose matched terms are in the best position.
Foe example, imagine an index with two searchable attributes - profession, full-name - and the following two records:
반면에 속성 뒤에 근접성을 넣거나 근접성을 모두 제거하여 기본값을 변경할 경우 일치하는 최적의 위치에서 용어들이 매치되는 것이 가장 적합한 속성이 됩니다.
예를 들어, 두 가지 검색 가능한 속성(직업, 전체 이름)과 다음과 같은 두 개의 레코드를 가진 인덱스를 생각해 보십시오.
[
{
"profession": "Singer and comedian",
"full-name": "Jerry Lewis",
"objectID": "3"
},
{
"profession": "Born a singer",
"full-name": "Jerry Singer",
"objectID": "1"
}
]
Specifically, consider the search query “Jerry Singer”. The default ranking formula order is proximity before attribute. In this case, the object that contains the two words “jerry” and “singer” in closest proximity is ranked higher (regardless of attribute order). For the two example objects:
특히 검색 질의 "Jerry Singer"를 고려하십시오. 기본 순위 공식 순서는 속성 앞의 근접입니다. 이 경우, "제리"와 "싱어" 두 단어를 가장 근접하게 포함하는 객체는 속성 순서와 관계없이 순위가 더 높습니다. 두 예제 개체의 경우:
- the record with an objectID of 1 has the query words side by side in the full-name attribute,
- while the record with an objectID of 3 has the query words in different attributes. Because the former has a better proximity, it’s ranked first.
-1이라는 objectId를 가진 record는 전체 이름 특성에 쿼리 단어가 나란히 있습니다.
-반면 3이라는 objectId를 가진 record은 다른 속성의 쿼리 단어를 가지고 있습니다. 전자의 근접성이 더 좋기 때문에 전자가 1위를 차지합니다.
On the other hand, if you put proximity after attribute, the ranking will now be based on the “best position” of the matched terms within the searchable attributes (profession, full-name). Consequently, with the query “jerry singer”, the term “singer” shows up in profession before full-name:
Subtle. It’s recommended that you keep the proximity criterion before the attribute criterion. Proximity usually leads to a better identification of the best-matched attribute.
반면에 속성 뒤에 근접성을 두면 검색 가능한 속성(직업, 전체 이름) 내에서 일치하는 용어의 "최고의 위치"를 기준으로 순위가 결정됩니다. 따라서 "제리 싱어"라는 쿼리와 함께 "싱어"라는 용어는 풀네임 앞에 직업적으로 나타난다.
미묘하게 속성 기준보다 근접 기준을 먼저 지키는 것을 추천합니다. 근접성은 일반적으로 가장 잘 일치하는 속성을 더 잘 식별하게 합니다.