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

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

Introduction

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

Prototype

public Lucene60PointsWriter(SegmentWriteState writeState, int maxPointsInLeafNode, double maxMBSortInHeap)
        throws IOException 

Source Link

Document

Full constructor

Usage

From source file:perf.IndexAndSearchOpenStreetMaps.java

License:Apache License

private static Codec getCodec(boolean fast) {
    if (fast) {//from   www. j  a  v a 2 s.  c  o m
        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");
    }
}