Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 57F70200B94 for ; Sun, 2 Oct 2016 16:35:28 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 56980160AF4; Sun, 2 Oct 2016 14:35:28 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 42DD0160AEB for ; Sun, 2 Oct 2016 16:35:27 +0200 (CEST) Received: (qmail 95408 invoked by uid 500); 2 Oct 2016 14:35:20 -0000 Mailing-List: contact commits-help@lucenenet.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: lucene-net-dev@lucenenet.apache.org Delivered-To: mailing list commits@lucenenet.apache.org Received: (qmail 94379 invoked by uid 99); 2 Oct 2016 14:35:20 -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; Sun, 02 Oct 2016 14:35:20 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 43736E09D0; Sun, 2 Oct 2016 14:35:20 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: synhershko@apache.org To: commits@lucenenet.apache.org Date: Sun, 02 Oct 2016 14:35:49 -0000 Message-Id: <023f718fd293462ebc436d2db1017423@git.apache.org> In-Reply-To: <6014ffb9c2e748049fcffef430b6e351@git.apache.org> References: <6014ffb9c2e748049fcffef430b6e351@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [31/50] [abbrv] lucenenet git commit: Suggest: general housekeeping archived-at: Sun, 02 Oct 2016 14:35:28 -0000 Suggest: general housekeeping Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/e5132a40 Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/e5132a40 Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/e5132a40 Branch: refs/heads/master Commit: e5132a40184080e291fbe87dac9eb193ef6dffa5 Parents: da1b0ef Author: Shad Storhaug Authored: Sun Sep 18 22:59:28 2016 +0700 Committer: Shad Storhaug Committed: Sun Oct 2 17:44:53 2016 +0700 ---------------------------------------------------------------------- .../Suggest/Analyzing/AnalyzingInfixSuggester.cs | 6 ++++-- src/Lucene.Net.Suggest/Suggest/Analyzing/FSTUtil.cs | 1 - .../Suggest/Analyzing/FuzzySuggester.cs | 8 ++++++-- src/Lucene.Net.Suggest/Suggest/BufferedInputIterator.cs | 10 +++++----- src/Lucene.Net.Suggest/Suggest/SortedInputIterator.cs | 4 +++- .../Suggest/SortedTermFreqIteratorWrapper.cs | 3 ++- src/Lucene.Net.Suggest/Suggest/Tst/TSTAutocomplete.cs | 1 - 7 files changed, 20 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e5132a40/src/Lucene.Net.Suggest/Suggest/Analyzing/AnalyzingInfixSuggester.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Suggest/Suggest/Analyzing/AnalyzingInfixSuggester.cs b/src/Lucene.Net.Suggest/Suggest/Analyzing/AnalyzingInfixSuggester.cs index d839260..5847224 100644 --- a/src/Lucene.Net.Suggest/Suggest/Analyzing/AnalyzingInfixSuggester.cs +++ b/src/Lucene.Net.Suggest/Suggest/Analyzing/AnalyzingInfixSuggester.cs @@ -133,7 +133,8 @@ namespace Lucene.Net.Search.Suggest.Analyzing /// Prefixes shorter than this are indexed as character /// ngrams (increasing index size but making lookups /// faster). - public AnalyzingInfixSuggester(LuceneVersion matchVersion, Directory dir, Analyzer indexAnalyzer, Analyzer queryAnalyzer, int minPrefixChars) + public AnalyzingInfixSuggester(LuceneVersion matchVersion, Directory dir, Analyzer indexAnalyzer, + Analyzer queryAnalyzer, int minPrefixChars) { if (minPrefixChars < 0) @@ -159,7 +160,8 @@ namespace Lucene.Net.Search.Suggest.Analyzing /// Override this to customize index settings, e.g. which /// codec to use. /// - protected internal virtual IndexWriterConfig GetIndexWriterConfig(LuceneVersion matchVersion, Analyzer indexAnalyzer, IndexWriterConfig.OpenMode_e openMode) + protected internal virtual IndexWriterConfig GetIndexWriterConfig(LuceneVersion matchVersion, + Analyzer indexAnalyzer, IndexWriterConfig.OpenMode_e openMode) { IndexWriterConfig iwc = new IndexWriterConfig(matchVersion, indexAnalyzer); iwc.SetCodec(new Lucene46Codec()); http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e5132a40/src/Lucene.Net.Suggest/Suggest/Analyzing/FSTUtil.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Suggest/Suggest/Analyzing/FSTUtil.cs b/src/Lucene.Net.Suggest/Suggest/Analyzing/FSTUtil.cs index 3aed4d4..2c23a23 100644 --- a/src/Lucene.Net.Suggest/Suggest/Analyzing/FSTUtil.cs +++ b/src/Lucene.Net.Suggest/Suggest/Analyzing/FSTUtil.cs @@ -83,7 +83,6 @@ namespace Lucene.Net.Search.Suggest.Analyzing while (queue.Count != 0) { - //Path path = queue.RemoveAt(queue.Count - 1); Path path = queue.ElementAt(queue.Count - 1); queue.Remove(path); if (path.state.Accept) http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e5132a40/src/Lucene.Net.Suggest/Suggest/Analyzing/FuzzySuggester.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Suggest/Suggest/Analyzing/FuzzySuggester.cs b/src/Lucene.Net.Suggest/Suggest/Analyzing/FuzzySuggester.cs index a01da75..c81f03d 100644 --- a/src/Lucene.Net.Suggest/Suggest/Analyzing/FuzzySuggester.cs +++ b/src/Lucene.Net.Suggest/Suggest/Analyzing/FuzzySuggester.cs @@ -117,7 +117,9 @@ namespace Lucene.Net.Search.Suggest.Analyzing /// /// that will be used for analyzing query text during lookup public FuzzySuggester(Analyzer indexAnalyzer, Analyzer queryAnalyzer) - : this(indexAnalyzer, queryAnalyzer, EXACT_FIRST | PRESERVE_SEP, 256, -1, true, DEFAULT_MAX_EDITS, DEFAULT_TRANSPOSITIONS, DEFAULT_NON_FUZZY_PREFIX, DEFAULT_MIN_FUZZY_LENGTH, DEFAULT_UNICODE_AWARE) + : this(indexAnalyzer, queryAnalyzer, EXACT_FIRST | PRESERVE_SEP, 256, -1, true, + DEFAULT_MAX_EDITS, DEFAULT_TRANSPOSITIONS, DEFAULT_NON_FUZZY_PREFIX, + DEFAULT_MIN_FUZZY_LENGTH, DEFAULT_UNICODE_AWARE) { } @@ -144,7 +146,9 @@ namespace Lucene.Net.Search.Suggest.Analyzing /// length of common (non-fuzzy) prefix (see default /// minimum length of lookup key before any edits are allowed (see default ) /// operate Unicode code points instead of bytes. - public FuzzySuggester(Analyzer indexAnalyzer, Analyzer queryAnalyzer, int options, int maxSurfaceFormsPerAnalyzedForm, int maxGraphExpansions, bool preservePositionIncrements, int maxEdits, bool transpositions, int nonFuzzyPrefix, int minFuzzyLength, bool unicodeAware) + public FuzzySuggester(Analyzer indexAnalyzer, Analyzer queryAnalyzer, int options, + int maxSurfaceFormsPerAnalyzedForm, int maxGraphExpansions, bool preservePositionIncrements, + int maxEdits, bool transpositions, int nonFuzzyPrefix, int minFuzzyLength, bool unicodeAware) : base(indexAnalyzer, queryAnalyzer, options, maxSurfaceFormsPerAnalyzedForm, maxGraphExpansions, preservePositionIncrements) { if (maxEdits < 0 || maxEdits > LevenshteinAutomata.MAXIMUM_SUPPORTED_DISTANCE) http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e5132a40/src/Lucene.Net.Suggest/Suggest/BufferedInputIterator.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Suggest/Suggest/BufferedInputIterator.cs b/src/Lucene.Net.Suggest/Suggest/BufferedInputIterator.cs index e133411..d56f832 100644 --- a/src/Lucene.Net.Suggest/Suggest/BufferedInputIterator.cs +++ b/src/Lucene.Net.Suggest/Suggest/BufferedInputIterator.cs @@ -47,7 +47,7 @@ namespace Lucene.Net.Search.Suggest private readonly bool hasPayloads; private readonly IComparer comp; - private readonly bool hasContexts_Renamed; + private readonly bool hasContexts; /// /// Creates a new iterator, buffering entries from the specified iterator @@ -56,7 +56,7 @@ namespace Lucene.Net.Search.Suggest BytesRef spare; int freqIndex = 0; hasPayloads = source.HasPayloads; - hasContexts_Renamed = source.HasContexts; + hasContexts = source.HasContexts; while ((spare = source.Next()) != null) { entries.Append(spare); @@ -64,7 +64,7 @@ namespace Lucene.Net.Search.Suggest { payloads.Append(source.Payload); } - if (hasContexts_Renamed) + if (hasContexts) { contextSets.Add(source.Contexts); } @@ -121,7 +121,7 @@ namespace Lucene.Net.Search.Suggest { get { - if (hasContexts_Renamed && curPos < contextSets.Count) + if (hasContexts && curPos < contextSets.Count) { return contextSets[curPos]; } @@ -131,7 +131,7 @@ namespace Lucene.Net.Search.Suggest public virtual bool HasContexts { - get { return hasContexts_Renamed; } + get { return hasContexts; } } } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e5132a40/src/Lucene.Net.Suggest/Suggest/SortedInputIterator.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Suggest/Suggest/SortedInputIterator.cs b/src/Lucene.Net.Suggest/Suggest/SortedInputIterator.cs index 719c76d..9b7060a 100644 --- a/src/Lucene.Net.Suggest/Suggest/SortedInputIterator.cs +++ b/src/Lucene.Net.Suggest/Suggest/SortedInputIterator.cs @@ -268,7 +268,9 @@ namespace Lucene.Net.Search.Suggest /// /// encodes an entry (bytes+(contexts)+(payload)+weight) to the provided writer /// - protected internal virtual void Encode(OfflineSorter.ByteSequencesWriter writer, ByteArrayDataOutput output, byte[] buffer, BytesRef spare, BytesRef payload, IEnumerable contexts, long weight) + protected internal virtual void Encode(OfflineSorter.ByteSequencesWriter writer, + ByteArrayDataOutput output, byte[] buffer, BytesRef spare, BytesRef payload, + IEnumerable contexts, long weight) { int requiredLength = spare.Length + 8 + ((hasPayloads) ? 2 + payload.Length : 0); if (hasContexts) http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e5132a40/src/Lucene.Net.Suggest/Suggest/SortedTermFreqIteratorWrapper.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Suggest/Suggest/SortedTermFreqIteratorWrapper.cs b/src/Lucene.Net.Suggest/Suggest/SortedTermFreqIteratorWrapper.cs index ef58e04..67e9838 100644 --- a/src/Lucene.Net.Suggest/Suggest/SortedTermFreqIteratorWrapper.cs +++ b/src/Lucene.Net.Suggest/Suggest/SortedTermFreqIteratorWrapper.cs @@ -204,7 +204,8 @@ namespace Lucene.Net.Search.Suggest /// /// encodes an entry (bytes+weight) to the provided writer /// - protected internal virtual void Encode(OfflineSorter.ByteSequencesWriter writer, ByteArrayDataOutput output, byte[] buffer, BytesRef spare, long weight) + protected internal virtual void Encode(OfflineSorter.ByteSequencesWriter writer, + ByteArrayDataOutput output, byte[] buffer, BytesRef spare, long weight) { if (spare.Length + 8 >= buffer.Length) { http://git-wip-us.apache.org/repos/asf/lucenenet/blob/e5132a40/src/Lucene.Net.Suggest/Suggest/Tst/TSTAutocomplete.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Suggest/Suggest/Tst/TSTAutocomplete.cs b/src/Lucene.Net.Suggest/Suggest/Tst/TSTAutocomplete.cs index f4a6137..71fcbd6 100644 --- a/src/Lucene.Net.Suggest/Suggest/Tst/TSTAutocomplete.cs +++ b/src/Lucene.Net.Suggest/Suggest/Tst/TSTAutocomplete.cs @@ -202,5 +202,4 @@ namespace Lucene.Net.Search.Suggest.Tst return suggest; } } - } \ No newline at end of file