Skip to content

@Shazwazza Shazwazza released this Feb 11, 2020 · 185 commits to master since this release

This feature has been in a preview/alpha phase for an extremely long time. I've had this functionality running on my own site for ages without issue. I have received very little feedback regarding issues since I posted some instructions on how to do this so I figured it was time to release a real version.

(currently not supporting Examine 1.0.0 yet, but i will release a package for that soon)

Documentation can be found here:

https://github.com/Shazwazza/Examine/wiki/Examine-with-Azure-Directory-(Blob-Storage)

What is it?

The purpose of this library is for load balancing in Azure especially when auto-scaling. This allows master indexes to be stored in Blob Storage and when replica/slave servers come online they sync the Lucene files locally. This means indexes don't need to be rebuilt when scaling out and new replica/slave go online.

This is not the same as having a hosted index, this is just a work around for limitations with non-hosted, file based Lucene indexes when running on Azure.

I have no tested this with large scaled applications, there might be folks that are running this already in those scenarios but I'm unsure.

Installation

The nuget package for this can be found https://www.nuget.org/packages/Examine.AzureDirectory

 Install-Package Examine.AzureDirectory

To activate it, you need to add these settings to your web.config

<add key="examine:AzureStorageConnString" value="YOUR-STORAGE-CONNECTION-STRING" />
<add key="examine:AzureStorageContainer" value="YOUR-CONTAINER-NAME" />

On your master server, this directoryFactory attribute needs to be added to each of your indexes in the ExamineIndexProviders section:

directoryFactory="Examine.AzureDirectory.AzureDirectoryFactory, Examine.AzureDirectory"

On your front-end/readonly/slave servers, this directoryFactory attribute needs to be added to each of your indexes in the ExamineIndexProviders section:

directoryFactory="Examine.AzureDirectory.ReadOnlyAzureDirectoryFactory, Examine.AzureDirectory"

For example:

<add name="InternalIndexer" directoryFactory="Examine.AzureDirectory.AzureDirectoryFactory, Examine.AzureDirectory"/>
Assets 2
You can’t perform that action at this time.