CloudStorageAccount cloudStorageAccount = CloudStorageAccount.Parse(CloudConfigurationManager.GetSetting("BlobStorage"));
using (AzureDirectory azureDirectory = new AzureDirectory(cloudStorageAccount, "Contents"))
{
IndexWriter indexWriter;
try
{
indexWriter = new IndexWriter(azureDirectory, new StandardAnalyzer(Lucene.Net.Util.Version.LUCENE_30), false,
new IndexWriter.MaxFieldLength(IndexWriter.DEFAULT_MAX_FIELD_LENGTH));
}
catch (System.IO.FileNotFoundException)
{
indexWriter = new IndexWriter(azureDirectory, new StandardAnalyzer(Lucene.Net.Util.Version.LUCENE_30), true,
new IndexWriter.MaxFieldLength(IndexWriter.DEFAULT_MAX_FIELD_LENGTH));
}
这是我的来源。 我需要在我的容器(内容)中创建或使用子目录
Contents/en/{filename}
Contents/ko/{filename}
Contents/jp/{filename}
如何使用Lucene.net
创建AzureDirectory子目录