List of usage examples for org.apache.lucene.codecs.lucene50 Lucene50PostingsWriter Lucene50PostingsWriter
public Lucene50PostingsWriter(SegmentWriteState state) throws IOException
From source file:com.rocana.lucene.codec.v1.RocanaLucene50PostingsFormat.java
License:Apache License
@Override public FieldsConsumer fieldsConsumer(SegmentWriteState state) throws IOException { PostingsWriterBase postingsWriter = new Lucene50PostingsWriter(state); boolean success = false; try {//from w w w .j ava 2s . com FieldsConsumer ret = new BlockTreeTermsWriter(state, postingsWriter, minTermBlockSize, maxTermBlockSize); success = true; return ret; } finally { if (!success) { IOUtils.closeWhileHandlingException(postingsWriter); } } }