You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by tr...@apache.org on 2005/06/20 19:34:46 UTC

svn commit: r191518 - /directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/DefaultContextPartitionNexus.java

Author: trustin
Date: Mon Jun 20 10:34:45 2005
New Revision: 191518

URL: http://svn.apache.org/viewcvs?rev=191518&view=rev
Log:
Fixed: attribute types that must be indexed were not indexed.

Modified:
    directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/DefaultContextPartitionNexus.java

Modified: directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/DefaultContextPartitionNexus.java
URL: http://svn.apache.org/viewcvs/directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/DefaultContextPartitionNexus.java?rev=191518&r1=191517&r2=191518&view=diff
==============================================================================
--- directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/DefaultContextPartitionNexus.java (original)
+++ directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/DefaultContextPartitionNexus.java Mon Jun 20 10:34:45 2005
@@ -143,7 +143,26 @@
             {
                 cfg = ( ContextPartitionConfiguration ) i.next();
                 ContextPartition partition = cfg.getContextPartition();
-                partition.init( factoryCfg, cfg );
+                
+                // Turn on default indices
+                MutableContextPartitionConfiguration mcfg =
+                    new MutableContextPartitionConfiguration();
+                mcfg.setName( cfg.getName() );
+                mcfg.setSuffix( cfg.getSuffix() );
+                mcfg.setContextEntry( cfg.getContextEntry() );
+                mcfg.setContextPartition( partition );
+                
+                Set indexedAttrs = cfg.getIndexedAttributes();
+                indexedAttrs.add( Oid.ALIAS );
+                indexedAttrs.add( Oid.EXISTANCE );
+                indexedAttrs.add( Oid.HIERARCHY );
+                indexedAttrs.add( Oid.NDN );
+                indexedAttrs.add( Oid.ONEALIAS );
+                indexedAttrs.add( Oid.SUBALIAS );
+                indexedAttrs.add( Oid.UPDN );
+                mcfg.setIndexedAttributes( indexedAttrs );
+                
+                partition.init( factoryCfg, mcfg );
                 initializedPartitions.add( 0, partition );
                 register( partition );
             }