mirror of https://github.com/apache/lucene.git
LUCENE-9259: Fix wrong NGramFilterFactory argument name for preserveOriginal option
This commit is contained in:
parent
03c2557681
commit
c8dea5d77f
|
@ -1,5 +1,9 @@
|
|||
# Apache Lucene Migration Guide
|
||||
|
||||
## NGramFilterFactory "keepShortTerm" option was fixed to "preserveOriginal" (LUCENE-9259) ##
|
||||
|
||||
The factory option name to output the original term was corrected in accordance with its Javadoc.
|
||||
|
||||
## o.a.l.misc.IndexMergeTool defaults changes (LUCENE-9206) ##
|
||||
|
||||
This command-line tool no longer forceMerges to a single segment. Instead, by
|
||||
|
|
|
@ -51,10 +51,7 @@ public class NGramFilterFactory extends TokenFilterFactory {
|
|||
minGramSize = requireInt(args, "minGramSize");
|
||||
maxGramSize = requireInt(args, "maxGramSize");
|
||||
|
||||
// First check for the old accidental used option name. It was the only way to configure preserve original
|
||||
// for NGramFilter and ignoring it would unnecessary break existing configs.
|
||||
boolean preserve = getBoolean(args, "keepShortTerm", NGramTokenFilter.DEFAULT_PRESERVE_ORIGINAL);
|
||||
preserveOriginal = getBoolean(args, "preserveOriginal", preserve);
|
||||
preserveOriginal = getBoolean(args, "preserveOriginal", NGramTokenFilter.DEFAULT_PRESERVE_ORIGINAL);
|
||||
if (!args.isEmpty()) {
|
||||
throw new IllegalArgumentException("Unknown parameters: " + args);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue