lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cheng <zhoucheng2...@gmail.com>
Subject Index size doubles every time when I synchronize the RAM-based index with the FD-based index
Date Fri, 28 Sep 2012 00:56:50 GMT
Hi,

I have a ram based index which occasionally needs to be persistent with a
disk based index. Every time the size doubles which eats up my disk space
quickly. Below is the code. Could someone help me?

Thanks,
Cheng

try {
IndexWriterConfig iwc = new IndexWriterConfig(ERConstants.version,
ERConstants.analyzer);

iwc.setOpenMode(OpenMode.CREATE);

IndexWriter writer = new IndexWriter(new NIOFSDirectory(new File(
indexpath)), iwc);
writer.commit();

writer.addIndexes(source);
writer.close();

} catch (IOException e) {
e.printStackTrace();
}

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message