directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trus...@apache.org
Subject svn commit: r191518 - /directory/apacheds/branches/db_refactor/core/src/main/java/org/apache/ldap/server/partition/DefaultContextPartitionNexus.java
Date Mon, 20 Jun 2005 17:34:46 GMT
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 );
             }



Mime
View raw message