Example usage for org.apache.lucene.codecs.lucene60 Lucene60PointsReader Lucene60PointsReader

List of usage examples for org.apache.lucene.codecs.lucene60 Lucene60PointsReader Lucene60PointsReader

Introduction

In this page you can find the example usage for org.apache.lucene.codecs.lucene60 Lucene60PointsReader Lucene60PointsReader.

Prototype

public Lucene60PointsReader(SegmentReadState readState) throws IOException 

Source Link

Document

Sole constructor

Usage

From source file:perf.IndexAndSearchOpenStreetMaps.java

License:Apache License

private static Codec getCodec(boolean fast) {
    if (fast) {/*from ww  w . j  a v  a  2s. c om*/
        return new FilterCodec("Lucene62", Codec.getDefault()) {
            @Override
            public PointsFormat pointsFormat() {
                return new PointsFormat() {
                    @Override
                    public PointsWriter fieldsWriter(SegmentWriteState writeState) throws IOException {
                        int maxPointsInLeafNode = 1024;
                        return new Lucene60PointsWriter(writeState, maxPointsInLeafNode,
                                BKDWriter.DEFAULT_MAX_MB_SORT_IN_HEAP);
                    }

                    @Override
                    public PointsReader fieldsReader(SegmentReadState readState) throws IOException {
                        return new Lucene60PointsReader(readState);
                    }
                };
            }
        };
    } else {
        return Codec.forName("Lucene62");
    }
}