Package org.apache.lucene.sandbox.queries.regex

Examples of org.apache.lucene.sandbox.queries.regex.JavaUtilRegexCapabilities


  }

  private RegexQuery getFallbackRegexQuery(String str) {
    // No lowercase of str, so '\p{Punct}' doesn't become '\p{punct}':
    final RegexQuery query = new RegexQuery(new Term(FIELD_NAME_LOWERCASE, str));
    query.setRegexImplementation(new JavaUtilRegexCapabilities(JavaUtilRegexCapabilities.FLAG_CASE_INSENSITIVE));
    return query;
  }
View Full Code Here


  /** Return a query with the old (and slow, but more complete) way Lucene implements regular expressions. */
  private RegexQuery getFallbackRegexQuery(String str, Element element) {
    // No lowercase of str, so '\p{Punct}' doesn't become '\p{punct}':
    final RegexQuery query = new RegexQuery(new Term(element.isCaseSensitive() ? FIELD_NAME : FIELD_NAME_LOWERCASE, str));
    query.setRegexImplementation(new JavaUtilRegexCapabilities(JavaUtilRegexCapabilities.FLAG_CASE_INSENSITIVE));
    return query;
  }
View Full Code Here

TOP

Related Classes of org.apache.lucene.sandbox.queries.regex.JavaUtilRegexCapabilities

Copyright © 2018 www.massapicom. 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.