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/api/VirtualAttributeProvider.java | 22 ++++++++++++----------
1 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/opends/src/server/org/opends/server/api/VirtualAttributeProvider.java b/opends/src/server/org/opends/server/api/VirtualAttributeProvider.java
index 65bbe41..8e9fbfe 100644
--- a/opends/src/server/org/opends/server/api/VirtualAttributeProvider.java
+++ b/opends/src/server/org/opends/server/api/VirtualAttributeProvider.java
@@ -23,6 +23,7 @@
*
*
* Copyright 2006-2009 Sun Microsystems, Inc.
+ * Portions Copyright 2012 ForgeRock AS
*/
package org.opends.server.api;
import org.opends.messages.Message;
@@ -633,18 +634,19 @@
* Indicates whether this attribute may be included in search
* filters as part of the criteria for locating entries.
*
- * @param rule The virtual attribute rule which defines
- * the constraints for the virtual
- * attribute.
- * @param searchOperation The search operation for which to make
- * the determination.
- *
- * @return {@code true} if this attribute may be included in search
- * filters, or {@code false} if not.
+ * @param rule The virtual attribute rule which defines
+ * the constraints for the virtual
+ * attribute.
+ * @param searchOperation The search operation for which to make
+ * the determination.
+ * @param isPreIndexed Indicates if we expect the search on the virtual
+ * attribute to be faster than an index search.
+ * @return {@code true} if this attribute may be included in search
+ * filters, or {@code false} if not.
*/
public abstract boolean isSearchable(VirtualAttributeRule rule,
- SearchOperation
- searchOperation);
+ SearchOperation searchOperation,
+ boolean isPreIndexed);
--
Gitblit v1.10.0