Java 类org.apache.lucene.index.RandomCodec 实例源码

项目:search    文件:TestRuleSetupAndRestoreClassEnv.java   
/**
 * Check codec restrictions.
 * 
 * @throws AssumptionViolatedException if the class does not work with a given codec.
 */
private void checkCodecRestrictions(Codec codec) {
  assumeFalse("Class not allowed to use codec: " + codec.getName() + ".",
      shouldAvoidCodec(codec.getName()));

  if (codec instanceof RandomCodec && !avoidCodecs.isEmpty()) {
    for (String name : ((RandomCodec)codec).formatNames) {
      assumeFalse("Class not allowed to use postings format: " + name + ".",
          shouldAvoidCodec(name));
    }
  }

  PostingsFormat pf = codec.postingsFormat();
  assumeFalse("Class not allowed to use postings format: " + pf.getName() + ".",
      shouldAvoidCodec(pf.getName()));

  assumeFalse("Class not allowed to use postings format: " + LuceneTestCase.TEST_POSTINGSFORMAT + ".", 
      shouldAvoidCodec(LuceneTestCase.TEST_POSTINGSFORMAT));
}
项目:NYBC    文件:TestRuleSetupAndRestoreClassEnv.java   
/**
 * Check codec restrictions.
 * 
 * @throws AssumptionViolatedException if the class does not work with a given codec.
 */
private void checkCodecRestrictions(Codec codec) {
  assumeFalse("Class not allowed to use codec: " + codec.getName() + ".",
      shouldAvoidCodec(codec.getName()));

  if (codec instanceof RandomCodec && !avoidCodecs.isEmpty()) {
    for (String name : ((RandomCodec)codec).formatNames) {
      assumeFalse("Class not allowed to use postings format: " + name + ".",
          shouldAvoidCodec(name));
    }
  }

  PostingsFormat pf = codec.postingsFormat();
  assumeFalse("Class not allowed to use postings format: " + pf.getName() + ".",
      shouldAvoidCodec(pf.getName()));

  assumeFalse("Class not allowed to use postings format: " + LuceneTestCase.TEST_POSTINGSFORMAT + ".", 
      shouldAvoidCodec(LuceneTestCase.TEST_POSTINGSFORMAT));
}
项目:Maskana-Gestor-de-Conocimiento    文件:TestRuleSetupAndRestoreClassEnv.java   
/**
 * Check codec restrictions.
 * 
 * @throws AssumptionViolatedException if the class does not work with a given codec.
 */
private void checkCodecRestrictions(Codec codec) {
  assumeFalse("Class not allowed to use codec: " + codec.getName() + ".",
      shouldAvoidCodec(codec.getName()));

  if (codec instanceof RandomCodec && !avoidCodecs.isEmpty()) {
    for (String name : ((RandomCodec)codec).formatNames) {
      assumeFalse("Class not allowed to use postings format: " + name + ".",
          shouldAvoidCodec(name));
    }
  }

  PostingsFormat pf = codec.postingsFormat();
  assumeFalse("Class not allowed to use postings format: " + pf.getName() + ".",
      shouldAvoidCodec(pf.getName()));

  assumeFalse("Class not allowed to use postings format: " + LuceneTestCase.TEST_POSTINGSFORMAT + ".", 
      shouldAvoidCodec(LuceneTestCase.TEST_POSTINGSFORMAT));
}
项目:search    文件:TestPerFieldDocValuesFormat.java   
@Override
public void setUp() throws Exception {
  codec = new RandomCodec(new Random(random().nextLong()), Collections.<String>emptySet());
  super.setUp();
}
项目:search    文件:TestPerFieldPostingsFormat.java   
@Override
protected Codec getCodec() {
  return new RandomCodec(new Random(random().nextLong()), Collections.<String>emptySet());
}
项目:NYBC    文件:TestPerFieldDocValuesFormat.java   
@Override
public void setUp() throws Exception {
  codec = new RandomCodec(new Random(random().nextLong()), Collections.<String>emptySet());
  super.setUp();
}
项目:NYBC    文件:TestPerFieldPostingsFormat.java   
@Override
public void setUp() throws Exception {
  super.setUp();
  codec = new RandomCodec(new Random(random().nextLong()), Collections.<String>emptySet());
}
项目:Maskana-Gestor-de-Conocimiento    文件:TestPerFieldDocValuesFormat.java   
@Override
public void setUp() throws Exception {
  codec = new RandomCodec(new Random(random().nextLong()), Collections.<String>emptySet());
  super.setUp();
}
项目:Maskana-Gestor-de-Conocimiento    文件:TestPerFieldPostingsFormat.java   
@Override
public void setUp() throws Exception {
  super.setUp();
  codec = new RandomCodec(new Random(random().nextLong()), Collections.<String>emptySet());
}