인덱스 참조
An Atlas Search index is a data structure that maps documents from your Atlas cluster to the terms that are extracted from those documents. Atlas Search indexes enable efficient full-text searches of your database.
When you define an Atlas Search index, you can use static or dynamic mappings
to specify which fields you want to index in your collection. You can also use analyzers
to define how Atlas Search extracts searchable tokens from string
fields or query strings.
Finally, you can apply additional configuration options in your index definition to improve the
performance and accuracy of your Atlas Search query, including options to store source fields in your index, or
define synonym mappings.
To learn how to define an Atlas Search index according to your your query requirements, see Atlas Search 인덱스 만들기. Once you define your Atlas Search index, you can add the index to your Atlas cluster with the Atlas Search 인덱스 만들기 tutorial. To learn how to view, edit, update, or delete your Atlas Search index, see Atlas Search 인덱스 관리.
This page describes the JSON syntax and definition options for an Atlas Search index.
구문
옵션
필드 | 유형 | 필요성 | 설명 |
---|---|---|---|
| 문자열 | 옵션 | |
| 사용자 지정 분석기 배열 | 옵션 | 이 인덱스에서 사용할 사용자 지정 분석기를 지정합니다. |
| 필수 사항 | 이 인덱스에 대해 서로 다른 경로에서 필드를 인덱싱하는 방법을 지정합니다. | |
| 부울 | 옵션 | 이 인덱스에 대한 필드의 동적 매핑을 사용하거나 사용하지 않도록 설정합니다.
생략하는 경우 기본값은 중요: Atlas Search는 감지된 데이터 유형에 대한 기본 설정을 사용하여 |
| 문서 | 조건부 | 인덱싱할 필드를 지정합니다. 동적 매핑이 비활성화된 경우에만 필요합니다. 필드 이름 시작 부분에 달러( 자세한 내용은 필드 매핑 정의를 참조하세요. |
| 문자열 | 옵션 | |
| int | 옵션 | 문서 수가 20억 개를 초과하는 경우 생성할 하위 인덱스의 수를 지정합니다. 유효한 값은 인덱스 파티션을 사용하려면 클러스터 에 검색 노드가 배포되어 있어야 합니다. |
| 부울 또는 저장된 소스 정의 | 옵션 | returnedStoredSource 옵션을 사용하여 쿼리 시간 조회를 위해 저장할 문서 내 필드를 지정합니다. Atlas Search에서 모든 데이터 유형의 필드를 저장할 수 있습니다. 값은 다음 중 하나일 수 있습니다.
생략하는 경우 기본값은 자세히 알아보려면 Atlas Search 인덱스에 저장된 소스 필드 정의를 참조하세요. |
| 동의어 매핑 정의의 배열 | 옵션 |
Troubleshoot Indexes
mongot
프로세스가 설치되지 않았거나 실행 중이지 않음
Atlas Search mongot
프로세스가 설치되어 있지 않거나 실행 중이 아닌 상태에서 $search
쿼리를 실행하면 다음 오류가 반환됩니다.
MongoError: Remote error from mongot :: caused by :: Error connecting to localhost:28000.
mongot
프로세스는 첫 번째 Atlas Search 검색 인덱스가 정의된 경우에만 설치됩니다. Atlas cluster에 Atlas Search 검색 인덱스가 없는 경우 Atlas Search 검색 인덱스를 하나 이상 생성하여 이 오류를 해결합니다.
자세히 알아보기
To learn how to define an Atlas Search index to meet your Atlas Search query needs, see Atlas Search 인덱스 만들기.
To learn how to add an index to your Atlas cluster, see Atlas Search 인덱스 만들기.
To learn more about the available index configuration options, see the following reference pages: