如何使用Lucene.net创建Azuredirectory子目录

时间:2014-11-06 02:01:04

标签: c# azure-storage lucene.net

    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子目录

0 个答案:

没有答案