본문 바로가기
카테고리 없음

알고리아 Sending And Managing Data(2-1)

by dev_caleb 2022. 2. 28.
728x90

Format and Structure Your Data(데이터 형식 지정 및 구조화)

Sending data to Algolia(알고리아로 데이터 보내기)

Before you can search your content with Algolia, you need to send your data to Algolia. Algolia doesn’t search in your original data source, but in the data you submit, which Algolia hosts on its servers.

Here’s what the data workflow looks like:

알고리아로 당신의 컨텐츠를 검색하기 전에, 당신의 데이터를 알고리아로 보내야합니다. 알고리아는 당신의 original 데이터 소스에서 검색하지 않고 당신이 제출한 데이터를 알고리아 서버에 저장해놓고 찾습니다.

작동방식은 다음과 같습니다.

  1. You fetch data from your data source, such as a database or static files.
  2. You transform that data into JSON records.
  3. You send the records to Algolia, using one of the official API clients or the Algolia dashboard. This is the indexing step.

-데이터베이스 또는 정적 파일과 같은 데이터 원본에서 데이터를 가져옵니다.
-이 데이터를 JSON 레코드로 변환합니다.
-당신은 공식 API 클라이언트나 Algolia 대시보드를 사용하여 기록을 Algolia로 보냅니다. 이것은 인덱싱 단계입니다.

Fetching data from your data source(데이터 원본에서 데이터 가져오기)

Algolia doesn’t search directly into your data source. You need to send the data to the Algolia servers so that the engine can search into it. Whether your data is in a database, a collection of XML files, spreadsheets, or any other format, it doesn’t matter. What you need to do first is extract data from one or several sources and format it in a way that Algolia recognizes.

알고리아는 당신의 데이터 소스를 직접 검색하지 않습니다. 데이터를 알골리아 서버로 보내야 엔진이 검색할 수 있습니다. 데이터가 데이터베이스, XML 파일 모음, 스프레드시트 또는 기타 형식이든 상관 없습니다. 먼저 하나 또는 여러 소스에서 데이터를 추출해 알고리아가 인식하는 방식으로 포맷해야 한다.

You don’t need to extract everything. You should be selective about what goes in the record, gathering solely information that’s useful for building a search experience.

모든 것을 추출할 필요는 없습니다. 검색 환경을 구축하는 데 유용한 정보만을 수집하여 레코드의 내용을 선택해야 합니다.

Transforming the extracted data(추출한 데이터 변환하기)

You need to transform the extracted data into a format that Algolia recognizes—JSON records.

Formatting and structuring your data is one of the most critical aspects in creating excellent search and relevance. Along with turning your data into JSON records, you also need to refine them. This includes reworking their content, adding new or computed attributes, creating filters, restructuring record relationships, and more.

추출된 데이터를 Algolia가 인식할 수 있는 Json 형식으로 변환해야 합니다. 
데이터 형식 지정과 구조화는 우수한 검색 및 관련성을 만드는 데 있어 가장 중요한 요소 중 하나입니다. 데이터를 JSON 레코드로 변환하는 것 외에도 데이터를 세분화해야 합니다. 여기에는 컨텐츠 재작업, 새 특성 또는 계산된 특성 추가, 필터 생성, 레코드 관계 재구성 등이 포함됩니다.

Sending your records to Algolia(알고리아로 당신의 레코드 보내기)

Once your records are ready, you need to send them to Algolia, using one of the Algolia API clients. Records are then stored into an Algolia index. This is all you need to do to start searching into your data.

To get started, you can use the Algolia dashboard, which allows you to paste in JSON records directly. You can also write a script to send your data using the Algolia API. This script runs on your computer or server, not on Algolia’s. You can write the script in any of the 11 languages that Algolia covers with the official API clients. Check out the quick start guide to learn more.

당신의 레코드가 준비되면, 당신은 알골리아 API 클라이언트 중 하나를 사용하여 알골리아로 그것들을 보내야 합니다. 그런 다음 기록은 알골리아 인덱스에 저장됩니다. 데이터 검색을 시작하려면 이렇게 하면 됩니다.
시작하려면 JSON 레코드에 직접 붙여넣을 수 있는 Algolia 대시보드를 사용할 수 있습니다. Algolia API를 사용하여 데이터를 전송하는 스크립트를 작성할 수도 있습니다. 이 스크립트는 Algolia가 아닌 사용자의 컴퓨터 또는 서버에서 실행됩니다. 당신은 알골리아가 공식 API 클라이언트로 다루는 11개 언어로 스크립트를 작성할 수 있습니다. 자세한 내용은 quick start guide를 참조하십시오.

 

 

