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

Matthew Swift
18.58.2014 ccb19f150971f0c29516081940266263ee54b048
OPENDJ-1602 (CR-5566) New pluggable storage based backend

Add index configuration definitions for pluggable backends because the configuration framework doesn't like it when we reuse the indexes from the local DB backend.
4 files added
8 files modified
638 ■■■■■ changed files
opendj3-server-dev/resource/schema/02-config.ldif 21 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/admin/defn/org/opends/server/admin/std/BackendIndexConfiguration.xml 232 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/admin/defn/org/opends/server/admin/std/BackendVLVIndexConfiguration.xml 232 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/admin/defn/org/opends/server/admin/std/PluggableBackendConfiguration.xml 8 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/admin/messages/BackendIndexCfgDefn.properties 24 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/admin/messages/BackendVLVIndexCfgDefn.properties 23 ●●●●● patch | view | raw | blame | history
opendj3-server-dev/src/admin/messages/PersistitBackendCfgDefn.properties 4 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/admin/messages/PluggableBackendCfgDefn.properties 4 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/backends/pluggable/AttributeIndex.java 28 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/backends/pluggable/BackendImpl.java 14 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/backends/pluggable/EntryContainer.java 32 ●●●● patch | view | raw | blame | history
opendj3-server-dev/src/server/org/opends/server/backends/pluggable/VLVIndex.java 16 ●●●● patch | view | raw | blame | history
opendj3-server-dev/resource/schema/02-config.ldif
@@ -5774,4 +5774,25 @@
        ds-cfg-disk-full-threshold $
        ds-cfg-disk-low-threshold )
  X-ORIGIN 'OpenDJ Directory Server' )
objectClasses: ( 1.3.6.1.4.1.36733.2.1.2.24
  NAME 'ds-cfg-backend-index'
  SUP top
  STRUCTURAL
  MUST ( ds-cfg-attribute $
         ds-cfg-index-type )
  MAY ( ds-cfg-index-entry-limit $
              ds-cfg-substring-length $
              ds-cfg-index-extensible-matching-rule )
  X-ORIGIN 'OpenDJ Directory Server' )
objectClasses: ( 1.3.6.1.4.1.36733.2.1.2.25
  NAME 'ds-cfg-backend-vlv-index'
  SUP top
  STRUCTURAL
  MUST ( ds-cfg-base-dn $
         ds-cfg-scope $
         ds-cfg-filter $
         ds-cfg-sort-order $
         ds-cfg-name )
  MAY ds-cfg-max-block-size
  X-ORIGIN 'OpenDJ Directory Server' )
opendj3-server-dev/src/admin/defn/org/opends/server/admin/std/BackendIndexConfiguration.xml
New file
@@ -0,0 +1,232 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ! CDDL HEADER START
  !
  ! The contents of this file are subject to the terms of the
  ! Common Development and Distribution License, Version 1.0 only
  ! (the "License").  You may not use this file except in compliance
  ! with the License.
  !
  ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
  ! or http://forgerock.org/license/CDDLv1.0.html.
  ! See the License for the specific language governing permissions
  ! and limitations under the License.
  !
  ! When distributing Covered Code, include this CDDL HEADER in each
  ! file and include the License file at legal-notices/CDDLv1_0.txt.
  ! If applicable, add the following below this CDDL HEADER, with the
  ! fields enclosed by brackets "[]" replaced with your own identifying
  ! information:
  !      Portions Copyright [yyyy] [name of copyright owner]
  !
  ! CDDL HEADER END
  !
  !
  !      Copyright 2007-2009 Sun Microsystems, Inc.
  !      Portions copyright 2014 ForgeRock AS.
  ! -->
