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

项目:elasticsearch_my    文件:IBSimilarityProvider.java   
public IBSimilarityProvider(String name, Settings settings, Settings indexSettings) {
    super(name);
    Distribution distribution = parseDistribution(settings);
    Lambda lambda = parseLambda(settings);
    Normalization normalization = parseNormalization(settings);
    this.similarity = new IBSimilarity(distribution, lambda, normalization);
}
项目:elasticsearch_my    文件:IBSimilarityProvider.java   
/**
 * Parses the given Settings and creates the appropriate {@link Distribution}
 *
 * @param settings Settings to parse
 * @return {@link Normalization} referred to in the Settings
 */
protected Distribution parseDistribution(Settings settings) {
    String rawDistribution = settings.get("distribution");
    Distribution distribution = DISTRIBUTIONS.get(rawDistribution);
    if (distribution == null) {
        throw new IllegalArgumentException("Unsupported Distribution [" + rawDistribution + "]");
    }
    return distribution;
}
项目:search    文件:IBSimilarityFactory.java   
private Distribution parseDistribution(String expr) {
  if ("LL".equals(expr)) {
    return new DistributionLL();
  } else if ("SPL".equals(expr)) {
    return new DistributionSPL();
  } else {
    throw new RuntimeException("Invalid distribution: " + expr);
  }
}
项目:NYBC    文件:IBSimilarityFactory.java   
private Distribution parseDistribution(String expr) {
  if ("LL".equals(expr)) {
    return new DistributionLL();
  } else if ("SPL".equals(expr)) {
    return new DistributionSPL();
  } else {
    throw new RuntimeException("Invalid distribution: " + expr);
  }
}
项目:search-core    文件:IBSimilarityFactory.java   
private Distribution parseDistribution(String expr) {
  if ("LL".equals(expr)) {
    return new DistributionLL();
  } else if ("SPL".equals(expr)) {
    return new DistributionSPL();
  } else {
    throw new RuntimeException("Invalid distribution: " + expr);
  }
}
项目:read-open-source-code    文件:IBSimilarityFactory.java   
private Distribution parseDistribution(String expr) {
  if ("LL".equals(expr)) {
    return new DistributionLL();
  } else if ("SPL".equals(expr)) {
    return new DistributionSPL();
  } else {
    throw new RuntimeException("Invalid distribution: " + expr);
  }
}
项目:read-open-source-code    文件:IBSimilarityFactory.java   
private Distribution parseDistribution(String expr) {
  if ("LL".equals(expr)) {
    return new DistributionLL();
  } else if ("SPL".equals(expr)) {
    return new DistributionSPL();
  } else {
    throw new RuntimeException("Invalid distribution: " + expr);
  }
}