@@ -83,7 +83,7 @@ public RegexpQuery(Term term, int flags) {
8383 * Constructs a query for terms matching <code>term</code>.
8484 *
8585 * @param term regular expression.
86- * @param flags optional RegExp features from {@link RegExp}
86+ * @param flags optional RegExp syntax features from {@link RegExp}
8787 * @param maxDeterminizedStates maximum number of states that compiling the
8888 * automaton for the regexp can result in. Set higher to allow more complex
8989 * queries and lower to prevent memory exhaustion.
@@ -96,16 +96,46 @@ public RegexpQuery(Term term, int flags, int maxDeterminizedStates) {
9696 * Constructs a query for terms matching <code>term</code>.
9797 *
9898 * @param term regular expression.
99- * @param flags optional RegExp features from {@link RegExp}
99+ * @param syntax_flags optional RegExp syntax features from {@link RegExp}
100+ * automaton for the regexp can result in. Set higher to allow more complex
101+ * queries and lower to prevent memory exhaustion.
102+ * @param match_flags boolean 'or' of match behavior options such as case insensitivity
103+ * @param maxDeterminizedStates maximum number of states that compiling the
104+ */
105+ public RegexpQuery (Term term , int syntax_flags , int match_flags , int maxDeterminizedStates ) {
106+ this (term , syntax_flags , match_flags , defaultProvider , maxDeterminizedStates );
107+ }
108+
109+ /**
110+ * Constructs a query for terms matching <code>term</code>.
111+ *
112+ * @param term regular expression.
113+ * @param syntax_flags optional RegExp features from {@link RegExp}
114+ * @param provider custom AutomatonProvider for named automata
115+ * @param maxDeterminizedStates maximum number of states that compiling the
116+ * automaton for the regexp can result in. Set higher to allow more complex
117+ * queries and lower to prevent memory exhaustion.
118+ */
119+ public RegexpQuery (Term term , int syntax_flags , AutomatonProvider provider ,
120+ int maxDeterminizedStates ) {
121+ this (term , syntax_flags , 0 , provider , maxDeterminizedStates );
122+ }
123+
124+ /**
125+ * Constructs a query for terms matching <code>term</code>.
126+ *
127+ * @param term regular expression.
128+ * @param syntax_flags optional RegExp features from {@link RegExp}
129+ * @param match_flags boolean 'or' of match behavior options such as case insensitivity
100130 * @param provider custom AutomatonProvider for named automata
101131 * @param maxDeterminizedStates maximum number of states that compiling the
102132 * automaton for the regexp can result in. Set higher to allow more complex
103133 * queries and lower to prevent memory exhaustion.
104134 */
105- public RegexpQuery (Term term , int flags , AutomatonProvider provider ,
135+ public RegexpQuery (Term term , int syntax_flags , int match_flags , AutomatonProvider provider ,
106136 int maxDeterminizedStates ) {
107137 super (term ,
108- new RegExp (term .text (), flags ).toAutomaton (
138+ new RegExp (term .text (), syntax_flags , match_flags ).toAutomaton (
109139 provider , maxDeterminizedStates ), maxDeterminizedStates );
110140 }
111141
0 commit comments