List of usage examples for org.apache.lucene.codecs.blockterms LuceneVarGapFixedInterval LuceneVarGapFixedInterval
public LuceneVarGapFixedInterval(int termIndexInterval)
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); }