Sitecore Search Contrib

Extension to Sitecore.Search namespace. Includes AdvancedDatabaseCrawler and Searcher.

View the Project on GitHub sitecorian/SitecoreSearchContrib

Install Crawler via NuGet PM> Install-Package scSearchContrib.Crawler

Install Searcher via NuGet PM> Install-Package scSearchContrib.Searcher

What's this?

This project consists of different moving parts which can be used separately from each other. It's important to know that the project does not change the way Sitecore indexes items, it simply extends the crawling mechanism to be more flexible and provides alternative search API on top of existing Sitecore.Search namespace.

1. Crawler project

This project provides an extension to the standard Sitecore.Search.DatabaseCrawler, including features like dynamic fields, field filtering, field crawling factory, field crawling rules per field type and other misc tweaks.

2. Searcher project

An extension to Sitecore.Search API, providing a more verbose, non-Lucene specific, querying mechanism such as FieldQuery, NumericRangeQuery, DateRangeQuery, MultiFieldQuery, etc.

3. Demo projects

Demonstrates the usage of different search parameters. Includes a set of demo pages for you to explore and learn. There are also serialization items to go with the demo pages, along with other demo extensions. As the name suggests, all demo projects are completely optional and shouldn't be deployed to production.

4. Tools project

Contains two elements. A very simple .aspx page allowing you to rebuild a search index. You can deploy it to a secure location on your production server and use it without the full access to Sitecore shell. The other element is the customized Index Rebuild wizard available from the Control Panel. If you are using a version earlier than 6.5.0 rev. 120706, this wizard does not see any of the Sitecore.Search indexes. This customization solves that.

What do I need to deploy?

These are building blocks. So it's completely up to you. You can use Crawler & Searcher & Tools together in production, while deploy everything to a dev workstation. It does not make sense to use the Searcher project separately from Crawler, as things like numeric ranges and date ranges won't work without the field crawlers provided by the latter. You can use the Crawler and rely on standard Sitecore.Search querying APIs though.


The code-base is compatible with Sitecore 6.4.x and 6.5.x releases, but it is also expected to work for 6.6.0. The compiler will throw some warnings about deprecated methods when you try to build against Lucene 2.9, which is what Sitecore 6.6.0 is using, however I tested all search parameters, and they work as expected.

Future Compatibility

Longer term, for Sitecore 7.0 or later, you won't need the code from this project at all as different bits are naively available in Sitecore 7.0. If you are planning on upgrading your Sitecore solution from 6.x to 7.0, and you are currently using the code from this project, plan on doing some code migration. This is not expected to take long, as the search parameters translate into Linq very nicely.

How to build the code and deploy

Note that the code-base ships with demo items, some demo code and demo pages. If you do not want the demo stuff, make sure you tweak your Build Configuration accordingly.

  1. Under the root of the repository, there is a folder called /references. Copy the following DLLs from your local Sitecore install in there:
    • Lucene.Net.dll
    • Sitecore.Client.dll
    • Sitecore.Kernel.dll

  2. Open both webroot_path.txt and serialization_path.txt and adjust these paths.

  3. Open the project -> Build Solution.

If you want the demo stuff:

  1. http://localhost/sitecore/admin/serialization.aspx -> toggle "master" -> Update {master}.

  2. Sitecore -> Publish Site -> Smart Publish.

  3. Control Panel -> Database -> Rebuild the Links Database (core, master, web).

  4. Launch http://localhost/scripts/indexrebuilder.aspx and toggle "demo" rebuild. Alternatively, run Control Panel -> Rebuild the Search Index -> "demo".

  5. Launch http://localhost/sitecore modules/web/searchdemo/

Need Help?

Please, make sure to check the Help page first. If this does not help, then submit an issue here.