개요
MongoDB Search 분석기 문자 시퀀스를 변환, 필터하다 및 그룹 일련의 작업을 수행하여 인덱싱할 문서 설정하다 를 준비합니다. Atlas UI 에서 특정 인덱싱 요구 사항에 맞게 사용자 지정 분석기 정의할 수 있습니다.
사용자 지정 MongoDB Search 분석기는 토크나이저, 선택 사항 문자 필터 목록 및 선택 사항 토큰 필터 목록으로 구성됩니다. MongoDB Search가 사용자 지정 분석기를 사용하여 텍스트를 분석할 때, 텍스트는 먼저 문자 필터를 통과한 다음 토크나이저를 거쳐 마지막으로 토큰 필터를 통과합니다.
구문
사용자 지정 분석기의 구문은 다음과 같습니다.
"analyzers": [ { "name": "<name>", "charFilters": [ <list-of-character-filters> ], "tokenizer": { "type": "<tokenizer-type>" }, "tokenFilters": [ <list-of-token-filters> ] } ]
속성
사용자 지정 분석기에는 다음과 같은 속성이 있습니다.
속성 | 유형 | 설명 | 필수 사항입니다. |
|---|---|---|---|
| 문자열 | 사용자 지정 분석기의 이름입니다. 이름은 인덱스 내에서 고유해야 하며 다음 문자열로 시작할 수 없습니다.
| 네 |
| 객체 목록 | no | |
| 객체 | 토크나이저를 사용하여 토큰을 생성합니다. 분석기는 토크나이저를 사용하여 인덱싱 목적으로 텍스트 청크를 그룹 또는 토큰으로 분할할 수 있습니다. 자세한 내용은 사용자 지정 검색 분석기용 토크나이저를 참조하세요. | 네 |
| 객체 목록 | 토큰 필터가 0개 이상 포함된 배열입니다. 토큰 필터는 다음과 같은 작업을 수행합니다.
자세한 내용은 사용자 지정 분석기의 토큰 필터를 참조하십시오. | no |
내장형 사용자 지정 분석기 템플릿
Atlas UI Visual Editor 에는 사용자 지정 분석기 구축을 시작하는 데 도움이 되는 다음과 같은 일반적으로 사용되는 템플릿 중에서 선택할 수 있는 옵션이 포함되어 있습니다.
Email Parser - Use this to tokenize email addresses up to 200 characters using the uaxUrlEmail tokenizer. For example, you can apply this analyzer on the
page_updated_by.emailfield in the Example Collection.Phone Numbers - Use this to create a single token from a US-formatted phone number using the regexCaptureGroup tokenizer. For example, you can apply this analyzer on the
page_updated_by.phonefield in the Example Collection.Dash-Separated IDs - Use this to create tokens from hyphen-delimited text using the regexSplit tokenizer. For example, you can apply this analyzer on the
messagefield in the Example Collection.
이러한 내장 사용자 지정 분석기를 사용하거나 MongoDB Search Visual Editor 또는 JSON 편집기를 사용하여 사용자 사용자 지정 분석기를 만들 수 있습니다.
컬렉션 예시
문자 필터, 사용자 지정 검색 분석기용 토크나이저 및 사용자 지정 분석기용 토큰 필터 페이지에는 문자 필터, 토크나이저 및 토큰 필터에 대한 샘플 인덱스 정의 및 쿼리 예시가 포함되어 있습니다. 이 예에서는 다음 문서가 포함된 샘플 minutes 컬렉션을 사용합니다.
{ "_id": 1, "page_updated_by": { "last_name": "AUERBACH", "first_name": "Siân", "email": "auerbach@example.com", "phone": "(123)-456-7890" }, "title": "The team's weekly meeting", "message": "try to siGn-In", "text": { "en_US": "<head> This page deals with department meetings.</head>", "sv_FI": "Den här sidan behandlar avdelningsmöten", "fr_CA": "Cette page traite des réunions de département" } }
{ "_id": 2, "page_updated_by": { "last_name": "OHRBACH", "first_name": "Noël", "email": "ohrbach@example.com", "phone": "(123) 456 0987" }, "title": "The check-in with sales team", "message": "do not forget to SIGN-IN. See ① for details.", "text" : { "en_US": "The head of the sales department spoke first.", "fa_IR": "ابتدا رئیس بخش فروش صحبت کرد", "sv_FI": "Först talade chefen för försäljningsavdelningen" } }
{ "_id": 3, "page_updated_by": { "last_name": "LEWINSKY", "first_name": "Brièle", "email": "lewinsky@example.com", "phone": "(123).456.9870" }, "title": "The regular board meeting", "message": "try to sign-in", "text" : { "en_US": "<body>We'll head out to the conference room by noon.</body>" } }
{ "_id": 4, "page_updated_by": { "last_name": "LEVINSKI", "first_name": "François", "email": "levinski@example.com", "phone": "123-456-8907" }, "title": "The daily huddle on tHe StandUpApp2", "message": "write down your signature or phone №", "text" : { "en_US": "<body>This page has been updated with the items on the agenda.</body>" , "es_MX": "La página ha sido actualizada con los puntos de la agenda.", "pl_PL": "Strona została zaktualizowana o punkty porządku obrad." } }
자세히 알아보기
사용자 지정 분석기를 만드는 방법에 대해 자세히 알아보려면 다음 참조 페이지를 확인하세요.
참고
Atlas UI에서 Visual Editor을(를) 사용하여 사용자 지정 분석기를 추가하는 경우 Atlas UI는 Custom Analyzers 섹션에 분석기에 대한 다음 세부 정보를 표시합니다.
이름 | 사용자 지정 분석기를 식별하는 레이블입니다. |
사용 분야 | 사용자 지정 분석기를 사용하는 필드입니다. 사용자 지정 분석기를 사용하여 필드를 분석하지 않는 경우 값은 없음입니다. |
문자 필터 | 사용자 지정 분석기 에 구성된 MongoDB Search 문자 필터입니다. |
토크나이저 | 사용자 지정 분석기 에 구성된 MongoDB Search 토크나이저 . |
토큰 필터 | 사용자 지정 분석기 에 구성된 MongoDB Search 토큰 필터입니다. |
작업 | 사용자 지정 분석기에서 수행할 수 있는 작업을 나타내는 클릭 가능한 아이콘입니다.
|