6.2. 새로 생성된 모든 데이터베이스에 적용되는 기본 인덱스 정의
Directory Server의 기본 인덱스는 인덱싱할 속성 집합을 정의합니다. 새 데이터베이스를 만들 때 Directory Server는 cn=default 인덱스, cn=config,cn=ldbm 데이터베이스,cn=plugins,cn=config
항목을 데이터베이스별 cn= index,cn=database_name,cn=ldbm 데이터베이스,cn=plugins,cn=config
항목에 복사합니다.
Directory Server는 기본 인덱스의 변경 사항을 기존 데이터베이스에 적용하지 않습니다.
6.2.1. 기본 인덱스 속성 링크 복사링크가 클립보드에 복사되었습니다!
Directory Server는 기본 인덱스 속성을 cn=default 인덱스,cn=config,cn=ldbm 데이터베이스,cn=plugins,cn=config
항목에 저장합니다. 인덱스 유형을 포함하여 표시하려면 다음을 입력합니다.
ldapsearch -D "cn=Directory Manager" -W -H ldap://server.example.com -b "cn=default indexes,cn=config,cn=ldbm database,cn=plugins,cn=config" -s one -o ldif-wrap=no
# ldapsearch -D "cn=Directory Manager" -W -H ldap://server.example.com -b "cn=default indexes,cn=config,cn=ldbm database,cn=plugins,cn=config" -s one -o ldif-wrap=no
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
데이터베이스 인덱스에서 테이블(시스템 인덱스)에 나열된 특성을 제거하면 Directory Server 성능에 큰 영향을 미칠 수 있습니다.
6.2.2. 기본 인덱스 유지 링크 복사링크가 클립보드에 복사되었습니다!
Directory Server는 기본 인덱스 속성을 cn=default 인덱스,cn=config,cn=ldbm 데이터베이스,cn=plugins,cn=config
항목에 저장합니다. LDIF 문을 사용하여 기본 인덱스 속성만 유지할 수 있습니다.
프로세스
예를 들어 인덱스 유형이
eq
및sub
인 기본 인덱스에roomNumber
속성을 추가하려면 다음을 입력합니다.Copy to Clipboard Copied! Toggle word wrap Toggle overflow LDIF 문에 대한 설명:
-
objectclass: nsIndex
: 이 항목이 인덱스 항목임을 정의합니다. -
objectclass: top
: 이 오브젝트 클래스는 인덱스 항목에서 추가로 필요합니다. -
CN
: 특성 이름을 index로 설정합니다. -
nsSystemIndex
: 인덱스가 Directory Server 작업에 필수인지 여부를 나타냅니다. -
nsIndexType
:이 다중 값 속성은 인덱스 유형을 지정합니다.
-
예를 들어
roomNumber
속성의 기본 인덱스 속성에pres
인덱스 유형을 추가하려면 다음을 입력합니다.Copy to Clipboard Copied! Toggle word wrap Toggle overflow 예를 들어
roomNumber
속성의 기본 인덱스 속성에서사전
인덱스 유형을 제거하려면 다음을 입력합니다.Copy to Clipboard Copied! Toggle word wrap Toggle overflow 예를 들어 기본 인덱스에서
roomNumber
속성을 제거하려면 다음을 입력합니다.ldapdelete -D "cn=Directory Manager" -W -H ldap://server.example.com -x cn=roomNumber,cn=default indexes,cn=config,cn=ldbm database,cn=plugins,cn=config
# ldapdelete -D "cn=Directory Manager" -W -H ldap://server.example.com -x cn=roomNumber,cn=default indexes,cn=config,cn=ldbm database,cn=plugins,cn=config
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
검증
기본 인덱스 속성을 나열하여 변경 사항을 확인합니다.
ldapsearch -H ldap://server.example.com:389 -D "cn=Directory Manager" -W -b "cn=default indexes,cn=config,cn=ldbm database,cn=plugins,cn=config" -x -s one -o ldif-wrap=no
# ldapsearch -H ldap://server.example.com:389 -D "cn=Directory Manager" -W -b "cn=default indexes,cn=config,cn=ldbm database,cn=plugins,cn=config" -x -s one -o ldif-wrap=no
Copy to Clipboard Copied! Toggle word wrap Toggle overflow