user3637002
user3637002

Reputation: 87

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?

Upvotes: 2

Views: 4119

Answers (2)

cris almodovar
cris almodovar

Reputation: 161

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.

Upvotes: 2

astaykov
astaykov

Reputation: 30903

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.

Upvotes: 2

Related Questions