본문 바로가기
개발/ALGOLIA

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

by dev_caleb 2022. 3. 1.
728x90

Send and Update Your Data(데이터 보내고 업데이트 하기)

https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/

 

Send and update your data | Algolia

How to send your data to Algolia, batch large datasets, synchronize via incremental updates and atomic reindexing, or handle concurrency.

www.algolia.com

 

Pushing your data to an Algolia index(알고리아 인덱스에 데이터 PUSH하기)

Algolia uses its own servers to search your data. Once you’ve structured your data into records, you need to send them to Algolia.

There are several ways to push your data to an Algolia index:

  • Using one of Algolia’s API clients. You don’t have to explicitly create an index. If you try to add records to a nonexistent index, Algolia creates it for you.
  • Using the Algolia dashboard by sending a JSON file.
  • Using the Algolia crawler. It automatically crawls your content directly from your site and indexes it into Algolia. The Algolia crawler is available as an add-on.

알골리아는 당신의 데이터를 검색하기 위해 자체 서버를 사용합니다. 데이터를 records으로 정리하고 나면 알골리아로 보내야 합니다.
데이터를 Algolia 인덱스로 푸시하는 방법에는 여러 가지가 있습니다.
-Algolia의 API 클라이언트 중 하나를 사용합니다. 인덱스를 명시적으로 만들 필요는 없습니다. 존재하지 않는 인덱스에 레코드를 추가하려고 하면 알골리아가 대신 만듭니다.
-JSON 파일을 전송하여 Algolia 대시보드를 사용합니다.
-알골리아 크롤러를 이용해서. 그것은 당신의 사이트에서 직접 당신의 콘텐츠를 자동으로 크롤링을 해서 그것을 알골리아에 인덱싱합니다. 알골리아 크롤러는 추가 기능으로 이용할 수 있다.

Naming your index(인덱스 이름 짓기)

Choose a unique, readable name and make sure you don’t use any sensitive or personally identifiable information (PII) as your index name. This includes customer names, user IDs, or email addresses. Index names appear in network requests, so you can consider them as publicly available.

읽기 쉬운 고유한 이름을 선택하고 인덱스 이름으로 PII(민감하거나 개인 식별 가능한 정보)를 사용하지 마십시오. 여기에는 고객 이름, 사용자 ID 또는 전자 메일 주소가 포함됩니다. 인덱스 이름은 네트워크 요청에 표시되므로 공개적으로 사용할 수 있는 것으로 간주할 수 있습니다.

Passing Algolia credentials(자격증명 전달)

You need an application ID and a valid API key to push your data. These credentials protect your data, and you can set different access levels for your team.

Every indexing operation requires these credentials. The application ID gives you access to your indices, and the appropriate API key gives you rights to perform indexing operations.

데이터를 푸시하려면 응용 프로그램 ID와 유효한 API 키가 필요합니다. 이러한 자격 증명은 데이터를 보호하며, 팀에 대해 서로 다른 액세스 수준을 설정할 수 있습니다.
모든 인덱싱 작업에는 이러한 인증 정보가 필요합니다. 응용 프로그램 ID는 인덱스에 대한 액세스를 제공하며 적절한 API 키는 인덱싱 작업을 수행할 수 있는 권한을 제공합니다.

 

Using unique object identifiers(고유 objectID 사용)

The engine identifies each object with a unique objectID, ideally one that you set yourself. If you don’t, Algolia generates them for you. You can retrieve the objectID by browsing the index. Later on, when you need to update or delete records, you must provide the objectID.

 

엔진은 각 물체를 고유한 objectID로 식별합니다, 이상적으로는 직접 설정하는 것이 좋습니다. 그렇지 않으면, 알골리아가 당신을 위해 그것들을 생성합니다. 객체를 검색할 수 있습니다.인덱스를 검색하여 ID를 지정합니다. 나중에 레코드를 업데이트하거나 삭제해야 할 때 objectID를 제공해야 합니다.

Sending records in batches(레코드를 일괄 전송하기)

Algolia lets you send one or more records in a single API call, or batch records. You can batch your indexing operations via the API or the dashboard.

For optimal indexing performance, you should send your records in batches. An ideal batch size is ~10 MB, which represents between 1,000 or 10,000 records depending on the average record size.

Batching has several benefits: it reduces network calls and speeds up indexing. Users with lots of records see the most significant impact on performance, but every Algolia user should batch indexing operations whenever possible.

