Example usage for org.apache.lucene.codecs.lucene50 Lucene50PostingsReader Lucene50PostingsReader

List of usage examples for org.apache.lucene.codecs.lucene50 Lucene50PostingsReader Lucene50PostingsReader

Introduction

In this page you can find the example usage for org.apache.lucene.codecs.lucene50 Lucene50PostingsReader Lucene50PostingsReader.

Prototype

public Lucene50PostingsReader(SegmentReadState state) throws IOException 

Source Link

Document

Sole constructor.

Usage

From source file:com.rocana.lucene.codec.v1.RocanaLucene50PostingsFormat.java

License:Apache License

@Override
public FieldsProducer fieldsProducer(SegmentReadState state) throws IOException {
    PostingsReaderBase postingsReader = new Lucene50PostingsReader(state);
    boolean success = false;
    try {/*  w ww . ja  v a 2s  .  c o m*/
        FieldsProducer ret = new RocanaBlockTreeTermsReader(postingsReader, state);
        success = true;
        return ret;
    } finally {
        if (!success) {
            IOUtils.closeWhileHandlingException(postingsReader);
        }
    }
}