Example usage for org.apache.lucene.util.bkd BKDWriter DEFAULT_MAX_MB_SORT_IN_HEAP

List of usage examples for org.apache.lucene.util.bkd BKDWriter DEFAULT_MAX_MB_SORT_IN_HEAP

Introduction

In this page you can find the example usage for org.apache.lucene.util.bkd BKDWriter DEFAULT_MAX_MB_SORT_IN_HEAP.

Prototype

float DEFAULT_MAX_MB_SORT_IN_HEAP

To view the source code for org.apache.lucene.util.bkd BKDWriter DEFAULT_MAX_MB_SORT_IN_HEAP.

Click Source Link

Document

Default maximum heap to use, before spilling to (slower) disk

Usage

From source file:perf.IndexAndSearchOpenStreetMaps.java

License:Apache License

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