linyunanit commented on code in PR #15332:
URL: https://github.com/apache/lucene/pull/15332#discussion_r2425795976


##########
lucene/core/src/java/org/apache/lucene/search/PhraseQuery.java:
##########
@@ -128,6 +136,13 @@ public Builder add(Term term, int position) {
                 + " and "
                 + terms.get(0).field());
       }
+      if (termThreshold > 0 && terms.size() >= termThreshold) {
+        throw new IllegalArgumentException(
+            "The current value of terms is "

Review Comment:
   Thanks for the suggestion, Dawid! 👍



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to