6.2. 新規に作成されたすべてのデータベースに適用されるデフォルトインデックスの定義


Directory Server のデフォルトのインデックスでは、インデックスを作成する属性のセットが定義されています。新しいデータベースを作成すると、Directory Server はデフォルトのインデックス属性を cn=default indexes,cn=config,cn=ldbm database,cn=plugins,cn=config エントリーからデータベース固有の cn=index,cn=database_name,cn=ldbm database,cn=plugins,cn=config エントリーにコピーします。

注記

Directory Server は、デフォルトのインデックスの変更を既存のデータベースに適用しません。

6.2.1. デフォルトのインデックス属性

Directory Server は、デフォルトのインデックス属性を、cn=default indexes,cn=config,cn=ldbm database,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
Copy to Clipboard Toggle word wrap
Expand
表6.1 Directory Server のデフォルトインデックス属性

aci

cn

entryUSN

entryUUID

givenName

mail

mailAlternateAddress

mailHost

member

memberOf

nsUniqueId

nsCertSubjectDN

nsTombstoneCSN

ntUniqueId

ntUserDomainId

numSubordinates

objectClass

owner

parentId

seeAlso

sn

targetUniqueId

telephoneNumber

uid

uniqueMember

  
警告

表に記載されている属性 (システムインデックス) をデータベースのインデックスから削除すると、Directory Server のパフォーマンスに大きな影響を与える可能性があります。

6.2.2. デフォルトインデックスの維持

Directory Server は、デフォルトのインデックス属性を、cn=default indexes,cn=config,cn=ldbm database,cn=plugins,cn=config エントリーに格納します。なお、デフォルトのインデックス属性を維持できるのは、LDIF ステートメントを使用した場合のみです。

手順

  • たとえば、インデックスタイプが eqsub のデフォルトインデックスに roomNumber 属性を追加するには、次のように入力します。

    # ldapadd -D "cn=Directory Manager" -W -H ldap://server.example.com -x
    
    dn: cn=roomNumber,cn=default indexes,cn=config,cn=ldbm database,cn=plugins,cn=config
    objectClass: nsIndex
    objectClass: top
    cn: roomNumber
    nsSystemIndex: false
    nsIndexType: eq
    nsIndexType: sub
    Copy to Clipboard Toggle word wrap

    以下は、LDIF ステートメントの説明です。

    • objectClass: nsIndex: このエントリーがインデックスエントリーであることを定義します。
    • objectClass: top: このオブジェクトクラスは、インデックスエントリーで追加的に必要となります。
    • cn: インデックスに属性の名前を設定します。
    • nsSystemIndex: インデックスが Directory Server の操作に必須であるかどうかを示します。
    • nsIndexType: この複数値属性は、インデックスタイプを指定します。
  • たとえば、roomNumber 属性のデフォルトのインデックス属性に pres インデックスタイプを追加するには、次のように入力します。

    # ldapmodify -D "cn=Directory Manager" -W -H ldap://server.example.com -x
    
    dn: cn=roomNumber,cn=default indexes,cn=config,cn=ldbm database,cn=plugins,cn=config
    changetype: modify
    add: nsIndexType
    nsIndexType: pres
    Copy to Clipboard Toggle word wrap
  • たとえば、roomNumber 属性のデフォルトのインデックス属性から pres インデックスタイプを削除するには、次のように入力します。

    # ldapmodify -D "cn=Directory Manager" -W -H ldap://server.example.com -x
    
    dn: cn=roomNumber,cn=default indexes,cn=config,cn=ldbm database,cn=plugins,cn=config
    changetype: modify
    delete: nsIndexType
    nsIndexType: pres
    Copy to Clipboard Toggle word wrap
  • たとえば、デフォルトのインデックスから 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
    Copy to Clipboard Toggle word wrap

検証

  • デフォルトのインデックス属性をリスト表示して、変更を確認します。

    # 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 Toggle word wrap
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2025 Red Hat