<adm:managed-object name="backend-index" plural-name="backend-indexes"
  package="org.opends.server.admin.std"
  xmlns:adm="http://www.opends.org/admin"
  xmlns:ldap="http://www.opends.org/admin-ldap">
  <adm:synopsis>
    <adm:user-friendly-plural-name />
    are used to store information that makes it possible to locate
    entries very quickly when processing search operations.
  </adm:synopsis>
  <adm:description>
    Indexing is performed on a per-attribute level and different types
    of indexing may be performed for different kinds of attributes, based
    on how they are expected to be accessed during search operations.
  </adm:description>
  <adm:tag name="database" />
  <adm:profile name="ldap">
    <ldap:object-class>
      <ldap:name>ds-cfg-backend-index</ldap:name>
      <ldap:superior>top</ldap:superior>
    </ldap:object-class>
  </adm:profile>
  <adm:property name="attribute" mandatory="true" read-only="true">
    <adm:synopsis>
      Specifies the name of the attribute for which the index is to
      be maintained.
    </adm:synopsis>
    <adm:syntax>
      <adm:attribute-type />
    </adm:syntax>
    <adm:profile name="ldap">
      <ldap:attribute>
        <ldap:name>ds-cfg-attribute</ldap:name>
      </ldap:attribute>
    </adm:profile>
  </adm:property>
  <adm:property name="index-entry-limit">
    <adm:synopsis>
      Specifies the maximum number of entries that are allowed
      to match a given index key before that particular index key is no
      longer maintained.
    </adm:synopsis>
    <adm:description>
      This is analogous to the ALL IDs threshold in the Sun Java System
      Directory Server. If this is specified, its value overrides the JE
      backend-wide configuration. For no limit, use 0 for the value.
    </adm:description>
    <adm:requires-admin-action>
      <adm:other>
        <adm:synopsis>
          If any index keys have already reached this limit, indexes
          must be rebuilt before they will be allowed to use the
          new limit.
        </adm:synopsis>
      </adm:other>
    </adm:requires-admin-action>
    <adm:default-behavior>
      <adm:inherited>
        <adm:relative property-name="index-entry-limit" offset="1"
          managed-object-name="pluggable-backend" />
      </adm:inherited>
    </adm:default-behavior>
    <adm:syntax>
      <adm:integer lower-limit="0" upper-limit="2147483647">
        <adm:unit-synopsis>Number of entries</adm:unit-synopsis>
      </adm:integer>
    </adm:syntax>
    <adm:profile name="ldap">
      <ldap:attribute>
        <ldap:name>ds-cfg-index-entry-limit</ldap:name>
      </ldap:attribute>
    </adm:profile>
  </adm:property>
  <adm:property name="index-type" mandatory="true"
    multi-valued="true">
    <adm:synopsis>
      Specifies the type(s) of indexing that should be performed
      for the associated attribute.
    </adm:synopsis>
    <adm:description>
      For equality, presence, and substring index types, the associated
      attribute type must have a corresponding matching rule.
    </adm:description>
    <adm:requires-admin-action>
      <adm:other>
        <adm:synopsis>
          If any new index types are added for an attribute, and
          values for that attribute already exist in the
          database, the index must be rebuilt before it
          will be accurate.
        </adm:synopsis>
      </adm:other>
    </adm:requires-admin-action>
    <adm:syntax>
      <adm:enumeration>
        <adm:value name="equality">
          <adm:synopsis>
            This index type is used to improve the efficiency
            of searches using equality search filters.
          </adm:synopsis>
        </adm:value>
        <adm:value name="ordering">
          <adm:synopsis>
            This index type is used to improve the efficiency
            of searches using "greater than or equal to" or "less then
            or equal to" search filters.
          </adm:synopsis>
        </adm:value>
        <adm:value name="presence">
          <adm:synopsis>
            This index type is used to improve the efficiency
            of searches using the presence search filters.
          </adm:synopsis>
        </adm:value>
        <adm:value name="substring">
          <adm:synopsis>
            This index type is used to improve the efficiency
            of searches using substring search filters.
          </adm:synopsis>
        </adm:value>
        <adm:value name="approximate">
          <adm:synopsis>
            This index type is used to improve the efficiency
            of searches using approximate matching search filters.
          </adm:synopsis>
        </adm:value>
        <adm:value name="extensible">
         <adm:synopsis>
            This index type is used to improve the efficiency
            of searches using extensible matching search filters.
         </adm:synopsis>
      </adm:value>
      </adm:enumeration>
    </adm:syntax>
    <adm:profile name="ldap">
      <ldap:attribute>
        <ldap:name>ds-cfg-index-type</ldap:name>
      </ldap:attribute>
    </adm:profile>
  </adm:property>
  <adm:property name="substring-length" advanced="true">
    <adm:synopsis>
      The length of substrings in a substring index.
    </adm:synopsis>
    <adm:requires-admin-action>
      <adm:other>
        <adm:synopsis>
          The index must be rebuilt before it will reflect the
          new value.
        </adm:synopsis>
      </adm:other>
    </adm:requires-admin-action>
    <adm:default-behavior>
      <adm:defined>
        <adm:value>6</adm:value>
      </adm:defined>
    </adm:default-behavior>
    <adm:syntax>
      <adm:integer lower-limit="3" />
    </adm:syntax>
    <adm:profile name="ldap">
      <ldap:attribute>
        <ldap:name>ds-cfg-substring-length</ldap:name>
      </ldap:attribute>
    </adm:profile>
  </adm:property>
  <adm:property name="index-extensible-matching-rule" multi-valued="true">
    <adm:synopsis>
      The extensible matching rule in an extensible index.
    </adm:synopsis>
    <adm:description>
      An extensible matching rule must be specified using either LOCALE or OID of the matching rule.
    </adm:description>
    <adm:requires-admin-action>
      <adm:other>
        <adm:synopsis>
          The index must be rebuilt before it will reflect the
          new value.
        </adm:synopsis>
      </adm:other>
    </adm:requires-admin-action>
    <adm:default-behavior>
      <adm:alias>
        <adm:synopsis>
          No extensible matching rules will be indexed.
        </adm:synopsis>
      </adm:alias>
    </adm:default-behavior>
 <adm:syntax>
     <adm:string>
       <adm:pattern>
          <adm:regex>([a-z][a-z](-[A-Z][A-Z]){0,2}(.(([a-z]{2,3})|\\d))?)|(^\\d.((\\d)+.)+\\d$)</adm:regex>
          <adm:usage>LOCALE | OID</adm:usage>
          <adm:synopsis>
            A Locale or an OID.
          </adm:synopsis>
        </adm:pattern>
       </adm:string>
   </adm:syntax>
    <adm:profile name="ldap">
      <ldap:attribute>
        <ldap:name>ds-cfg-index-extensible-matching-rule</ldap:name>
      </ldap:attribute>
    </adm:profile>
  </adm:property>
