정의
호환성
이 명령은 다음 환경에서 호스팅되는 배포에서 사용할 수 있습니다.
- MongoDB Atlas: The fully managed service for MongoDB deployments in the cloud
참고
This command is supported in all MongoDB Atlas clusters. For information on Atlas support for all commands, see Unsupported Commands.
MongoDB Enterprise: MongoDB의 구독 기반 자체 관리 버전
MongoDB Community: MongoDB의 소스 사용 가능 무료 자체 관리 버전
구문
명령은 다음과 같은 구문을 가집니다:
db.runCommand( { compactStructuredEncryptionData: <collection>, compactionTokens: { encryptedFieldPath: bindata, ... }, } )
명령 필드
이 명령은 다음 필드를 사용합니다.
필드 | 유형 | 설명 |
|---|---|---|
| 문자열 | 컬렉션의 이름입니다. |
| 문서 | 인덱스 필드를 압축 토큰에 매핑하는 문서입니다. |
The mongosh provides a wrapper method db.collection.compactStructuredEncryptionData().
필요한 액세스 권한
기본 제공 역할 readWriteAnyDatabase 및 dbOwner 는 리소스에 대한 compactStructuredEncryptionData 조치를 제공합니다.
예시
예시는 메타데이터 컬렉션 압축 을 참조하세요.