If the data you plan to send to Algolia lives on various websites, consider using the Algolia Crawler. With a little configuration, the Algolia Crawler directly extracts and uploads records from your sites to Algolia indices.알골리아로 보낼 데이터가 다양한 웹 사이트에 존재한다면 알골리아 크롤러를 사용하는 것을 고려해보세요. 약간의 구성으로, Algolia Crawler는 당신의 사이트에서 직접 기록을 추출하여 Algolia 인덱스로 업로드한다.

Algolia records

An Algolia record (or object) is a set of key-value pairs called attributes. Attributes don’t have to respect a schema and can change from one object to another.

You want your records to contain any information that facilitates search, display on the front end, filtering, or relevance. You can leave everything else out.

Here is an example record of all four kinds of attributes.

알골리아 레코드(또는 객체)는 속성이라고 불리는 키-값 쌍의 집합이다. 속성은 스키마를 고려할 필요가 없으며 한 개체에서 다른 개체로 변경될 수 있습니다.
검색, 프런트 엔드에 표시, 필터링 또는 관련성을 용이하게 하는 모든 정보를 레코드에 포함하려고 합니다. 다른 건 다 빼셔도 돼요.
여기 네 가지 속성의 예시 기록이 있습니다.

 

Attributes for searching

Attributes for searching are the ones that contain the terms that your end users look for. If you want to search for “blueberry pie recipe”, you need attributes that contain those words—in this example, title and description.

Any textual, descriptive attribute that contains searchable keywords, such as summaries, brands, or colors, can be useful for searching.

All attributes are searchable by default, which lets you search in your records right from the start. Yet, for better relevance and performance, you want to be more selective by setting only some attributes as searchable. You can do this with the searchable attributes feature. You can also use this setting to rank your searchable attributes, making some more relevant than others.

검색 속성은 최종 사용자가 찾는 용어를 포함하는 속성입니다. "blueberry pie recipe"를 검색하려면 이러한 단어를 포함하는 속성(예: 제목 및 설명)이 필요합니다. 
요약, 브랜드 또는 색상과 같이 검색 가능한 키워드를 포함하는 텍스트의 설명 속성은 검색에 유용할 수 있습니다.
기본적으로 모든 속성을 검색할 수 있으므로 처음부터 바로 레코드를 검색할 수 있습니다. 그러나 보다 나은 관련성과 성능을 위해 일부 속성만 검색 가능으로 설정하여 보다 신중하게 선택할 수 있습니다. 검색 가능한 특성 기능을 사용하여 이 작업을 수행할 수 있습니다. 또한 이 설정을 사용하여 검색 가능 속성의 순위를 매겨 일부 속성의 연관성을 높일 수 있습니다.

 

 

Attributes for displaying

If you want to display images in your results, you need an attribute with their URLs in your records. This way, Algolia can return them within search results, and you can use them directly in the front end.

Display attributes include anything that can be useful to see in the results. This can be images, titles, and descriptions, or even attributes that you would typically use for filtering and custom ranking, such as likes count or categories. Some display attributes can also be searchable, like title and description, some shouldn’t, like image or likes.

 

표시 속성
결과에 이미지를 표시하려면 레코드에 URL이 있는 속성이 필요합니다. 이렇게 하면 알골리아는 검색 결과 내에서 반환할 수 있으며, 프런트 엔드에서 직접 사용할 수 있습니다.
표시 속성에는 결과에서 유용하게 볼 수 있는 항목이 포함됩니다. 여기에는 이미지, 제목 및 설명이 포함될 수 있으며, 필터링 및 사용자 지정 순위 지정에 일반적으로 사용되는 속성(예: 좋아요 개수 또는 범주)도 포함될 수 있습니다. 제목 및 설명과 같은 일부 표시 속성은 검색할 수 있으며, 이미지 또는 좋아요와 같은 일부 표시 속성은 검색하면 안 됩니다.

Attributes for filtering

If you want to search for a subset of records based on a category, for example pie recipes, gluten-free desserts, etc., you can set some attributes as filters. In this example, it would include categories and gluten_free.

Filterable attributes include booleans (like whether an item is public), lists (categories, tags), numeric attributes (price, rounded rating), and normalized text (colors, types, or any kind of enumerated types).

 

필터링 속성
파이 레시피, 글루텐 프리 디저트 등과 같이 범주를 기준으로 레코드 하위 집합을 검색하려는 경우 일부 속성을 필터로 설정할 수 있습니다. 이 예에서는 범주와 글루텐_free를 포함합니다.
필터링 가능한 속성에는 부울란(예: 항목이 공개인지 여부), 목록(범주, 태그), 숫자 속성(가격, 반올림 등급) 및 정규화된 텍스트(색상, 유형 또는 열거된 유형)가 포함됩니다.

 