</adm:managed-object>
opendj3-server-dev/src/admin/defn/org/opends/server/admin/std/BackendVLVIndexConfiguration.xml
New file
@@ -0,0 +1,232 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ! CDDL HEADER START
  !
  ! The contents of this file are subject to the terms of the
  ! Common Development and Distribution License, Version 1.0 only
  ! (the "License").  You may not use this file except in compliance
  ! with the License.
  !
  ! You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
  ! or http://forgerock.org/license/CDDLv1.0.html.
  ! See the License for the specific language governing permissions
  ! and limitations under the License.
  !
  ! When distributing Covered Code, include this CDDL HEADER in each
  ! file and include the License file at legal-notices/CDDLv1_0.txt.
  ! If applicable, add the following below this CDDL HEADER, with the
  ! fields enclosed by brackets "[]" replaced with your own identifying
  ! information:
  !      Portions Copyright [yyyy] [name of copyright owner]
  !
  ! CDDL HEADER END
  !
  !
  !      Copyright 2007-2008 Sun Microsystems, Inc.
  !      Portions copyright 2014 ForgeRock AS.
  ! -->
<adm:managed-object name="backend-vlv-index"
  plural-name="backend-vlv-indexes"
  package="org.opends.server.admin.std"
  xmlns:adm="http://www.opends.org/admin"
  xmlns:ldap="http://www.opends.org/admin-ldap">
  <adm:synopsis>
    <adm:user-friendly-plural-name />
    are used to store information about a specific search request that
    makes it possible to efficiently process them using the VLV control.
  </adm:synopsis>
  <adm:description>
    A VLV index effectively notifies the server that a virtual list
    view, with specific query and sort parameters, will be performed.
    This index also allows the server to collect and maintain the
    information required to make using the virtual list view faster.
  </adm:description>
  <adm:tag name="database" />
  <adm:profile name="ldap">
    <ldap:object-class>
      <ldap:name>ds-cfg-backend-vlv-index</ldap:name>
      <ldap:superior>top</ldap:superior>
    </ldap:object-class>
  </adm:profile>
  <adm:property name="base-dn" mandatory="true">
    <adm:synopsis>
      Specifies the base DN used in the search query that is being
      indexed.
    </adm:synopsis>
    <adm:requires-admin-action>
      <adm:other>
        <adm:synopsis>
          The index must be rebuilt after modifying this
          property.
        </adm:synopsis>
      </adm:other>
    </adm:requires-admin-action>
    <adm:syntax>
      <adm:dn />
    </adm:syntax>
    <adm:profile name="ldap">
      <ldap:attribute>
        <ldap:name>ds-cfg-base-dn</ldap:name>
      </ldap:attribute>
    </adm:profile>
  </adm:property>
  <adm:property name="scope" mandatory="true">
    <adm:synopsis>
      Specifies the LDAP scope of the query that is being indexed.
    </adm:synopsis>
    <adm:requires-admin-action>
      <adm:other>
        <adm:synopsis>
          The index must be rebuilt after modifying this
          property.
        </adm:synopsis>
      </adm:other>
    </adm:requires-admin-action>
    <adm:syntax>
      <adm:enumeration>
        <adm:value name="base-object">
          <adm:synopsis>Search the base object only.</adm:synopsis>
        </adm:value>
        <adm:value name="single-level">
          <adm:synopsis>
            Search the immediate children of the base object but do not
            include any of their descendants or the base object itself.
          </adm:synopsis>
        </adm:value>
        <adm:value name="subordinate-subtree">
          <adm:synopsis>
            Search the entire subtree below the base object but do not
            include the base object itself.
          </adm:synopsis>
        </adm:value>
        <adm:value name="whole-subtree">
          <adm:synopsis>
            Search the base object and the entire subtree below the base
            object.
          </adm:synopsis>
        </adm:value>
      </adm:enumeration>
    </adm:syntax>
    <adm:profile name="ldap">
      <ldap:attribute>
        <ldap:name>ds-cfg-scope</ldap:name>
      </ldap:attribute>
    </adm:profile>
  </adm:property>
  <adm:property name="filter" mandatory="true">
    <adm:synopsis>
      Specifies the LDAP filter used in the query that is being indexed.
    </adm:synopsis>
    <adm:requires-admin-action>
      <adm:other>
        <adm:synopsis>
          The index must be rebuilt after modifying this
          property.
        </adm:synopsis>
      </adm:other>
    </adm:requires-admin-action>
    <adm:syntax>
      <adm:string>
        <adm:pattern>
        <adm:regex>.*</adm:regex>
        <adm:usage>STRING</adm:usage>
          <adm:synopsis>
            A valid LDAP search filter.
          </adm:synopsis>
        </adm:pattern>
      </adm:string>
    </adm:syntax>
    <adm:profile name="ldap">
      <ldap:attribute>
        <ldap:name>ds-cfg-filter</ldap:name>
      </ldap:attribute>
    </adm:profile>
  </adm:property>
  <adm:property name="sort-order" mandatory="true">
    <adm:synopsis>
      Specifies the names of the attributes that are used to sort the
      entries for the query being indexed.
    </adm:synopsis>
    <adm:description>
      Multiple attributes can be used to determine the sort order by
      listing the attribute names from highest to lowest precedence.
      Optionally, + or - can be prefixed to the attribute name to sort
      the attribute in ascending order or descending order respectively.
    </adm:description>
    <adm:requires-admin-action>
      <adm:other>
        <adm:synopsis>
          The index must be rebuilt after modifying this
          property.
        </adm:synopsis>
      </adm:other>
    </adm:requires-admin-action>
    <adm:syntax>
      <adm:string>
        <adm:pattern>
        <adm:regex>.*</adm:regex>
        <adm:usage>STRING</adm:usage>
          <adm:synopsis>
            Valid attribute types defined in the schema, separated by a
            space and optionally prefixed by + or -.
          </adm:synopsis>
        </adm:pattern>
      </adm:string>
    </adm:syntax>
    <adm:profile name="ldap">
      <ldap:attribute>
        <ldap:name>ds-cfg-sort-order</ldap:name>
      </ldap:attribute>
    </adm:profile>
  </adm:property>
  <adm:property name="name" mandatory="true" read-only="true">
    <adm:synopsis>
      Specifies a unique name for this VLV index.
    </adm:synopsis>
    <adm:requires-admin-action>
      <adm:none>
        <adm:synopsis>
          The VLV index name cannot be altered after the index is created.
        </adm:synopsis>
      </adm:none>
    </adm:requires-admin-action>
    <adm:syntax>
      <adm:string />
    </adm:syntax>
    <adm:profile name="ldap">
      <ldap:attribute>
        <ldap:name>ds-cfg-name</ldap:name>
      </ldap:attribute>
    </adm:profile>
  </adm:property>
  <adm:property name="max-block-size" read-only="true"
    advanced="true">
    <adm:synopsis>
      Specifies the number of entry IDs to store in a single sorted
      set before it must be split.
    </adm:synopsis>
    <adm:requires-admin-action>
      <adm:none>
        <adm:synopsis>
          The blocks are resized lazily the next time the index is
          modified.
        </adm:synopsis>
      </adm:none>
    </adm:requires-admin-action>
    <adm:default-behavior>
      <adm:defined>
        <adm:value>4000</adm:value>
      </adm:defined>
    </adm:default-behavior>
    <adm:syntax>
      <adm:integer>
        <adm:unit-synopsis>Number of entry IDs</adm:unit-synopsis>
      </adm:integer>
    </adm:syntax>
    <adm:profile name="ldap">
      <ldap:attribute>
        <ldap:name>ds-cfg-max-block-size</ldap:name>
      </ldap:attribute>
    </adm:profile>
  </adm:property>
