From commits-return-101378-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Tue Jun 5 04:41:10 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 0CFFB180636 for ; Tue, 5 Jun 2018 04:41:09 +0200 (CEST) Received: (qmail 7361 invoked by uid 500); 5 Jun 2018 02:41:09 -0000 Mailing-List: contact commits-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list commits@lucene.apache.org Received: (qmail 7352 invoked by uid 99); 5 Jun 2018 02:41:09 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jun 2018 02:41:09 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id E2235DFA59; Tue, 5 Jun 2018 02:41:08 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: rmuir@apache.org To: commits@lucene.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: lucene-solr:master: LUCENE-7960: remove deprecations Date: Tue, 5 Jun 2018 02:41:08 +0000 (UTC) Repository: lucene-solr Updated Branches: refs/heads/master 208d4a9c3 -> 5c6a49b13 LUCENE-7960: remove deprecations Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/5c6a49b1 Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/5c6a49b1 Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/5c6a49b1 Branch: refs/heads/master Commit: 5c6a49b13f47789c828995f747ec541810bdd0b4 Parents: 208d4a9 Author: Robert Muir Authored: Mon Jun 4 22:40:48 2018 -0400 Committer: Robert Muir Committed: Mon Jun 4 22:40:48 2018 -0400 ---------------------------------------------------------------------- .../analysis/ngram/EdgeNGramFilterFactory.java | 4 +- .../analysis/ngram/EdgeNGramTokenFilter.java | 31 ------------- .../analysis/ngram/NGramFilterFactory.java | 4 +- .../lucene/analysis/ngram/NGramTokenFilter.java | 49 -------------------- 4 files changed, 4 insertions(+), 84 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5c6a49b1/lucene/analysis/common/src/java/org/apache/lucene/analysis/ngram/EdgeNGramFilterFactory.java ---------------------------------------------------------------------- diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/ngram/EdgeNGramFilterFactory.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/ngram/EdgeNGramFilterFactory.java index bd7ca1f..db6a22a 100644 --- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/ngram/EdgeNGramFilterFactory.java +++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/ngram/EdgeNGramFilterFactory.java @@ -41,8 +41,8 @@ public class EdgeNGramFilterFactory extends TokenFilterFactory { /** Creates a new EdgeNGramFilterFactory */ public EdgeNGramFilterFactory(Map args) { super(args); - minGramSize = getInt(args, "minGramSize", EdgeNGramTokenFilter.DEFAULT_MIN_GRAM_SIZE); - maxGramSize = getInt(args, "maxGramSize", EdgeNGramTokenFilter.DEFAULT_MAX_GRAM_SIZE); + minGramSize = requireInt(args, "minGramSize"); + maxGramSize = requireInt(args, "maxGramSize"); preserveOriginal = getBoolean(args, "preserveOriginal", EdgeNGramTokenFilter.DEFAULT_PRESERVE_ORIGINAL); if (!args.isEmpty()) { throw new IllegalArgumentException("Unknown parameters: " + args); http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5c6a49b1/lucene/analysis/common/src/java/org/apache/lucene/analysis/ngram/EdgeNGramTokenFilter.java ---------------------------------------------------------------------- diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/ngram/EdgeNGramTokenFilter.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/ngram/EdgeNGramTokenFilter.java index 154f075..613f8a1 100644 --- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/ngram/EdgeNGramTokenFilter.java +++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/ngram/EdgeNGramTokenFilter.java @@ -32,16 +32,6 @@ import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute; * supplementary characters. */ public final class EdgeNGramTokenFilter extends TokenFilter { - /** - * @deprecated since 7.4 - this value will be required. - */ - @Deprecated - public static final int DEFAULT_MAX_GRAM_SIZE = 1; - /** - * @deprecated since 7.4 - this value will be required. - */ - @Deprecated - public static final int DEFAULT_MIN_GRAM_SIZE = 1; public static final boolean DEFAULT_PRESERVE_ORIGINAL = false; private final int minGram; @@ -98,27 +88,6 @@ public final class EdgeNGramTokenFilter extends TokenFilter { this(input, gramSize, gramSize, DEFAULT_PRESERVE_ORIGINAL); } - /** - * Creates an EdgeNGramTokenFilter that, for a given input term, produces all - * edge n-grams with lengths >= minGram and <= maxGram. - * - *

- * Behaves the same as - * {@link #EdgeNGramTokenFilter(TokenStream, int, int, boolean) - * NGramTokenFilter(input, minGram, maxGram, false)} - * - * @param input {@link TokenStream} holding the input to be tokenized - * @param minGram the minimum length of the generated n-grams - * @param maxGram the maximum length of the generated n-grams - * - * @deprecated since 7.4. Use - * {@link #EdgeNGramTokenFilter(TokenStream, int, int, boolean)} instead. - */ - @Deprecated - public EdgeNGramTokenFilter(TokenStream input, int minGram, int maxGram) { - this(input, minGram, maxGram, DEFAULT_PRESERVE_ORIGINAL); - } - @Override public final boolean incrementToken() throws IOException { while (true) { http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5c6a49b1/lucene/analysis/common/src/java/org/apache/lucene/analysis/ngram/NGramFilterFactory.java ---------------------------------------------------------------------- diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/ngram/NGramFilterFactory.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/ngram/NGramFilterFactory.java index 0a7e77d..9a681df 100644 --- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/ngram/NGramFilterFactory.java +++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/ngram/NGramFilterFactory.java @@ -41,8 +41,8 @@ public class NGramFilterFactory extends TokenFilterFactory { /** Creates a new NGramFilterFactory */ public NGramFilterFactory(Map args) { super(args); - minGramSize = getInt(args, "minGramSize", NGramTokenFilter.DEFAULT_MIN_NGRAM_SIZE); - maxGramSize = getInt(args, "maxGramSize", NGramTokenFilter.DEFAULT_MAX_NGRAM_SIZE); + minGramSize = requireInt(args, "minGramSize"); + maxGramSize = requireInt(args, "maxGramSize"); preserveOriginal = getBoolean(args, "keepShortTerm", NGramTokenFilter.DEFAULT_PRESERVE_ORIGINAL); if (!args.isEmpty()) { throw new IllegalArgumentException("Unknown parameters: " + args); http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5c6a49b1/lucene/analysis/common/src/java/org/apache/lucene/analysis/ngram/NGramTokenFilter.java ---------------------------------------------------------------------- diff --git a/lucene/analysis/common/src/java/org/apache/lucene/analysis/ngram/NGramTokenFilter.java b/lucene/analysis/common/src/java/org/apache/lucene/analysis/ngram/NGramTokenFilter.java index 8e1a7e4..5b6147b 100644 --- a/lucene/analysis/common/src/java/org/apache/lucene/analysis/ngram/NGramTokenFilter.java +++ b/lucene/analysis/common/src/java/org/apache/lucene/analysis/ngram/NGramTokenFilter.java @@ -39,17 +39,6 @@ import org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute; * override {@link NGramTokenizer#isTokenChar(int)} to perform pre-tokenization. */ public final class NGramTokenFilter extends TokenFilter { - /** - * @deprecated since 7.4 - this value will be required. - */ - @Deprecated - public static final int DEFAULT_MIN_NGRAM_SIZE = 1; - - /** - * @deprecated since 7.4 - this value will be required. - */ - @Deprecated - public static final int DEFAULT_MAX_NGRAM_SIZE = 2; public static final boolean DEFAULT_PRESERVE_ORIGINAL = false; private final int minGram; @@ -106,44 +95,6 @@ public final class NGramTokenFilter extends TokenFilter { this(input, gramSize, gramSize, DEFAULT_PRESERVE_ORIGINAL); } - /** - * Creates an NGramTokenFilter that, for a given input term, produces all - * contained n-grams with lengths >= minGram and <= maxGram. - * - *

- * Behaves the same as - * {@link #NGramTokenFilter(TokenStream, int, int, boolean) - * NGramTokenFilter(input, minGram, maxGram, false)} - * - * @param input {@link TokenStream} holding the input to be tokenized - * @param minGram the minimum length of the generated n-grams - * @param maxGram the maximum length of the generated n-grams - * - * @deprecated since 7.4. Use - * {@link #NGramTokenFilter(TokenStream, int, int, boolean)} instead. - */ - @Deprecated - public NGramTokenFilter(TokenStream input, int minGram, int maxGram) { - this(input, minGram, maxGram, DEFAULT_PRESERVE_ORIGINAL); - } - - /** - * Creates NGramTokenFilter with default min and max n-grams. - * - *

- * Behaves the same as - * {@link #NGramTokenFilter(TokenStream, int, int, boolean) - * NGramTokenFilter(input, 1, 2, false)} - * - * @param input {@link TokenStream} holding the input to be tokenized - * @deprecated since 7.4. Use - * {@link #NGramTokenFilter(TokenStream, int, int, boolean)} instead. - */ - @Deprecated - public NGramTokenFilter(TokenStream input) { - this(input, DEFAULT_MIN_NGRAM_SIZE, DEFAULT_MAX_NGRAM_SIZE, DEFAULT_PRESERVE_ORIGINAL); - } - @Override public final boolean incrementToken() throws IOException { while (true) {