본문 바로가기
개발/Flutter

알고리아 Managing Results(3-34)

by dev_caleb 2022. 4. 20.
728x90

https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#handling-item-variations

 

Grouping results | Algolia

Learn about combining, consolidating, aggregating, deduplicating records using Algolia's Distinct feature.

www.algolia.com

Grouping Results

 

 

Grouping Records

 

Why?

Grouping records usually refers to the process of combining multiple records into a single result, or consolidating many similar records into two or three results. This kind of de-duplication or aggregation of results has three primary use cases:

그룹 레코드(grouping records)는 일반적으로 여러 레코드를 하나의 결과로 결합하거나 유사한 많은 레코드를 두 개 또는 세 개의 결과로 통합하는 과정을 가리킨다. 이러한 종류의 중복 제거 또는 결과 집계에는 세 가지 주요 사용 사례가 있습니다.

  • Item Variations, where any item with variations is displayed only once. A t-shirt that comes in five colors should only appear once in the results, with all five color options displayed somewhere in the description

Item Variations. 여기서 변형이 있는 항목은 한 번만 표시됩니다. 5가지 색상으로 제공되는 티셔츠는 결과에 한 번만 표시되어야 하며 설명의 어딘가에 5가지 색 옵션이 모두 표시됩니다.

  • Large Records, where you first break up large record into smaller sub-records, and then during the search, if several of these sub-records match, you display the most relevant one.

Large Records(대형 레코드) - 먼저 큰 레코드를 작은 하위 레코드로 분할한 다음 검색 중에 이러한 하위 레코드 중 여러 개가 일치하는 경우 가장 관련성이 높은 레코드를 표시합니다.

속성별 그룹화 - 속성 중 하나에 따라 레코드를 그룹화할 수 있습니다.

Introducing Algolia’s Distinct feature(알골리아의 특색 소개)

Algolia’s distinct feature solves all of these scenarios. Distinct is a term we borrowed from the SQL world. Algolia is not meant to be used as a traditional database - it’s a search engine. Still, it’s sometimes useful to borrow some concepts from the database world. Two of those concepts are distinct and group by; both can be achieved using the distinct feature.

알골리아의 뚜렷한 특징은 이 모든 시나리오를 해결한다. 'Distinct'는 SQL 월드에서 차용한 용어입니다. 알골리아는 전통적인 데이터베이스로 사용되기 위한 것이 아니다. 그것은 검색 엔진이다. 그래도 데이터베이스 세계에서 몇 가지 개념을 차용하는 것이 유용할 때가 있습니다. 이러한 개념들 중 두 가지는 구별되고 분류된다; 둘 다 구별되는 특징을 사용하여 달성될 수 있다.

Distinct is implemented by the distinct parameter.구별은 구별되는 매개 변수에 의해 구현됩니다.

 

Handling Item Variations(Item variation 다루기)

Anytime you have items that come in variations - for example, in different versions or colors - you most likely have a situation that requires grouping.

예를 들어 버전이나 색상이 다른 다양한 항목이 있을 때마다 그룹화가 필요한 상황이 발생할 수 있습니다.

This can happen with t-shirts of different colors, or with computers of different memory and power. Less obvious use cases are TV series with different seasons or episodes, or car parts that are compatible with different models and years of cars.

이 것은 다른 색깔의 티셔츠나 다른 메모리와 power를 가진 컴퓨터에서 일어날 수 있다. 덜 분명한 사용 사례는 계절이나 에피소드가 다른 TV 시리즈나 다른 모델과 몇 년 된 자동차 부품이다.

These examples all share the same problem, which is mostly a UI issue: how to display the variety of a single product without hiding other products.

이러한 예들은 모두 동일한 문제를 공유하는데, 이는 대부분 UI 문제입니다. 즉, '어떻게 다른 제품을 숨기지 않고 단일 제품의 다양성을 표시하는가 '입니다.

