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

落爺英雄遲暮 提交于 2020-02-28 12:31:45

问题


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?


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/35725908/can-i-store-a-lucene-index-in-a-database-or-other-location-than-a-file-system

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!