rmuir commented on a change in pull request #722:
URL: https://github.com/apache/lucene/pull/722#discussion_r817991640
##########
File path: lucene/core/src/java/org/apache/lucene/search/FuzzyQuery.java
##########
@@ -113,11 +138,40 @@ public FuzzyQuery(Term term, int maxEdits) {
this(term, maxEdits, defaultPrefixLength);
}
+ /**
+ * Calls {@link #FuzzyQuery(Term, int, int, int, boolean,
+ * org.apache.lucene.search.MultiTermQuery.RewriteMethod) FuzzyQuery(term,
maxEdits,
+ * defaultPrefixLength, defaultMaxExpansions, defaultTransitions,
defaultRewriteMethod)}.
+ */
+ public FuzzyQuery(Term term, int maxEdits, RewriteMethod rewriteMethod) {
+ this(
+ term,
+ maxEdits,
+ defaultPrefixLength,
+ defaultMaxExpansions,
+ defaultTranspositions,
+ rewriteMethod);
+ }
+
/** Calls {@link #FuzzyQuery(Term, int) FuzzyQuery(term, defaultMaxEdits)}.
*/
public FuzzyQuery(Term term) {
this(term, defaultMaxEdits);
}
+ /**
+ * Creates a new FuzzyQuery with default max edits, prefix length, max
expansions and
+ * transpositions
+ */
+ public FuzzyQuery(Term term, RewriteMethod rewriteMethod) {
+ this(
+ term,
+ defaultMaxEdits,
+ defaultPrefixLength,
+ defaultMaxExpansions,
+ defaultTranspositions,
+ rewriteMethod);
+ }
Review comment:
Why do we need a builder? Why not just only add `RewriteMethod`
parameter to the "full ctor". Don't add any more "sugar" ctors, we already
have enough. This change currently wants to add something like 4 but none are
necessary.
--
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]