alexshyba / SitecoreSearchContrib

Extension to Sitecore.Search namespace. Includes AdvancedDatabaseCrawler and Searcher. Make sure to check out the website for the project.
http://sitecorian.github.io/SitecoreSearchContrib
25 stars 21 forks source link

Advanced Database Crawler Lucene Tracing Utility #23

Closed PetersonDave closed 11 years ago

PetersonDave commented 11 years ago

Project Goal:

Provide a tool to debug Lucene queries by rendering the executed queries to the rendered page. This tool should only be used for debugging and testing purposes only. Not meant for a production environment.

Features

Project Contents:

  1. QueryRunnerTrace.cs - QueryRunner wrapper, saving all Lucene query text to the query trace provider specified.
  2. QueryTraceScope.cs - Manages monitoring of query activity.
  3. QueryTraceScopeSessionProvider.cs - Session provider for saving of queries executed against Lucene.
  4. LucenePorfiler.cs - Web Control that presents the captured Lucene queries.

Other files provide support via helper methods, embedded web control resources, and an interface for additional provider implementations, when necessary.

How to Use:

Using the tracing utility is easy to use, by following the steps below:

  1. Add a reference to the project scSearchContrib.Profiler.
  2. Use QueryRunnerTrace to execute ADC searches.
  3. Add an instance of LuceneProfiler.cs web control to the desired page/rendering:
<%@ Register TagPrefix="uc" Namespace="scSearchContrib.Profiler.UI" Assembly="scSearchContrib.Profiler" %>
<uc:LuceneProfiler id="ucProfiler" runat="server"></uc:LuceneProfiler>

Example Output:

image

alexshyba commented 11 years ago

This looks absolutely awesome! Thanks, Dave!