List of usage examples for org.apache.lucene.store FlushInfo FlushInfo
public FlushInfo(int numDocs, long estimatedSegmentSize)
Creates a new FlushInfo instance from the values required for a FLUSH IOContext context.
From source file:com.github.lucene.store.database.DatabaseDirectoryITest.java
License:Apache License
private void addContentIndexOutput(final Directory directory, final String fileName, final String content, final Context context) throws IOException { IOContext ioContext = null;/*from ww w.ja v a2 s . co m*/ switch (context) { case FLUSH: ioContext = new IOContext(new FlushInfo(1, 1)); break; case MERGE: ioContext = new IOContext(new MergeInfo(1, 1, false, 1)); break; default: ioContext = new IOContext(context); break; } final IndexOutput indexOutput = directory.createOutput(fileName, ioContext); indexOutput.writeString(content); indexOutput.close(); }