mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 10:25:15 +00:00
Properly fix the default regex flag to ALL for RegexpQueryBuilder and Parser
Relates to #11896 Closes #12067
This commit is contained in:
parent
67318ce7ba
commit
5e023848de
@ -32,7 +32,7 @@ public class RegexpQueryBuilder extends MultiTermQueryBuilder implements Boostab
|
|||||||
private final String name;
|
private final String name;
|
||||||
private final String regexp;
|
private final String regexp;
|
||||||
|
|
||||||
private int flags = -1;
|
private int flags = RegexpQueryParser.DEFAULT_FLAGS_VALUE;
|
||||||
private float boost = -1;
|
private float boost = -1;
|
||||||
private String rewrite;
|
private String rewrite;
|
||||||
private String queryName;
|
private String queryName;
|
||||||
|
@ -39,6 +39,8 @@ public class RegexpQueryParser implements QueryParser {
|
|||||||
|
|
||||||
public static final String NAME = "regexp";
|
public static final String NAME = "regexp";
|
||||||
|
|
||||||
|
public static final int DEFAULT_FLAGS_VALUE = RegexpFlag.ALL.value();
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public RegexpQueryParser() {
|
public RegexpQueryParser() {
|
||||||
}
|
}
|
||||||
@ -57,7 +59,7 @@ public class RegexpQueryParser implements QueryParser {
|
|||||||
|
|
||||||
Object value = null;
|
Object value = null;
|
||||||
float boost = 1.0f;
|
float boost = 1.0f;
|
||||||
int flagsValue = -1;
|
int flagsValue = DEFAULT_FLAGS_VALUE;
|
||||||
int maxDeterminizedStates = Operations.DEFAULT_MAX_DETERMINIZED_STATES;
|
int maxDeterminizedStates = Operations.DEFAULT_MAX_DETERMINIZED_STATES;
|
||||||
String queryName = null;
|
String queryName = null;
|
||||||
String currentFieldName = null;
|
String currentFieldName = null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user