Using Lucene like a relational database

前端 未结 5 2085
故里飘歌
故里飘歌 2021-01-01 03:10

I am just wondering if we could achieve some RDBMS capabilities in lucene.

Example: 1) I have 10,000 project documents (pdf files) which have to be indexed with thei

5条回答
  •  天命终不由人
    2021-01-01 03:14

    If I understand you correctly, you have two questions:

    1. Can I store a project id in Lucene and use it for further searches? Yes, you can. This is a common practice.
    2. Can I use this project id to search Lucene for project meta data? Yes, you can. I do not know if this is a good idea. It depends on the frequency of your meta data updates and your access pattern. If the meta data is relatively static, and you only access it by id, Lucene may be a good place to store it. Otherwise, you can use the project id as a primary key to a database table, which could be a better fit.

提交回复
热议问题