Java 类org.apache.lucene.search.similarities.AfterEffect 实例源码

项目:elasticsearch_my    文件:DFRSimilarityProvider.java   
public DFRSimilarityProvider(String name, Settings settings, Settings indexSettings) {
    super(name);
    BasicModel basicModel = parseBasicModel(settings);
    AfterEffect afterEffect = parseAfterEffect(settings);
    Normalization normalization = parseNormalization(settings);
    this.similarity = new DFRSimilarity(basicModel, afterEffect, normalization);
}
项目:elasticsearch_my    文件:DFRSimilarityProvider.java   
/**
 * Parses the given Settings and creates the appropriate {@link AfterEffect}
 *
 * @param settings Settings to parse
 * @return {@link AfterEffect} referred to in the Settings
 */
protected AfterEffect parseAfterEffect(Settings settings) {
    String afterEffect = settings.get("after_effect");
    AfterEffect effect = AFTER_EFFECTS.get(afterEffect);
    if (effect == null) {
        throw new IllegalArgumentException("Unsupported AfterEffect [" + afterEffect + "]");
    }
    return effect;
}
项目:search    文件:DFRSimilarityFactory.java   
private AfterEffect parseAfterEffect(String expr) {
  if ("B".equals(expr)) {
    return new AfterEffectB();
  } else if ("L".equals(expr)) {
    return new AfterEffectL();
  } else if ("none".equals(expr)) {
    return new AfterEffect.NoAfterEffect();
  } else {
    throw new RuntimeException("Invalid afterEffect: " + expr);
  }
}
项目:NYBC    文件:DFRSimilarityFactory.java   
private AfterEffect parseAfterEffect(String expr) {
  if ("B".equals(expr)) {
    return new AfterEffectB();
  } else if ("L".equals(expr)) {
    return new AfterEffectL();
  } else if ("none".equals(expr)) {
    return new AfterEffect.NoAfterEffect();
  } else {
    throw new RuntimeException("Invalid afterEffect: " + expr);
  }
}
项目:search-core    文件:DFRSimilarityFactory.java   
private AfterEffect parseAfterEffect(String expr) {
  if ("B".equals(expr)) {
    return new AfterEffectB();
  } else if ("L".equals(expr)) {
    return new AfterEffectL();
  } else if ("none".equals(expr)) {
    return new AfterEffect.NoAfterEffect();
  } else {
    throw new RuntimeException("Invalid afterEffect: " + expr);
  }
}
项目:read-open-source-code    文件:DFRSimilarityFactory.java   
private AfterEffect parseAfterEffect(String expr) {
  if ("B".equals(expr)) {
    return new AfterEffectB();
  } else if ("L".equals(expr)) {
    return new AfterEffectL();
  } else if ("none".equals(expr)) {
    return new AfterEffect.NoAfterEffect();
  } else {
    throw new RuntimeException("Invalid afterEffect: " + expr);
  }
}
项目:read-open-source-code    文件:DFRSimilarityFactory.java   
private AfterEffect parseAfterEffect(String expr) {
  if ("B".equals(expr)) {
    return new AfterEffectB();
  } else if ("L".equals(expr)) {
    return new AfterEffectL();
  } else if ("none".equals(expr)) {
    return new AfterEffect.NoAfterEffect();
  } else {
    throw new RuntimeException("Invalid afterEffect: " + expr);
  }
}