Skip to content

Commit

Permalink
update javadocs for new wildcard methods
Browse files Browse the repository at this point in the history
Signed-off-by: Nicholas Walter Knize <nknize@apache.org>
  • Loading branch information
nknize committed Dec 8, 2022
1 parent 378310b commit 8cea795
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ public final Query wildcardQuery(String value, @Nullable MultiTermQuery.RewriteM
return wildcardQuery(value, method, false, context);
}

/** optionally normalize the wildcard pattern based on the value of {@code caseInsensitive} */
public Query wildcardQuery(
String value,
@Nullable MultiTermQuery.RewriteMethod method,
Expand All @@ -302,6 +303,7 @@ public Query wildcardQuery(
);
}

/** always normalizes the wildcard pattern to lowercase */
public Query normalizedWildcardQuery(String value, @Nullable MultiTermQuery.RewriteMethod method, QueryShardContext context) {
throw new QueryShardException(
context,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,13 @@ public static final String normalizeWildcardPattern(String fieldname, String val
return sb.toBytesRef().utf8ToString();
}

/** optionally normalize the wildcard pattern based on the value of {@code caseInsensitive} */
@Override
public Query wildcardQuery(String value, MultiTermQuery.RewriteMethod method, boolean caseInsensitive, QueryShardContext context) {
return wildcardQuery(value, method, caseInsensitive, false, context);
}

/** always normalizes the wildcard pattern to lowercase */
@Override
public Query normalizedWildcardQuery(String value, MultiTermQuery.RewriteMethod method, QueryShardContext context) {
return wildcardQuery(value, method, false, true, context);
Expand Down

0 comments on commit 8cea795

Please sign in to comment.