Lucene Search Index moving to Azure Blob Storage - Help

Nov 13, 2013 at 10:11 AM
Hi,
I am using Lucene Search in our application. we are currently moving our application to Azure. So, I am moving Lucene Storage to AzureDirectory Blob storage, as mentioned in -
http://code.msdn.microsoft.com/windowsazure/Azure-Library-for-83562538/view/Discussions

I am facing issue on create Indexes since it does differently in Azure. We have used it in the following method -
List indexProviders = new List();
indexProviders.Add((indexWriter);
_indexProvider = new LuceneIndexProvider(_appDataFolder, _indexStoreType.ToString());
indexProviders.Add(_indexProvider);
_indexManager = new DefaultIndexManager(indexProviders);

However, in the article, we found the Azure Lucene index creation as below -
AzureDirectory azureDirectory = new AzureDirectory(CloudStorageAccount.FromConfigurationSetting("StorageConnectionString"), "");
bool findexExists = IndexReader.IndexExists(azureDirectory);
while (indexWriter == null)
{
indexWriter = new IndexWriter(azureDirectory, new StandardAnalyzer(), !IndexReader.IndexExists(azureDirectory));
};
indexWriter.SetRAMBufferSizeMB(10.0);
indexWriter.SetUseCompoundFile(false);
indexWriter.SetMaxMergeDocs(10000);
indexWriter.SetMergeFactor(100);
indexWriter.Close();

Please help me move the Lucene search to Azure.
Thanks In Advance.