Consider what happens if you don’t do anything. The most relevant product shows up first in the results, and just below that, all of its variations appear, like the same t-shirt in red, blue, green, and so on. So you’ll get a flood of a single product on the first page, pushing all other products off the screen. Another unwanted effect could be that to have only two or three products scattered in seemingly random order - a few green t-shirts there, another yellow one here, etc. Neither of these results is meaningful. You need some way to avoid this flood or randomness.

Distinct helps you remove the multiplicity and show only a single hit per item.

 

아무것도 하지 않으면 어떻게 되는지 생각해 보세요. 가장 관련성이 높은 제품이 결과에서 먼저 나타나고, 그 바로 아래에는 빨간색, 파란색, 녹색 등의 동일한 티셔츠와 같은 모든 변형이 나타납니다. 첫 페이지에서 단일 제품이 넘쳐나면서 다른 모든 제품이 화면에서 사라지게 됩니다. 또 다른 원치 않는 효과는 두세 개의 제품만이 무작위로 보이는 순서대로 흩어지는 것일 수 있다. 녹색 티셔츠 몇 장, 노란색 티셔츠 한 장 등이다. 이 결과들 중 어느 것도 의미가 없다. 당신은 이 홍수나 무작위성을 피할 수 있는 어떤 방법이 필요하다.
Distinct은 다중성을 제거하고 항목당 하나의 적중률만 표시하는 데 도움이 됩니다.

 

Handling Large Records (큰 레코드 다루기)

Large records arise from having records with lots of text, or long HTML pages, or similar content that can be better managed when broken down into smaller chunks of data.

큰 레코드는 텍스트가 많은 레코드나 긴 HTML 페이지, 또는 더 작은 데이터 청크로 나눌 때 더 잘 관리할 수 있는 유사한 콘텐츠를 가지고 있기 때문에 발생합니다.

You can split large documents into smaller chunks of text, such as per paragraphs or sentences. For example, in an index of blog articles, instead of having a single record for each article with a large content attribute (the full content of the article), you’d use one record per paragraph. These paragraph records could then be sorted by an order attribute to reconstruct the original content.

큰 문서를 문단 또는 문장과 같이 더 작은 텍스트 청크로 분할할 수 있습니다. 예를 들어, 블로그 기사 색인에서 큰 내용 속성(기사의 전체 내용)을 가진 각 기사에 대해 하나의 레코드를 갖는 대신 문단당 하나의 레코드를 사용합니다. 그런 다음 이 단락의 record를 order 속성별로 정렬하여 원래 내용을 재구성할 수 있습니다.

Splitting large records into smaller ones not only improves search performance, it also improves search relevance. Imagine if you had an entire book’s content stored in a single content attribute. If the first word of a search query matched a paragraph on page 10, and the second word matched a paragraph on page 90, the whole record would be returned as a match. However, it would likely not be relevant.

큰 레코드를 작은 레코드로 분할하면 검색 성능이 향상될 뿐만 아니라 검색 관련성도 향상됩니다. 책의 전체 내용이 단일 내용 속성에 저장되어 있다고 상상해 보십시오. 검색 질의의 첫 번째 단어가 10페이지의 단락과 일치하고 두 번째 단어가 90페이지의 단락과 일치하면 전체 기록이 일치로 반환됩니다. 하지만, 그것은(당신이 검색하는 결과와) 관련이 없을 것 같다.

Grouping by Attribute(Attribute로 그룹화하기)

When you have one-to-many relationships in your records, but you want to display data selectively, you need to flatten your records and repeat data. For example, imagine you’re developing a job search with companies and job openings. Several companies may have many job openings, but you only want to show the most relevant ones per company.

레코드에 일대다 관계가 있지만 데이터를 선택적으로 표시하려면 레코드를 평평하게 만들고 데이터를 반복해야 합니다. 예를 들어, 여러분이 회사나 구인공고를 가지고 구직활동을 하고 있다고 상상해 보세요. 여러 회사에서 채용 공고가 많을 수 있지만 각 회사별로 가장 관련성이 높은 채용 공고를 표시하려고 합니다.

 

 

728x90