Examples of FuzzyAttribute


Examples of org.apache.lucene.queryParser.standard.config.FuzzyAttribute

   *
   * @param fuzzyPrefixLength
   *          The fuzzyPrefixLength to set.
   */
  public void setFuzzyPrefixLength(int fuzzyPrefixLength) {
    FuzzyAttribute attr = getQueryConfigHandler().addAttribute(FuzzyAttribute.class);
    attr.setPrefixLength(fuzzyPrefixLength);
  }
View Full Code Here

Examples of org.apache.lucene.queryParser.standard.config.FuzzyAttribute

  /**
   * Get the minimal similarity for fuzzy queries.
   */
  public float getFuzzyMinSim() {
    FuzzyAttribute attr = getQueryConfigHandler().addAttribute(FuzzyAttribute.class);
    return attr.getFuzzyMinSimilarity();
  }
View Full Code Here

Examples of org.apache.lucene.queryParser.standard.config.FuzzyAttribute

   * Get the prefix length for fuzzy queries.
   *
   * @return Returns the fuzzyPrefixLength.
   */
  public int getFuzzyPrefixLength() {
    FuzzyAttribute attr = getQueryConfigHandler().addAttribute(FuzzyAttribute.class);
    return attr.getPrefixLength();
  }
View Full Code Here

Examples of org.apache.lucene.queryParser.standard.config.FuzzyAttribute

  /**
   * Set the minimum similarity for fuzzy queries. Default is defined on
   * {@link FuzzyQuery#defaultMinSimilarity}.
   */
  public void setFuzzyMinSim(float fuzzyMinSim) {
    FuzzyAttribute attr = getQueryConfigHandler().addAttribute(FuzzyAttribute.class);
    attr.setFuzzyMinSimilarity(fuzzyMinSim);
  }
View Full Code Here

Examples of org.apache.lucene.queryParser.standard.config.FuzzyAttribute

    boostAttr.setBoost(boost);
    Assert.assertEquals(boost, boostAttr.getBoost());
    Assert
        .assertEquals(boost, config.get(ConfigurationKeys.BOOST).floatValue());

    FuzzyAttribute fuzzyAttributeAttr = config
        .addAttribute(FuzzyAttribute.class);

    Assert.assertEquals(FuzzyQuery.defaultMinSimilarity, fuzzyAttributeAttr
        .getFuzzyMinSimilarity());
    Assert.assertEquals(FuzzyQuery.defaultPrefixLength, fuzzyAttributeAttr
        .getPrefixLength());
    Assert.assertEquals(FuzzyQuery.defaultMinSimilarity, config.get(
        ConfigurationKeys.FUZZY_CONFIG).getMinSimilarity());
    Assert.assertEquals(FuzzyQuery.defaultPrefixLength, config.get(
        ConfigurationKeys.FUZZY_CONFIG).getPrefixLength());
    int prefixLength = 232;
    float minSim = 23.923f;
    fuzzyAttributeAttr.setFuzzyMinSimilarity(minSim);
    fuzzyAttributeAttr.setPrefixLength(prefixLength);
    Assert.assertEquals(minSim, fuzzyAttributeAttr.getFuzzyMinSimilarity());
    Assert.assertEquals(prefixLength, fuzzyAttributeAttr.getPrefixLength());
    Assert.assertEquals(minSim, config.get(ConfigurationKeys.FUZZY_CONFIG)
        .getMinSimilarity());
    Assert.assertEquals(prefixLength, config
        .get(ConfigurationKeys.FUZZY_CONFIG).getPrefixLength());
View Full Code Here

Examples of org.apache.lucene.queryParser.standard.config.FuzzyAttribute

   * Set the prefix length for fuzzy queries. Default is 0.
   *
   * @param fuzzyPrefixLength The fuzzyPrefixLength to set.
   */
  public void setFuzzyPrefixLength(int fuzzyPrefixLength) {
    FuzzyAttribute attr = getQueryConfigHandler().addAttribute(
        FuzzyAttribute.class);
    attr.setPrefixLength(fuzzyPrefixLength);

    // uncomment code below when deprecated query parser attributes are removed
    /*
     * QueryConfigHandler config = getQueryConfigHandler(); FuzzyConfig
     * fuzzyConfig = config.get(ConfigurationKeys.FUZZY_CONFIG);
View Full Code Here

Examples of org.apache.lucene.queryParser.standard.config.FuzzyAttribute

  /**
   * Set the minimum similarity for fuzzy queries. Default is defined on
   * {@link FuzzyQuery#defaultMinSimilarity}.
   */
  public void setFuzzyMinSim(float fuzzyMinSim) {
    FuzzyAttribute attr = getQueryConfigHandler().addAttribute(
        FuzzyAttribute.class);
    attr.setFuzzyMinSimilarity(fuzzyMinSim);
    // uncomment code below when deprecated query parser attributes are removed
    /*
     * QueryConfigHandler config = getQueryConfigHandler(); FuzzyConfig
     * fuzzyConfig = config.get(ConfigurationKeys.FUZZY_CONFIG);
     *
 
View Full Code Here

Examples of org.apache.lucene.queryParser.standard.config.FuzzyAttribute

   *
   * @param fuzzyPrefixLength
   *          The fuzzyPrefixLength to set.
   */
  public void setFuzzyPrefixLength(int fuzzyPrefixLength) {
    FuzzyAttribute attr = getQueryConfigHandler().addAttribute(FuzzyAttribute.class);
    attr.setPrefixLength(fuzzyPrefixLength);
  }
View Full Code Here

Examples of org.apache.lucene.queryParser.standard.config.FuzzyAttribute

  /**
   * Get the minimal similarity for fuzzy queries.
   */
  public float getFuzzyMinSim() {
    FuzzyAttribute attr = getQueryConfigHandler().addAttribute(FuzzyAttribute.class);
    return attr.getFuzzyMinSimilarity();
  }
View Full Code Here

Examples of org.apache.lucene.queryParser.standard.config.FuzzyAttribute

   * Get the prefix length for fuzzy queries.
   *
   * @return Returns the fuzzyPrefixLength.
   */
  public int getFuzzyPrefixLength() {
    FuzzyAttribute attr = getQueryConfigHandler().addAttribute(FuzzyAttribute.class);
    return attr.getPrefixLength();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.