From b12119c55b89ece2495e84fba229d96439e8219b Mon Sep 17 00:00:00 2001
From: ludovicp <ludovicp@localhost>
Date: Fri, 30 Jul 2010 14:52:40 +0000
Subject: [PATCH] Implements index analysis features. There are 2 components: Index Filter Analyzer : Part of DatabaseEnvironmentProvider, it gathers search filter statistics and displays the index filter, number of hits, max matching entries, and a message. Compound filters are broken down to their basic elements. f an index was not utilized while evaluating the search filter, max matching entries will be -1 and a diagnostic message will be included. The monitor entry also includes when the analyzer was enabled along with the number of total index and unindexed searches processed. 

---
 opends/src/server/org/opends/server/backends/jeb/EntryContainer.java |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/opends/src/server/org/opends/server/backends/jeb/EntryContainer.java b/opends/src/server/org/opends/server/backends/jeb/EntryContainer.java
index 98f840f..470e5b9 100644
--- a/opends/src/server/org/opends/server/backends/jeb/EntryContainer.java
+++ b/opends/src/server/org/opends/server/backends/jeb/EntryContainer.java
@@ -1016,7 +1016,8 @@
     {
       // Create an index filter to get the search result candidate entries.
       IndexFilter indexFilter =
-        new IndexFilter(this, searchOperation, debugBuffer);
+        new IndexFilter(this, searchOperation, debugBuffer,
+            rootContainer.getMonitorProvider());
 
       // Evaluate the filter against the attribute indexes.
       entryIDList = indexFilter.evaluate();
@@ -1129,11 +1130,19 @@
 
     if (entryIDList.isDefined())
     {
+      if(rootContainer.getMonitorProvider().isFilterUseEnabled())
+      {
+        rootContainer.getMonitorProvider().updateIndexedSearchCount();
+      }
       searchIndexed(entryIDList, candidatesAreInScope, searchOperation,
           pageRequest);
     }
     else
     {
+      if(rootContainer.getMonitorProvider().isFilterUseEnabled())
+      {
+        rootContainer.getMonitorProvider().updateUnindexedSearchCount();
+      }
       // See if we could use a virtual attribute rule to process the search.
       for (VirtualAttributeRule rule : DirectoryServer.getVirtualAttributes())
       {

--
Gitblit v1.10.0