Attributes for customizing ranking

If you want the most popular recipes to appear first in your results, you can add business-metric attributes such as the number of likes, ratings, or sales. In the recipe example, this includes likes, sales, and gluten_free.

Attributes for custom ranking are either numeric or boolean.

결과에 가장 많이 사용되는 레시피가 먼저 나타나도록 하려면 좋아요 수, 등급 또는 판매량과 같은 비즈니스 메트릭 속성을 추가할 수 있습니다. 레시피 예에서는 좋아요, 판매량, 글루텐_프리 등이 있습니다.
사용자 지정 순위의 속성은 숫자 또는 부울입니다.

 

Custom ranking strengthens and individualizes Algolia’s default ranking formula. Ranking contributes to the relevance of your search results. You can improve upon Algolia’s default ranking by including your own business metrics into the mix. To do this, you can use the custom ranking feature. 맞춤형 순위는 알골리아의 기본 순위 공식을 강화하고 개별화한다. 순위는 검색 결과의 관련성에 도움이 됩니다. 당신은 당신의 비즈니스 메트릭스를 혼합물에 포함시킴으로써 Algolia의 기본 순위를 개선할 수 있습니다. 이렇게 하려면 사용자 지정 순위 지정 기능을 사용할 수 있습니다.

Simplifying your records

When creating a searchable index, you want to simplify your record structure as much as possible.

Each record should contain enough information to be discoverable on its own. You don’t have to follow relational database principles, such as not repeating data or creating hierarchical structures with primary and foreign keys. The Algolia engine returns records as results. Each object in your index should contain enough information for users to find it, and to allow a full display of its content.

Take a book dataset. You can have one record per book, which contains everything about the book, including chapters. The problem is, a search for a common word like “boat” would retrieve too many books, most of which aren’t about boats.

If you want to get better, more relevant matches, you need to break up chapters into individual records. This way, you can search for books on boats with far more relevance by searching through their chapters.

검색 가능한 인덱스를 만들 때 레코드 구조를 최대한 단순화해야 합니다.
각각의 레코드들은 스스로 발견될 수 있을 만큼 충분한 정보를 포함해야 한다. 같은 관계형 데이터베이스 원칙을 따르지 않아도 됩니다(데이터를 반복하거나 기본 키와 외부 키로 계층 구조를 만들지 않아도 됩니다 ). 알골리아 엔진은 결과로 레코드를 반환합니다. 색인의 각 개체에는 사용자가 찾을 수 있고 개체 내용을 전체적으로 표시할 수 있는 충분한 정보가 있어야 합니다.
책 데이터 세트를 가져오세요. 당신은 한 권에 하나의 레코드을 가질 수 있는데, 그 책에는 챕터를 포함하여 그 책에 대한 모든 것이 담겨 있다. 문제는 "보트"와 같은 흔한 단어를 검색하면 대부분 보트에 관한 것이 아닌 너무 많은 책을 찾을 수 있다는 것이다.
더 잘 하고, 더 관련 있는 매치를 하려면, 당신은 챕터를 개별 기록으로 나눌 필요가 있다. 이런 식으로, 여러분은 챕터를 검색함으로써 훨씬 더 관련이 있는 책에서 배를 찾을 수 있습니다.

 

Algolia index

An index is a collection of records that you create as soon as you send records to Algolia. You can create several indices that contain different sets of objects. All indices live on Algolia’s servers.

Once you’ve pushed your data to Algolia, you can start thinking of how to organize your indices. This includes how many indices to have and how to configure each one. You can put all your records into a single index, or spread them across several indices. How you organize your indices depends on how you want to search and display your objects.

색인은 레코드를 Algolia로 보내자마자 만드는 레코드 모음입니다. 서로 다른 개체 집합을 포함하는 여러 인덱스를 작성할 수 있습니다. 모든 인덱스는 알골리아의 서버에 있습니다.
일단 여러분이 여러분의 데이터를 알골리아에 push하고 나면 , 여러분은 여러분의 index를 어떻게 구성할지를 생각하기 시작할 수 있습니다. 여기에는 인덱스의 수와 각 인덱스를 구성하는 방법이 포함됩니다. 모든 레코드를 단일 인덱스에 넣거나 여러 인덱스에 분산시킬 수 있습니다. 인덱스를 구성하는 방법은 개체를 검색하고 표시하는 방법에 따라 달라집니다.

 

728x90