Akhil
Akhil

Reputation: 2399

Is it possible for lucene to store the index only in one file

When we create a lucene index, various files are created. If we do not optimize Index writer three files are created, one named _0.cfs which contains all of the index data and two other files containing meta data. Is it possible to force lucene to create only one file instead of three.

Upvotes: 1

Views: 709

Answers (1)

kumanan
kumanan

Reputation: 11

No. It is not possible to do that because Lucene is designed to be efficient for Incremental indexing. Lucene creates multiple segments to make incremental indexing fast. Each segment has a separate .cfs file. The segments file contain information about the different segments and which .cfs file is for which segment. This means that segments file cannot be folded into any of the .cfs files.

Upvotes: 1

Related Questions