@Override
protected Query getWildcardQuery(String field, String termStr) throws ParseException {
if (termStr == null){
//can't imagine this would ever happen
throw new ParseException("Passed null value as term to getWildcardQuery");
}
if ( ! getAllowLeadingWildcard() && (termStr.startsWith("*") || termStr.startsWith("?"))) {
throw new ParseException("'*' or '?' not allowed as first character in WildcardQuery"
+ " unless getAllowLeadingWildcard() returns true");
}
Matcher wildcardMatcher = wildcardPattern.matcher(termStr);
StringBuilder sb = new StringBuilder();