Add `matchBoolPrefix` method to QueryBuilders (#58637)
This commit is contained in:
parent
735a3f344d
commit
be20aacec3
|
@ -84,7 +84,17 @@ public final class QueryBuilders {
|
|||
public static MultiMatchQueryBuilder multiMatchQuery(Object text, String... fieldNames) {
|
||||
return new MultiMatchQueryBuilder(text, fieldNames); // BOOLEAN is the default
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates a text query with type "BOOL_PREFIX" for the provided field name and text.
|
||||
*
|
||||
* @param name The field name.
|
||||
* @param text The query text (to be analyzed).
|
||||
*/
|
||||
public static MatchBoolPrefixQueryBuilder matchBoolPrefixQuery(String name, Object text) {
|
||||
return new MatchBoolPrefixQueryBuilder(name, text);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a text query with type "PHRASE" for the provided field name and text.
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue