Faster search in Lucene - Is there a way to keep the whole index in RAM?

后端 未结 3 893
谎友^
谎友^ 2020-12-13 01:16

Is there a way of keeping the index in RAM instead of keeping it on the hard disk?

We want to make searching faster.

3条回答
  •  情书的邮戳
    2020-12-13 01:22

    Check out the RAMDirectory documentation. Here's a basic usage example. This will only work if the index is small enough.

提交回复
热议问题