Can I store a Lucene index in a database or other location than a file system?

I use Lucene.NET for my web project. I wish to migrate the indexing to webjobs using Azure, however Lucene uses an traditional 'file system' to store the index.

Are there other options to stored and write to the index, such as SQL?

Answers


Azure Directory for Lucene.Net: https://github.com/azure-contrib/AzureDirectory

A bit, and probably not well supported, but there is no another option that I am aware of. You cannot store Lucene data in DB (whatever DB). It just makes no sense.


All I/O operations in Lucene is done through the Directory class. So if want to use a different storage engine for your index, all you need to do is implement a custom Directory. For an example of how to do this, have a look at this project: MongoDB.Lucene. Others have implemented it on top of Azure, Redis, etc.


Need Your Help