diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/synonym/word2vec/Word2VecSynonymFilter.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/synonym/word2vec/Word2VecSynonymFilter.java index 6088d8d6efc9..29f9d37d5fdf 100644 --- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/synonym/word2vec/Word2VecSynonymFilter.java +++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/synonym/word2vec/Word2VecSynonymFilter.java @@ -65,9 +65,6 @@ public Word2VecSynonymFilter( int maxSynonymsPerTerm, float minAcceptedSimilarity) { super(input); - if (synonymProvider == null) { - throw new IllegalArgumentException("The SynonymProvider must be non-null"); - } this.synonymProvider = synonymProvider; this.maxSynonymsPerTerm = maxSynonymsPerTerm; this.minAcceptedSimilarity = minAcceptedSimilarity;