AI 에이전트의 경우: 문서 인덱스는 https://www.mongodb.com/ko-kr/docs/llms.txt에서 사용할 수 있으며, 모든 페이지의 마크다운 버전은 어떤 URL 경로에 .md를 추가하여 사용할 수 있습니다.
Docs Menu

사용자 지정 분석기

MongoDB Search 분석기 문자 시퀀스를 변환, 필터하다 및 그룹 일련의 작업을 수행하여 인덱싱할 문서 설정하다 를 준비합니다. Atlas UI 에서 특정 인덱싱 요구 사항에 맞게 사용자 지정 분석기 정의할 수 있습니다.

A custom MongoDB Search analyzer is made up of a tokenizer, an optional list of character filters, and an optional list of token filters. When MongoDB Search analyzes text with a custom analyzer, the text passes through the character filters first, then the tokenizer, and then the token filters.

사용자 지정 분석기의 구문은 다음과 같습니다.

구문
"analyzers": [
{
"name": "<name>",
"charFilters": [ <list-of-character-filters> ],
"tokenizer": {
"type": "<tokenizer-type>"
},
"tokenFilters": [ <list-of-token-filters> ]
}
]

사용자 지정 분석기에는 다음과 같은 속성이 있습니다.

속성
유형
설명
필수 사항입니다.

name

문자열

사용자 지정 분석기의 이름입니다. 이름은 인덱스 내에서 고유해야 하며 다음 문자열로 시작할 수 없습니다.

  • lucene.

  • builtin.

  • mongodb.

charFilters

객체 목록

0개 이상의 문자 필터가 포함된 배열입니다.

문자 필터는 텍스트를 한 번에 한 문자씩 검사하고 필터링 작업을 수행합니다.

자세히 알아보려면 문자 필터를 참조하세요.

no

tokenizer

객체

토크나이저를 사용하여 토큰을 생성합니다.

분석기는 토크나이저를 사용하여 인덱싱 목적으로 텍스트 청크를 그룹 또는 토큰으로 분할할 수 있습니다.

자세한 내용은 토크나이저를 참조하세요.

tokenFilters

객체 목록

토큰 필터가 0개 이상 포함된 배열입니다.

토큰 필터는 다음과 같은 작업을 수행합니다.

  • 어간 처리: "talking", "talked", "talks"와 같은 관련 단어를 어근인 "talk"로 줄입니다.

  • 편집: 공개 문서에서 민감한 정보를 제거합니다.

자세히 알아보려면 토큰 필터를 참조하세요.

no

The Atlas UI Visual Editor includes the option to choose between the following common-use templates to help you get started with building your custom analyzer:

  • 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.email field in the Example Collection.

  • 전화번호 - regexCaptureGroup 토크나이저를 사용하여 미국 형식의 전화번호에서 단일 토큰을 생성합니다. 예를 들어 예시 컬렉션page_updated_by.phone 필드에 이 분석기를 적용할 수 있습니다.

  • 대시로 구분된 ID - regexSplit 토크나이저를 사용하여 하이픈으로 구분된 텍스트에서 토큰을 만드는 데 사용합니다. 예를 들어 예시 컬렉션message 필드에 이 분석기를 적용할 수 있습니다.

이러한 내장 사용자 지정 분석기를 사용하거나 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 토큰 필터입니다.

작업

사용자 지정 분석기에서 수행할 수 있는 작업을 나타내는 클릭 가능한 아이콘입니다.

  • 사용자 지정 분석기를 편집하려면 을(를) 클릭합니다.

  • 사용자 지정 분석기를 삭제하려면 을(를) 클릭합니다.