开发者

Azure Library for Lucene.Net - FileNotFound Exception

开发者 https://www.devze.com 2023-03-24 00:06 出处:网络
I\'m working with the Azure Library for Lucene.Net but I am running into FileNotFound Exceptions when I try to append to the index.

I'm working with the Azure Library for Lucene.Net but I am running into FileNotFound Exceptions when I try to append to the index.

Everything works great with the FSDirectory. I have a ton of unit tests working great against the RAMDirectory.

Here is the infrastructure:

  1. Single Role mainta开发者_开发知识库ins Index Writer Singleton.
  2. Separate web service maintains a single instance of the Searcher that points to the same index in read-only mode.
  3. When a change events occur the Index Writer Role picks up the change, modifies the index, and commits.
  4. After a certain period of time the Searcher recycles to pick up the latest index changes.

Exceptions: Upon the change, and from then on, I get a FileNotFound exception from the AzureDirectory. The file reported as not found changes but one example is "_h.cfs." When the searcher recycles and attempts to reload the index I get FileNotFound exceptions on the searcher as well...

Couple Other Important Points: 1. Initial creation of the full index works fine. 2. Searching against the initially created index works fine. 3. I'm using Lucene .Net V. 2.9.2

Any thoughts or suggestions? This is unfortunately the last issue I need to resolve before releasing the project...

Thanks, Tim


I ran into the same problem using https://azuredirectory.codeplex.com/

I ended up using a localresource (a folder on your web/worker role) to load the entire index to and from blobstorage, then using the built in indexwriter in lucene.net and pushing the files back to blob storage every few minutes, so other readers could load and search the index.

Overall the AzureDirectory implementation was basically just a toy example, that needed more work to be useful in a production setting.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号