From 2fe585593bd3b3ca68064e5df4e6ee6eb210a66a Mon Sep 17 00:00:00 2001
From: Ludovic Poitou <ludovic.poitou@forgerock.com>
Date: Tue, 29 May 2012 12:05:52 +0000
Subject: [PATCH] Fix OPENDJ-508 - Searches that rely on searchable virtual attribute may be slow. For those searchable virtual attributes that can be faster than indexing (like when always matching a single entry), we process them before indexes. For the others, we fall back to them when indexes are not enough. Changes include a little bit of tidy up of comments and IDE warnings.

---
 opends/src/server/org/opends/server/extensions/SubschemaSubentryVirtualAttributeProvider.java |   15 ++++-----------
 1 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/opends/src/server/org/opends/server/extensions/SubschemaSubentryVirtualAttributeProvider.java b/opends/src/server/org/opends/server/extensions/SubschemaSubentryVirtualAttributeProvider.java
index 1a0f0be..1318873 100644
--- a/opends/src/server/org/opends/server/extensions/SubschemaSubentryVirtualAttributeProvider.java
+++ b/opends/src/server/org/opends/server/extensions/SubschemaSubentryVirtualAttributeProvider.java
@@ -23,6 +23,7 @@
  *
  *
  *      Copyright 2006-2010 Sun Microsystems, Inc.
+ *      Portions Copyright 2012 ForgeRock AS
  */
 package org.opends.server.extensions;
 
@@ -168,20 +169,12 @@
 
 
   /**
-   * {@inheritDoc}.  This virtual attribute will support search operations only
-   * if one of the following is true about the search filter:
-   * <UL>
-   *   <LI>It is an equality filter targeting the associated attribute
-   *       type.</LI>
-   *   <LI>It is an AND filter in which at least one of the components is an
-   *       equality filter targeting the associated attribute type.</LI>
-   *   <LI>It is an OR filter in which all of the components are equality
-   *       filters targeting the associated attribute type.</LI>
-   * </UL>
+   * {@inheritDoc}
    */
   @Override()
   public boolean isSearchable(VirtualAttributeRule rule,
-                              SearchOperation searchOperation)
+                              SearchOperation searchOperation,
+                              boolean isPreIndexed)
   {
     // This attribute is not searchable, since it will have the same value in
     // tons of entries.

--
Gitblit v1.10.0