mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Maxim Thomas
25.28.2025 da20003d4f00a05fa608bbf442766b716c8c851a
[#497] Set the same indexes for a new backend as for the initial backend (#501)

4 files modified
108 ■■■■ changed files
opendj-doc-generated-ref/src/main/asciidoc/admin-guide/chap-import-export.adoc 9 ●●●●● patch | view | raw | blame | history
opendj-doc-generated-ref/src/main/asciidoc/admin-guide/chap-indexing.adoc 10 ●●●●● patch | view | raw | blame | history
opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PluggableBackendConfiguration.xml 71 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/main/java/org/opends/server/tools/BackendCreationHelper.java 18 ●●●●● patch | view | raw | blame | history
opendj-doc-generated-ref/src/main/asciidoc/admin-guide/chap-import-export.adoc
@@ -352,10 +352,19 @@
When you create a new backend using the `dsconfig` command, OpenDJ directory server creates the following indexes automatically:
[none]
* `aci` presence
* `cn` equality, substring
* `ds-sync-conflict` equality
* `ds-sync-hist` ordering
* `entryUUID` equality
* `objectClass` equality
* `givenName` equality, substring
* `mail`  equality, substring
* `member` equality
* `sn` equality, substring
* `telephoneNumber` equality, substring
* `uid` equality
* `uniqueMember` equality
You can create additional indexes as described in xref:../admin-guide/chap-indexing.adoc#configure-indexes["Configuring and Rebuilding Indexes"].
opendj-doc-generated-ref/src/main/asciidoc/admin-guide/chap-indexing.adoc
@@ -1101,13 +1101,9 @@
a|-
a|4000
|===
When you create a new backend using the `dsconfig` command, OpenDJ directory server creates the following indexes automatically:
[none]
* `aci` presence
* `ds-sync-conflict` equality
* `ds-sync-hist` ordering
* `entryUUID` equality
* `objectClass` equality
When you create a new backend using the `dsconfig` command, the OpenDJ Directory Server also automatically creates these indexes.
You can create additional indexes as described in xref:../admin-guide/chap-indexing.adoc#configure-indexes["Configuring and Rebuilding Indexes"].
opendj-maven-plugin/src/main/resources/config/xml/org/forgerock/opendj/server/config/PluggableBackendConfiguration.xml
@@ -71,6 +71,77 @@
          <adm:value>ds-sync-conflict</adm:value>
        </adm:property>
      </adm:default-managed-object>
      <adm:default-managed-object name="cn">
        <adm:property name="index-type">
          <adm:value>equality</adm:value>
          <adm:value>substring</adm:value>
        </adm:property>
        <adm:property name="attribute">
          <adm:value>cn</adm:value>
        </adm:property>
      </adm:default-managed-object>
      <adm:default-managed-object name="givenName">
        <adm:property name="index-type">
          <adm:value>equality</adm:value>
          <adm:value>substring</adm:value>
        </adm:property>
        <adm:property name="attribute">
          <adm:value>givenName</adm:value>
        </adm:property>
      </adm:default-managed-object>
      <adm:default-managed-object name="mail">
        <adm:property name="index-type">
          <adm:value>equality</adm:value>
          <adm:value>substring</adm:value>
        </adm:property>
        <adm:property name="attribute">
          <adm:value>mail</adm:value>
        </adm:property>
      </adm:default-managed-object>
      <adm:default-managed-object name="sn">
        <adm:property name="index-type">
          <adm:value>equality</adm:value>
          <adm:value>substring</adm:value>
        </adm:property>
        <adm:property name="attribute">
          <adm:value>sn</adm:value>
        </adm:property>
      </adm:default-managed-object>
      <adm:default-managed-object name="telephoneNumber">
        <adm:property name="index-type">
          <adm:value>equality</adm:value>
          <adm:value>substring</adm:value>
        </adm:property>
        <adm:property name="attribute">
          <adm:value>telephoneNumber</adm:value>
        </adm:property>
      </adm:default-managed-object>
      <adm:default-managed-object name="member">
        <adm:property name="index-type">
          <adm:value>equality</adm:value>
        </adm:property>
        <adm:property name="attribute">
          <adm:value>member</adm:value>
        </adm:property>
      </adm:default-managed-object>
      <adm:default-managed-object name="uid">
        <adm:property name="index-type">
          <adm:value>equality</adm:value>
        </adm:property>
        <adm:property name="attribute">
          <adm:value>uid</adm:value>
        </adm:property>
      </adm:default-managed-object>
      <adm:default-managed-object name="uniqueMember">
        <adm:property name="index-type">
          <adm:value>equality</adm:value>
        </adm:property>
        <adm:property name="attribute">
          <adm:value>uniqueMember</adm:value>
        </adm:property>
      </adm:default-managed-object>
    </adm:one-to-many>
    <adm:profile name="ldap">
      <ldap:rdn-sequence>cn=Index</ldap:rdn-sequence>
opendj-server-legacy/src/main/java/org/opends/server/tools/BackendCreationHelper.java
@@ -98,14 +98,16 @@
  /** Default indexes to add in a new backend. */
  public static final CreateIndex[] DEFAULT_INDEXES = {
    CreateIndex.withEqualityAndSubstring("cn"),
    CreateIndex.withEqualityAndSubstring("givenName"),
    CreateIndex.withEqualityAndSubstring("mail"),
    CreateIndex.withEqualityAndSubstring("sn"),
    CreateIndex.withEqualityAndSubstring("telephoneNumber"),
    CreateIndex.withEquality("member"),
    CreateIndex.withEquality("uid"),
    CreateIndex.withEquality("uniqueMember")
// Default indexes moved to the PluggableBackendConfiguration.xml file,
// see https://github.com/OpenIdentityPlatform/OpenDJ/issues/497
//    CreateIndex.withEqualityAndSubstring("cn"),
//    CreateIndex.withEqualityAndSubstring("givenName"),
//    CreateIndex.withEqualityAndSubstring("mail"),
//    CreateIndex.withEqualityAndSubstring("sn"),
//    CreateIndex.withEqualityAndSubstring("telephoneNumber"),
//    CreateIndex.withEquality("member"),
//    CreateIndex.withEquality("uid"),
//    CreateIndex.withEquality("uniqueMember")
  };
  /**