You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2011/07/01 14:41:37 UTC

svn commit: r1141918 - in /directory/apacheds/branches/apacheds-no-reverse-index/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl: DefaultOptimizer.java DefaultSearchEngine.java

Author: elecharny
Date: Fri Jul  1 12:41:36 2011
New Revision: 1141918

URL: http://svn.apache.org/viewvc?rev=1141918&view=rev
Log:
o Minor refactoring
o Removed aliases handling

Modified:
    directory/apacheds/branches/apacheds-no-reverse-index/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultOptimizer.java
    directory/apacheds/branches/apacheds-no-reverse-index/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java

Modified: directory/apacheds/branches/apacheds-no-reverse-index/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultOptimizer.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-no-reverse-index/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultOptimizer.java?rev=1141918&r1=1141917&r2=1141918&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-no-reverse-index/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultOptimizer.java (original)
+++ directory/apacheds/branches/apacheds-no-reverse-index/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultOptimizer.java Fri Jul  1 12:41:36 2011
@@ -278,6 +278,7 @@ public class DefaultOptimizer<E, ID exte
         if ( store.hasIndexOn( node.getAttributeType() ) )
         {
             Index<V, E, ID> idx = ( Index<V, E, ID> ) store.getIndex( node.getAttributeType() );
+            
             return idx.count( node.getValue().getValue() );
         }
 
@@ -301,6 +302,7 @@ public class DefaultOptimizer<E, ID exte
         if ( store.hasIndexOn( node.getAttributeType() ) )
         {
             Index<V, E, ID> idx = ( Index<V, E, ID> ) store.getIndex( node.getAttributeType() );
+            
             if ( isGreaterThan )
             {
                 return idx.greaterThanCount( node.getValue().getValue() );
@@ -330,6 +332,7 @@ public class DefaultOptimizer<E, ID exte
         if ( store.hasIndexOn( node.getAttributeType() ) )
         {
             Index<?, ?, ?> idx = store.getIndex( node.getAttributeType() );
+            
             return idx.count();
         }
 
@@ -350,6 +353,7 @@ public class DefaultOptimizer<E, ID exte
         if ( store.hasUserIndexOn( node.getAttributeType() ) )
         {
             Index<String, E, ID> idx = store.getPresenceIndex();
+            
             return idx.count( node.getAttributeType().getOid() );
         }
         else if ( store.hasSystemIndexOn( node.getAttributeType() ) )

Modified: directory/apacheds/branches/apacheds-no-reverse-index/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-no-reverse-index/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java?rev=1141918&r1=1141917&r2=1141918&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-no-reverse-index/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java (original)
+++ directory/apacheds/branches/apacheds-no-reverse-index/xdbm-partition/src/main/java/org/apache/directory/server/xdbm/search/impl/DefaultSearchEngine.java Fri Jul  1 12:41:36 2011
@@ -118,31 +118,13 @@ public class DefaultSearchEngine<ID exte
             }
         }
 
-        String aliasedBase = db.getAliasIndex().reverseLookup( baseId );
-
-        // --------------------------------------------------------------------
-        // Determine the effective base with aliases
-        // --------------------------------------------------------------------
-
-        /*
-         * If the base is not an alias or if alias dereferencing does not
-         * occur on finding the base then we set the effective base to the
-         * given base.
-         */
-        if ( ( null == aliasedBase ) || !aliasDerefMode.isDerefFindingBase() )
-        {
-            effectiveBase = base;
-        }
+        effectiveBase = base;
 
         /*
          * If the base is an alias and alias dereferencing does occur on
          * finding the base then we set the effective base to the alias target
          * got from the alias index.
          */
-        else
-        {
-            effectiveBase = new Dn( aliasedBase );
-        }
 
         // --------------------------------------------------------------------
         // Specifically Handle Object Level Scope