我正在尝试创建一个 Azure 辅助角色来索引 Lucene.NET 中的文档。
但是,当我创建一个 时IndexWriter
,它会失败并出现以下异常:
System.ExecutionEngineException was unhandled
Message: An unhandled exception of type 'System.ExecutionEngineException'
occurred in mscorlib.dll
如果我将项目构建为.exe
,则一切正常 - 不会引发异常。我正在使用 .NET Framework 4.0。
我的代码:
var cloudAccount = CloudStorageAccount.FromConfigurationSetting("LuceneBlobStorage");
var cacheDirectory = new RAMDirectory();
var azureDirectory = new AzureDirectory(
cloudAccount,"SnowballIndex", cacheDirectory);
var analyzer = new SnowballAnalyzer("English");
// !-- Exception thrown after this call
this.indexWriter = new IndexWriter(
azureDirectory, analyzer, IndexWriter.MaxFieldLength.UNLIMITED);
任何想法,将不胜感激。我在网上搜索,一无所获。
谢谢。