Custom Analyzers (Beta)

We are excited to begin offering beta support for custom analyzers! We plan to support any type of custom analyzer that you create, so long as it meets our requirements for performance and security. We will be using the beta period to gather feedback on the process of managing and installing custom analyzers, so please send us any improvements or suggestions that you have.

If you want more information on custom analyzers, please visit the RavenDB Analyzers documentation.

Custom Analyzers on RavenHQ

  • You can write your own analyzers and use them on your databases
  • You will submit these analyzers to RavenHQ and we will associate them with your account
  • Your custom analyzers will be automatically made available on all of your existing and future RavenHQ databases

Building Your Custom Analyzer

We require you to define all of your custom analyzers inside a single DLL. The only external references that can be included in this DLL are the following NuGet packages:

An example of a custom analyzer that transforms the input data to lowercase can be seen here.

Locally Testing Your Custom Analyzer

Once you've created your analyzer, you'll want to create or modify an index to use the analyzer. This is normally done by providing the assembly qualified name of the analyzer in the index definition. An example of an index that references a custom analyzer can be seen here.

Before testing, you should ensure that your local RavenDB server version matches the version of RavenDB that you are running in RavenHQ.

The process for testing the analyzer locally is as follows:

  1. Navigate to the RavenDB server folder on disk (eg. C:\RavenDB)
  2. Create a folder named Analyzers
  3. Drop your dll (and any referenced Lucene.Net dlls) into the Analyzers folder
  4. Restart the RavenDB service
  5. Deploy an index that references the custom analyzer 
  6. Run some test queries against the index to confirm that the analyzer is working as expected

Submitting Your Custom Analyzer For Approval

After you've completed testing your analyzer, you are ready to submit it to RavenHQ for approval. To initiate this process, just submit a support ticket with your custom analyzer dll as an attachment.

Note: You do not need to include any of the Lucene.Net or Lucene.Net.Contrib dlls when submitting your analyzer for approval

After receiving your request, we will begin the process of reviewing your analyzer to ensure that it meets our security requirements. If we find any issues, we will respond to the support ticket. The review process normally takes one business day to complete.

Once we have approved your custom analyzer, we will immediately kickoff a process to deploy that analyzer to all of your existing RavenDB databases. The deployment process requires each database node to be recycled, but we perform these updates in a rolling manner so that both nodes of a single database subscription are never taken offline at the same time. As soon as the analyzer has been deployed to all of your databases, we will let you know that everything has been configured. You'll then be able to modify any of your indexes to use the custom analyzer. 

Updating Your Custom Analyzers

If you would like to update your custom analyzer implementation, please follow the same process that you performed when you originally submitted the analyzer to RavenHQ. Once approved, the updated analyzer dll will replace the existing analyzer dll across all existing databases. 

If you would like to make behavioral changes to an analyzer that is used by both a production and non-production database, we strongly recommend that you implement these changes in a new analyzer class, rather than modifying the existing analyzer class. This will allow your existing indexes that are deployed to the production databases to continue referencing the old analyzer until the indexes are updated to point to the new analyzer class.





Have more questions? Submit a request


Please sign in to leave a comment.