Batching doesn’t change how Algolia counts indexing operations. Every indexing operation adds to your count. If you send several records, each of them still counts as one operation.


Algolia를 사용하면 하나 이상의 레코드를 단일 API 호출 또는 배치 레코드로 전송할 수 있습니다. API 또는 대시보드를 통해 인덱싱 작업을 일괄 처리할 수 있습니다.
인덱싱 성능을 최적화하려면 레코드를 일괄 전송해야 합니다. 이상적인 배치 크기는 ~10MB로, 평균 레코드 크기에 따라 1,000개에서 10,000개 사이의 레코드를 나타냅니다.
일괄 처리에는 네트워크 호출을 줄이고 인덱싱 속도를 높인다는 몇 가지 이점이 있습니다. 기록이 많은 사용자는 성능에 가장 큰 영향을 미치지만 모든 Algolia 사용자는 가능하면 인덱싱 작업을 일괄 처리해야 한다.
Batching은 Algolia가 인덱싱 작업을 계산하는 방식을 바꾸지 않습니다. 모든 indexing 작업은 개수에 추가됩니다. 여러 개의 레코드를 보내도 각각은 하나의 작업으로 계산됩니다.

Updating your data(데이터 업데이트하기)

After the initial data import, you need to keep your index up-to-date with the latest changes on your application or website. The appropriate update frequency depends on how often your content changes, and how fast you need it to be searchable.

Take the example of an ecommerce store:

  • You want to update price changes or product availability in real time.
  • You don’t need to update the number of sales (used for custom ranking) as often, so you can periodically send them in batches.

You need to find a balance between having fresh information in the search as fast as possible, and reducing the number of operations. This impacts your pricing and performance.

 

처음 데이터를 가져온 후에는 응용 프로그램 또는 웹 사이트의 최신 변경 사항을 사용하여 인덱스를 최신 상태로 유지해야 합니다. 적절한 업데이트 빈도는 콘텐츠가 변경되는 빈도와 검색 가능한 속도에 따라 달라집니다.
전자상거래 상점의 예를 들어보자.
-가격 변동이나 제품 가용성을 실시간으로 업데이트하려고 합니다.
-판매 수(맞춤형 순위에 사용됨)를 자주 업데이트할 필요가 없으므로 주기적으로 일괄 발송할 수 있습니다.
검색에서 새로운 정보를 최대한 빨리 확보하는 것과 작업 수를 줄이는 것 사이의 균형을 찾아야 합니다. 이는 가격과 성능에 영향을 미칩니다.

Handling multiple users(다수 유저 핸들링)

You may use Security-filtering to restrict the data users can see when searching. This allows for dedicated searchable content, which isn’t visible by unauthorized users.

보안 필터링을 사용하여 사용자가 검색할 때 볼 수 있는 데이터를 제한할 수 있습니다. 이렇게 하면 권한이 없는 사용자가 볼 수 없는 전용 검색 가능 콘텐츠를 사용할 수 있습니다.

Handling concurrency(동시성 처리)

When working in a concurrent environment, you might need more control to guarantee data consistency. The engine supports built-in operations that allow for conditional updates based on versioning and optimistic locking.

 

동시 환경에서 작업할 경우, 데이터 일관성을 보장하기 위해 더 많은 제어가 필요할 수 있습니다. 엔진은 버전 관리 및 긍정적 잠금에 따라 조건부 업데이트를 허용하는 내장 작업을 지원합니다.

Integrating with third-parties

You may use a framework or platform to power your application. Most of these solutions have their own databases and front ends. The goal is to send your data from these platforms to Algolia, and manage data updates and search configurations.

Algolia offers several official integrations to simplify the indexing process for popular frameworks and platforms. If you’re using one of the solutions listed below, you can install the corresponding extension to index your content.

 

프레임워크 또는 플랫폼을 사용하여 응용 프로그램의 성능을 향상시킬 수 있습니다. 대부분의 솔루션에는 자체 데이터베이스와 프런트 엔드가 있습니다. 이 플랫폼의 데이터를 알골리아로 전송하고 데이터 업데이트 및 검색 구성을 관리하는 것이 목표입니다.
알골리아는 인기 있는 프레임워크와 플랫폼의 인덱싱 프로세스를 단순화하기 위한 몇 가지 공식 통합 기능을 제공합니다. 아래 나열된 솔루션 중 하나를 사용하는 경우 해당 확장을 설치하여 콘텐츠를 인덱싱할 수 있습니다.

 

 

 

 

728x90