Examples of QueryConfigHandler


Examples of org.apache.lucene.queryparser.flexible.core.config.QueryConfigHandler

   * @param fuzzyPrefixLength
   *          The fuzzyPrefixLength to set.
   */
  @Override
  public void setFuzzyPrefixLength(int fuzzyPrefixLength) {
    QueryConfigHandler config = getQueryConfigHandler();
    FuzzyConfig fuzzyConfig = config.get(ConfigurationKeys.FUZZY_CONFIG);
   
    if (fuzzyConfig == null) {
      fuzzyConfig = new FuzzyConfig();
      config.set(ConfigurationKeys.FUZZY_CONFIG, fuzzyConfig);
    }

    fuzzyConfig.setPrefixLength(fuzzyPrefixLength);
   
  }
View Full Code Here

Examples of org.apache.lucene.queryparser.flexible.core.config.QueryConfigHandler

   * Set the minimum similarity for fuzzy queries. Default is defined on
   * {@link FuzzyQuery#defaultMinSimilarity}.
   */
  @Override
  public void setFuzzyMinSim(float fuzzyMinSim) {
    QueryConfigHandler config = getQueryConfigHandler();
    FuzzyConfig fuzzyConfig = config.get(ConfigurationKeys.FUZZY_CONFIG);
   
    if (fuzzyConfig == null) {
      fuzzyConfig = new FuzzyConfig();
      config.set(ConfigurationKeys.FUZZY_CONFIG, fuzzyConfig);
    }

    fuzzyConfig.setMinSimilarity(fuzzyMinSim);
  }
View Full Code Here

Examples of org.apache.lucene.queryparser.flexible.core.config.QueryConfigHandler

 
  @Override
  protected QueryNode postProcessNode(QueryNode node) throws QueryNodeException {
   
    if (node instanceof TermRangeQueryNode) {
      QueryConfigHandler config = getQueryConfigHandler();
     
      if (config != null) {
        TermRangeQueryNode termRangeNode = (TermRangeQueryNode) node;
        FieldConfig fieldConfig = config.getFieldConfig(StringUtils
            .toString(termRangeNode.getField()));
       
        if (fieldConfig != null) {
         
          NumericConfig numericConfig = fieldConfig
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.