use of org.apache.lucene.codecs.lucene50.Lucene50PostingsWriter in project lucene-solr by apache.
the class BlockTreeOrdsPostingsFormat method fieldsConsumer.
@Override
public FieldsConsumer fieldsConsumer(SegmentWriteState state) throws IOException {
PostingsWriterBase postingsWriter = new Lucene50PostingsWriter(state);
boolean success = false;
try {
FieldsConsumer ret = new OrdsBlockTreeTermsWriter(state, postingsWriter, minTermBlockSize, maxTermBlockSize);
success = true;
return ret;
} finally {
if (!success) {
IOUtils.closeWhileHandlingException(postingsWriter);
}
}
}
use of org.apache.lucene.codecs.lucene50.Lucene50PostingsWriter in project lucene-solr by apache.
the class FSTPostingsFormat method fieldsConsumer.
@Override
public FieldsConsumer fieldsConsumer(SegmentWriteState state) throws IOException {
PostingsWriterBase postingsWriter = new Lucene50PostingsWriter(state);
boolean success = false;
try {
FieldsConsumer ret = new FSTTermsWriter(state, postingsWriter);
success = true;
return ret;
} finally {
if (!success) {
IOUtils.closeWhileHandlingException(postingsWriter);
}
}
}
Aggregations