Example usage for org.apache.lucene.codecs.blockterms LuceneVarGapFixedInterval LuceneVarGapFixedInterval

List of usage examples for org.apache.lucene.codecs.blockterms LuceneVarGapFixedInterval LuceneVarGapFixedInterval

Introduction

In this page you can find the example usage for org.apache.lucene.codecs.blockterms LuceneVarGapFixedInterval LuceneVarGapFixedInterval.

Prototype

public LuceneVarGapFixedInterval(int termIndexInterval) 

Source Link

Usage

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

License:Apache License

public void testSameCodecDifferentParams() throws Exception {
    Codec codec = new AssertingCodec() {
        @Override//from   w ww .jav a2  s  . c om
        public PostingsFormat getPostingsFormatForField(String field) {
            if ("id".equals(field)) {
                return new LuceneVarGapFixedInterval(1);
            } else if ("date".equals(field)) {
                return new LuceneVarGapFixedInterval(2);
            } else {
                return super.getPostingsFormatForField(field);
            }
        }
    };
    doTestMixedPostings(codec);
}