</adm:managed-object>
opendj3-server-dev/src/admin/defn/org/opends/server/admin/std/PluggableBackendConfiguration.xml
@@ -39,8 +39,8 @@
      <ldap:superior>ds-cfg-backend</ldap:superior>
    </ldap:object-class>
  </adm:profile>
  <adm:relation name="backend-index" managed-object-name="local-db-index">
    <adm:one-to-many naming-property="attribute" plural-name="backend-indexes">
  <adm:relation name="backend-index">
    <adm:one-to-many naming-property="attribute">
      <adm:default-managed-object name="aci">
        <adm:property name="index-type">
          <adm:value>presence</adm:value>
@@ -93,8 +93,8 @@
      </cli:relation>
    </adm:profile>
  </adm:relation>
  <adm:relation name="backend-vlv-index" managed-object-name="local-db-vlv-index">
    <adm:one-to-many naming-property="name" plural-name="backend-vlv-indexes"/>
  <adm:relation name="backend-vlv-index">
    <adm:one-to-many naming-property="name"/>
    <adm:profile name="ldap">
      <ldap:rdn-sequence>cn=VLV Index</ldap:rdn-sequence>
    </adm:profile>
opendj3-server-dev/src/admin/messages/BackendIndexCfgDefn.properties
New file
@@ -0,0 +1,24 @@
user-friendly-name=Backend Index
user-friendly-plural-name=Backend Indexes
synopsis=Backend Indexes are used to store information that makes it possible to locate entries very quickly when processing search operations.
description=Indexing is performed on a per-attribute level and different types of indexing may be performed for different kinds of attributes, based on how they are expected to be accessed during search operations.
property.attribute.synopsis=Specifies the name of the attribute for which the index is to be maintained.
property.index-entry-limit.synopsis=Specifies the maximum number of entries that are allowed to match a given index key before that particular index key is no longer maintained.
property.index-entry-limit.description=This is analogous to the ALL IDs threshold in the Sun Java System Directory Server. If this is specified, its value overrides the JE backend-wide configuration. For no limit, use 0 for the value.
property.index-entry-limit.requires-admin-action.synopsis=If any index keys have already reached this limit, indexes must be rebuilt before they will be allowed to use the new limit.
property.index-extensible-matching-rule.synopsis=The extensible matching rule in an extensible index.
property.index-extensible-matching-rule.description=An extensible matching rule must be specified using either LOCALE or OID of the matching rule.
property.index-extensible-matching-rule.default-behavior.alias.synopsis=No extensible matching rules will be indexed.
property.index-extensible-matching-rule.requires-admin-action.synopsis=The index must be rebuilt before it will reflect the new value.
property.index-extensible-matching-rule.syntax.string.pattern.synopsis=A Locale or an OID.
property.index-type.synopsis=Specifies the type(s) of indexing that should be performed for the associated attribute.
property.index-type.description=For equality, presence, and substring index types, the associated attribute type must have a corresponding matching rule.
property.index-type.requires-admin-action.synopsis=If any new index types are added for an attribute, and values for that attribute already exist in the database, the index must be rebuilt before it will be accurate.
property.index-type.syntax.enumeration.value.approximate.synopsis=This index type is used to improve the efficiency of searches using approximate matching search filters.
property.index-type.syntax.enumeration.value.equality.synopsis=This index type is used to improve the efficiency of searches using equality search filters.
property.index-type.syntax.enumeration.value.extensible.synopsis=This index type is used to improve the efficiency of searches using extensible matching search filters.
property.index-type.syntax.enumeration.value.ordering.synopsis=This index type is used to improve the efficiency of searches using "greater than or equal to" or "less then or equal to" search filters.
property.index-type.syntax.enumeration.value.presence.synopsis=This index type is used to improve the efficiency of searches using the presence search filters.
property.index-type.syntax.enumeration.value.substring.synopsis=This index type is used to improve the efficiency of searches using substring search filters.
property.substring-length.synopsis=The length of substrings in a substring index.
property.substring-length.requires-admin-action.synopsis=The index must be rebuilt before it will reflect the new value.
opendj3-server-dev/src/admin/messages/BackendVLVIndexCfgDefn.properties
New file
@@ -0,0 +1,23 @@
user-friendly-name=Backend VLV Index
user-friendly-plural-name=Backend VLV Indexes
synopsis=Backend VLV Indexes are used to store information about a specific search request that makes it possible to efficiently process them using the VLV control.
description=A VLV index effectively notifies the server that a virtual list view, with specific query and sort parameters, will be performed. This index also allows the server to collect and maintain the information required to make using the virtual list view faster.
property.base-dn.synopsis=Specifies the base DN used in the search query that is being indexed.
property.base-dn.requires-admin-action.synopsis=The index must be rebuilt after modifying this property.
property.filter.synopsis=Specifies the LDAP filter used in the query that is being indexed.
property.filter.requires-admin-action.synopsis=The index must be rebuilt after modifying this property.
property.filter.syntax.string.pattern.synopsis=A valid LDAP search filter.
property.max-block-size.synopsis=Specifies the number of entry IDs to store in a single sorted set before it must be split.
property.max-block-size.requires-admin-action.synopsis=The blocks are resized lazily the next time the index is modified.
property.name.synopsis=Specifies a unique name for this VLV index.
property.name.requires-admin-action.synopsis=The VLV index name cannot be altered after the index is created.
property.scope.synopsis=Specifies the LDAP scope of the query that is being indexed.
property.scope.requires-admin-action.synopsis=The index must be rebuilt after modifying this property.
property.scope.syntax.enumeration.value.base-object.synopsis=Search the base object only.
property.scope.syntax.enumeration.value.single-level.synopsis=Search the immediate children of the base object but do not include any of their descendants or the base object itself.
property.scope.syntax.enumeration.value.subordinate-subtree.synopsis=Search the entire subtree below the base object but do not include the base object itself.
property.scope.syntax.enumeration.value.whole-subtree.synopsis=Search the base object and the entire subtree below the base object.
property.sort-order.synopsis=Specifies the names of the attributes that are used to sort the entries for the query being indexed.
property.sort-order.description=Multiple attributes can be used to determine the sort order by listing the attribute names from highest to lowest precedence. Optionally, + or - can be prefixed to the attribute name to sort the attribute in ascending order or descending order respectively.
property.sort-order.requires-admin-action.synopsis=The index must be rebuilt after modifying this property.
property.sort-order.syntax.string.pattern.synopsis=Valid attribute types defined in the schema, separated by a space and optionally prefixed by + or -.
opendj3-server-dev/src/admin/messages/PersistitBackendCfgDefn.properties
@@ -47,9 +47,9 @@
property.writability-mode.syntax.enumeration.value.internal-only.synopsis=Causes external write attempts to fail but allows writes by replication and internal operations.
relation.backend-index.user-friendly-name=Backend Index
relation.backend-index.user-friendly-plural-name=Backend Indexes
relation.backend-index.synopsis=Local DB Indexes are used to store information that makes it possible to locate entries very quickly when processing search operations.
relation.backend-index.synopsis=Backend Indexes are used to store information that makes it possible to locate entries very quickly when processing search operations.
relation.backend-index.description=Indexing is performed on a per-attribute level and different types of indexing may be performed for different kinds of attributes, based on how they are expected to be accessed during search operations.
relation.backend-vlv-index.user-friendly-name=Backend VLV Index
relation.backend-vlv-index.user-friendly-plural-name=Backend VLV Indexes
relation.backend-vlv-index.synopsis=Local DB VLV Indexes are used to store information about a specific search request that makes it possible to efficiently process them using the VLV control.
relation.backend-vlv-index.synopsis=Backend VLV Indexes are used to store information about a specific search request that makes it possible to efficiently process them using the VLV control.
relation.backend-vlv-index.description=A VLV index effectively notifies the server that a virtual list view, with specific query and sort parameters, will be performed. This index also allows the server to collect and maintain the information required to make using the virtual list view faster.
opendj3-server-dev/src/admin/messages/PluggableBackendCfgDefn.properties
@@ -32,9 +32,9 @@
property.writability-mode.syntax.enumeration.value.internal-only.synopsis=Causes external write attempts to fail but allows writes by replication and internal operations.
relation.backend-index.user-friendly-name=Backend Index
relation.backend-index.user-friendly-plural-name=Backend Indexes
relation.backend-index.synopsis=Local DB Indexes are used to store information that makes it possible to locate entries very quickly when processing search operations.
relation.backend-index.synopsis=Backend Indexes are used to store information that makes it possible to locate entries very quickly when processing search operations.
relation.backend-index.description=Indexing is performed on a per-attribute level and different types of indexing may be performed for different kinds of attributes, based on how they are expected to be accessed during search operations.
relation.backend-vlv-index.user-friendly-name=Backend VLV Index
relation.backend-vlv-index.user-friendly-plural-name=Backend VLV Indexes
relation.backend-vlv-index.synopsis=Local DB VLV Indexes are used to store information about a specific search request that makes it possible to efficiently process them using the VLV control.
relation.backend-vlv-index.synopsis=Backend VLV Indexes are used to store information about a specific search request that makes it possible to efficiently process them using the VLV control.
relation.backend-vlv-index.description=A VLV index effectively notifies the server that a virtual list view, with specific query and sort parameters, will be performed. This index also allows the server to collect and maintain the information required to make using the virtual list view faster.
opendj3-server-dev/src/server/org/opends/server/backends/pluggable/AttributeIndex.java
@@ -42,8 +42,8 @@
import org.forgerock.opendj.ldap.spi.IndexingOptions;
import org.forgerock.util.Utils;
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.meta.LocalDBIndexCfgDefn.IndexType;
import org.opends.server.admin.std.server.LocalDBIndexCfg;
import org.opends.server.admin.std.meta.BackendIndexCfgDefn.IndexType;
import org.opends.server.admin.std.server.BackendIndexCfg;
import org.opends.server.backends.pluggable.spi.StorageRuntimeException;
import org.opends.server.backends.pluggable.spi.TreeName;
import org.opends.server.backends.pluggable.spi.WriteOperation;
@@ -69,7 +69,7 @@
 * then we would not need a separate ordering index.
 */
public class AttributeIndex
    implements ConfigurationChangeListener<LocalDBIndexCfg>, Closeable
    implements ConfigurationChangeListener<BackendIndexCfg>, Closeable
{
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
@@ -114,7 +114,7 @@
  private final EntryContainer entryContainer;
  /** The attribute index configuration. */
  private LocalDBIndexCfg indexConfig;
  private BackendIndexCfg indexConfig;
  /** The mapping from names to indexes. */
  private final Map<String, Index> nameToIndexes = new HashMap<String, Index>();
@@ -132,7 +132,7 @@
   * @param entryContainer The entryContainer of this attribute index.
   * @throws ConfigException if a configuration related error occurs.
   */
  public AttributeIndex(LocalDBIndexCfg indexConfig, EntryContainer entryContainer, WriteableStorage txn) throws ConfigException
  public AttributeIndex(BackendIndexCfg indexConfig, EntryContainer entryContainer, WriteableStorage txn) throws ConfigException
  {
    this.entryContainer = entryContainer;
    this.indexConfig = indexConfig;
@@ -158,7 +158,7 @@
    }
  }
  private Index newPresenceIndex(WriteableStorage txn, LocalDBIndexCfg cfg)
  private Index newPresenceIndex(WriteableStorage txn, BackendIndexCfg cfg)
  {
    final AttributeType attrType = cfg.getAttribute();
    final TreeName indexName = getIndexName(attrType, IndexType.PRESENCE.toString());
@@ -239,7 +239,7 @@
    }
  }
  private Index newAttributeIndex(WriteableStorage txn, LocalDBIndexCfg indexConfig,
  private Index newAttributeIndex(WriteableStorage txn, BackendIndexCfg indexConfig,
      org.forgerock.opendj.ldap.spi.Indexer indexer)
  {
    final AttributeType attrType = indexConfig.getAttribute();
@@ -301,7 +301,7 @@
   * Get the JE index configuration used by this index.
   * @return The configuration in effect.
   */
  public LocalDBIndexCfg getConfiguration()
  public BackendIndexCfg getConfiguration()
  {
    return indexConfig;
  }
@@ -597,7 +597,7 @@
  /** {@inheritDoc} */
  @Override
  public synchronized boolean isConfigurationChangeAcceptable(
      LocalDBIndexCfg cfg, List<LocalizableMessage> unacceptableReasons)
      BackendIndexCfg cfg, List<LocalizableMessage> unacceptableReasons)
  {
    if (!isIndexAcceptable(cfg, IndexType.EQUALITY, unacceptableReasons)
        || !isIndexAcceptable(cfg, IndexType.SUBSTRING, unacceptableReasons)
@@ -620,7 +620,7 @@
    return true;
  }
  private boolean isIndexAcceptable(LocalDBIndexCfg cfg, IndexType indexType,
  private boolean isIndexAcceptable(BackendIndexCfg cfg, IndexType indexType,
      List<LocalizableMessage> unacceptableReasons)
  {
    final String indexId = indexType.toString();
@@ -637,7 +637,7 @@
  /** {@inheritDoc} */
  @Override
  public synchronized ConfigChangeResult applyConfigurationChange(final LocalDBIndexCfg cfg)
  public synchronized ConfigChangeResult applyConfigurationChange(final BackendIndexCfg cfg)
  {
    final ConfigChangeResult ccr = new ConfigChangeResult();
    try
@@ -667,7 +667,7 @@
    return ccr;
  }
  private void applyChangeToExtensibleIndexes(WriteableStorage txn, LocalDBIndexCfg cfg, ConfigChangeResult ccr)
  private void applyChangeToExtensibleIndexes(WriteableStorage txn, BackendIndexCfg cfg, ConfigChangeResult ccr)
  {
    final AttributeType attrType = cfg.getAttribute();
    if (!cfg.getIndexType().contains(IndexType.EXTENSIBLE))
@@ -775,7 +775,7 @@
    return rules;
  }
  private void applyChangeToIndex(WriteableStorage txn, IndexType indexType, LocalDBIndexCfg cfg, ConfigChangeResult ccr)
  private void applyChangeToIndex(WriteableStorage txn, IndexType indexType, BackendIndexCfg cfg, ConfigChangeResult ccr)
  {
    String indexId = indexType.toString();
    Index index = nameToIndexes.get(indexId);
@@ -806,7 +806,7 @@
    }
  }
  private void applyChangeToPresenceIndex(WriteableStorage txn, LocalDBIndexCfg cfg, ConfigChangeResult ccr)
  private void applyChangeToPresenceIndex(WriteableStorage txn, BackendIndexCfg cfg, ConfigChangeResult ccr)
  {
    final IndexType indexType = IndexType.PRESENCE;
    final String indexID = indexType.toString();
opendj3-server-dev/src/server/org/opends/server/backends/pluggable/BackendImpl.java
@@ -39,7 +39,7 @@
import org.forgerock.opendj.ldap.ResultCode;
import org.forgerock.util.Reject;
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.meta.LocalDBIndexCfgDefn;
import org.opends.server.admin.std.meta.BackendIndexCfgDefn;
import org.opends.server.admin.std.server.PersistitBackendCfg;
import org.opends.server.api.AlertGenerator;
import org.opends.server.api.Backend;
@@ -264,28 +264,28 @@
        return false;
      }
      Set<LocalDBIndexCfgDefn.IndexType> indexTypes =
      Set<BackendIndexCfgDefn.IndexType> indexTypes =
           ai.getConfiguration().getIndexType();
      switch (indexType)
      {
        case PRESENCE:
          return indexTypes.contains(LocalDBIndexCfgDefn.IndexType.PRESENCE);
          return indexTypes.contains(BackendIndexCfgDefn.IndexType.PRESENCE);
        case EQUALITY:
          return indexTypes.contains(LocalDBIndexCfgDefn.IndexType.EQUALITY);
          return indexTypes.contains(BackendIndexCfgDefn.IndexType.EQUALITY);
        case SUBSTRING:
        case SUBINITIAL:
        case SUBANY:
        case SUBFINAL:
          return indexTypes.contains(LocalDBIndexCfgDefn.IndexType.SUBSTRING);
          return indexTypes.contains(BackendIndexCfgDefn.IndexType.SUBSTRING);
        case GREATER_OR_EQUAL:
        case LESS_OR_EQUAL:
          return indexTypes.contains(LocalDBIndexCfgDefn.IndexType.ORDERING);
          return indexTypes.contains(BackendIndexCfgDefn.IndexType.ORDERING);
        case APPROXIMATE:
          return indexTypes.contains(LocalDBIndexCfgDefn.IndexType.APPROXIMATE);
          return indexTypes.contains(BackendIndexCfgDefn.IndexType.APPROXIMATE);
        default:
          return false;
opendj3-server-dev/src/server/org/opends/server/backends/pluggable/EntryContainer.java
@@ -49,8 +49,8 @@
import org.opends.server.admin.server.ConfigurationAddListener;
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.server.ConfigurationDeleteListener;
import org.opends.server.admin.std.server.LocalDBIndexCfg;
import org.opends.server.admin.std.server.LocalDBVLVIndexCfg;
import org.opends.server.admin.std.server.BackendIndexCfg;
import org.opends.server.admin.std.server.BackendVLVIndexCfg;
import org.opends.server.admin.std.server.PersistitBackendCfg;
import org.opends.server.api.Backend;
import org.opends.server.api.ClientConnection;
@@ -175,12 +175,12 @@
   * indexes used within this entry container.
   */
  private class AttributeJEIndexCfgManager implements
  ConfigurationAddListener<LocalDBIndexCfg>,
  ConfigurationDeleteListener<LocalDBIndexCfg>
  ConfigurationAddListener<BackendIndexCfg>,
  ConfigurationDeleteListener<BackendIndexCfg>
  {
    /** {@inheritDoc} */
    @Override
    public boolean isConfigurationAddAcceptable(final LocalDBIndexCfg cfg, List<LocalizableMessage> unacceptableReasons)
    public boolean isConfigurationAddAcceptable(final BackendIndexCfg cfg, List<LocalizableMessage> unacceptableReasons)
    {
      try
      {
@@ -206,7 +206,7 @@
    /** {@inheritDoc} */
    @Override
    public ConfigChangeResult applyConfigurationAdd(final LocalDBIndexCfg cfg)
    public ConfigChangeResult applyConfigurationAdd(final BackendIndexCfg cfg)
    {
      final ConfigChangeResult ccr = new ConfigChangeResult();
      try
@@ -238,7 +238,7 @@
    /** {@inheritDoc} */
    @Override
    public boolean isConfigurationDeleteAcceptable(
        LocalDBIndexCfg cfg, List<LocalizableMessage> unacceptableReasons)
        BackendIndexCfg cfg, List<LocalizableMessage> unacceptableReasons)
    {
      // TODO: validate more before returning true?
      return true;
@@ -246,7 +246,7 @@
    /** {@inheritDoc} */
    @Override
    public ConfigChangeResult applyConfigurationDelete(final LocalDBIndexCfg cfg)
    public ConfigChangeResult applyConfigurationDelete(final BackendIndexCfg cfg)
    {
      final ConfigChangeResult ccr = new ConfigChangeResult();
@@ -283,13 +283,13 @@
   * used within this entry container.
   */
  private class VLVJEIndexCfgManager implements
  ConfigurationAddListener<LocalDBVLVIndexCfg>,
  ConfigurationDeleteListener<LocalDBVLVIndexCfg>
  ConfigurationAddListener<BackendVLVIndexCfg>,
  ConfigurationDeleteListener<BackendVLVIndexCfg>
  {
    /** {@inheritDoc} */
    @Override
    public boolean isConfigurationAddAcceptable(
        LocalDBVLVIndexCfg cfg, List<LocalizableMessage> unacceptableReasons)
        BackendVLVIndexCfg cfg, List<LocalizableMessage> unacceptableReasons)
    {
      try
      {
@@ -350,7 +350,7 @@
    /** {@inheritDoc} */
    @Override
    public ConfigChangeResult applyConfigurationAdd(final LocalDBVLVIndexCfg cfg)
    public ConfigChangeResult applyConfigurationAdd(final BackendVLVIndexCfg cfg)
    {
      final ConfigChangeResult ccr = new ConfigChangeResult();
      try
@@ -381,7 +381,7 @@
    /** {@inheritDoc} */
    @Override
    public boolean isConfigurationDeleteAcceptable(LocalDBVLVIndexCfg cfg, List<LocalizableMessage> unacceptableReasons)
    public boolean isConfigurationDeleteAcceptable(BackendVLVIndexCfg cfg, List<LocalizableMessage> unacceptableReasons)
    {
      // TODO: validate more before returning true?
      return true;
@@ -389,7 +389,7 @@
    /** {@inheritDoc} */
    @Override
    public ConfigChangeResult applyConfigurationDelete(final LocalDBVLVIndexCfg cfg)
    public ConfigChangeResult applyConfigurationDelete(final BackendVLVIndexCfg cfg)
    {
      final ConfigChangeResult ccr = new ConfigChangeResult();
      exclusiveLock.lock();
@@ -517,7 +517,7 @@
      for (String idx : config.listBackendIndexes())
      {
        LocalDBIndexCfg indexCfg = config.getBackendIndex(idx);
        BackendIndexCfg indexCfg = config.getBackendIndex(idx);
        AttributeIndex index = new AttributeIndex(indexCfg, this, txn);
        index.open(txn);
@@ -530,7 +530,7 @@
      for (String idx : config.listBackendVLVIndexes())
      {
        LocalDBVLVIndexCfg vlvIndexCfg = config.getBackendVLVIndex(idx);
        BackendVLVIndexCfg vlvIndexCfg = config.getBackendVLVIndex(idx);
        VLVIndex vlvIndex = new VLVIndex(vlvIndexCfg, state, storage, this, txn);
        vlvIndex.open(txn);
opendj3-server-dev/src/server/org/opends/server/backends/pluggable/VLVIndex.java
@@ -44,8 +44,8 @@
import org.forgerock.opendj.ldap.SearchScope.Enum;
import org.forgerock.opendj.ldap.schema.MatchingRule;
import org.opends.server.admin.server.ConfigurationChangeListener;
import org.opends.server.admin.std.meta.LocalDBVLVIndexCfgDefn.Scope;
import org.opends.server.admin.std.server.LocalDBVLVIndexCfg;
import org.opends.server.admin.std.meta.BackendVLVIndexCfgDefn.Scope;
import org.opends.server.admin.std.server.BackendVLVIndexCfg;
import org.opends.server.backends.pluggable.spi.Cursor;
import org.opends.server.backends.pluggable.spi.ReadableStorage;
import org.opends.server.backends.pluggable.spi.Storage;
@@ -85,7 +85,7 @@
 * to its own key.
 */
public class VLVIndex extends DatabaseContainer
    implements ConfigurationChangeListener<LocalDBVLVIndexCfg>
    implements ConfigurationChangeListener<BackendVLVIndexCfg>
{
  private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass();
@@ -109,7 +109,7 @@
  private boolean rebuildRunning;
  /** The VLV vlvIndex configuration. */
  private LocalDBVLVIndexCfg config;
  private BackendVLVIndexCfg config;
  private DN baseDN;
  private SearchFilter filter;
@@ -129,7 +129,7 @@
   * @throws ConfigException if a error occurs while reading the VLV index
   * configuration
   */
  public VLVIndex(LocalDBVLVIndexCfg config, State state, Storage env,
  public VLVIndex(BackendVLVIndexCfg config, State state, Storage env,
                  EntryContainer entryContainer, ReadableStorage txn)
      throws StorageRuntimeException, ConfigException
  {
@@ -1197,7 +1197,7 @@
  /** {@inheritDoc} */
  @Override
  public synchronized boolean isConfigurationChangeAcceptable(
      LocalDBVLVIndexCfg cfg,
      BackendVLVIndexCfg cfg,
      List<LocalizableMessage> unacceptableReasons)
  {
    try
@@ -1257,7 +1257,7 @@
  /** {@inheritDoc} */
  @Override
  public synchronized ConfigChangeResult applyConfigurationChange(final LocalDBVLVIndexCfg cfg)
  public synchronized ConfigChangeResult applyConfigurationChange(final BackendVLVIndexCfg cfg)
  {
    try
    {
@@ -1278,7 +1278,7 @@
    }
  }
  private synchronized void applyConfigurationChange0(WriteableStorage txn, LocalDBVLVIndexCfg cfg,
  private synchronized void applyConfigurationChange0(WriteableStorage txn, BackendVLVIndexCfg cfg,
      ConfigChangeResult ccr)
  {
    // Update base DN only if changed..