You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2020/07/29 17:11:05 UTC

[lucenenet] branch master updated (43745db -> 7622fbf)

This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git.


    from 43745db  Lucene.Net.Tests.Analysis.Common: Fixed potential issue with ArgumentExceptions being thrown from char.ConvertToUtf32(string, int) by reverting back to CodePointAt() method in TestCharTokenizers.TestCrossPlaneNomalization().
     new b4c473e  PERFORMANCE: Lucene.Net.TestFramework: Fixed FSTTester to delete while iterating forward instead of using .ElementAt() to iterate in reverse, which takes about 3x longer (see #261)
     new 4bdb4e3  PERFORMANCE: Lucene.Net.Facet.Taxonomy.WriterCache.NameInt32CacheLRU: Changed from Dictionary to ConcurrentDictionary so we can delete items from the cache while forward iterating through it. (see #261)
     new 299e047  PERFORMANCE: Lucene.Net.Index.FieldInfos: Changed Builder.FieldInfo() method to TryGetFieldInfo() to optimize check for value (see #261)
     new af89b66  build/Dependencies.props: Upgraded J2N package dependency to 2.0.0-beta-0009
     new ca6e0dc  build.Dependencies.props: Upgraded ICU4N package version to 60.1.0-alpha.352
     new de24ba2  build/Dependencies.props: Updated Morfologik.Stemming dependency to 2.1.6-beta0007
     new 5f9bcb9  PERFORMANCE: Use J2N's ICollection<T>.ToArray() extension method that uses ICollection<T>.CopyTo(), which takes precedence over the LINQ IEnumerable<T>.ToArray() extension method. Benchmarks show about a 1/3 increase in performance. (see #261)
     new 75f4e0b  Lucene.Net.Support.IO.FileSupport::CreateTempFile(): Optimized the check for invalid characters to shave off a few ns
     new 17c12be  Directory.Build.props: Disabled warnings for features that require .NET Standard 2.1
     new 61bd539  PERFORMANCE: Eliminated several calls to FirstOrDefault(), LastOrDefault(), Skip(), First(), and Last() (see #261)
     new f49ad81  Lucene.Net.QueryParser.Surround.Query.ComposedQuery::MakeLuceneSubQueriesField(): Added missing using block on enumerator
     new 4302e0f  Lucene.Net.Support.ListExtensions: Factored out BinarySearch in favor of implementation from J2N
     new 4266e17  Lucene.Net.Suggest.FreeTextSuggester: Converted from SubList().Clear() to RemoveRange()
     new 7622fbf  Lucene.Net.TestFramework: Fixed broken XML doc comment

The 14 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 Directory.Build.props                              |   3 +
 build/Dependencies.props                           |   6 +-
 .../Analysis/Pt/RSLPStemmerBase.cs                 |   4 +-
 .../Analysis/Query/QueryAutoStopWordAnalyzer.cs    |   4 +-
 .../Analysis/Synonym/SlowSynonymMap.cs             |   4 +-
 .../JapaneseTokenizer.cs                           |   3 +-
 .../OpenNLPChunkerFilter.cs                        |   5 +-
 .../OpenNLPLemmatizerFilter.cs                     |   5 +-
 .../OpenNLPPOSFilter.cs                            |   3 +-
 .../Language/Bm/PhoneticEngine.cs                  |   4 +-
 .../ByTask/Feeds/EnwikiQueryMaker.cs               |   4 +-
 .../ByTask/Feeds/SimpleSloppyPhraseQueryMaker.cs   |   3 +-
 src/Lucene.Net.Benchmark/Quality/QualityQuery.cs   |   4 +-
 src/Lucene.Net.Benchmark/Quality/QualityStats.cs   |   4 +-
 .../Quality/Trec/QueryDriver.cs                    |   6 +-
 .../Quality/Trec/Trec1MQReader.cs                  |   6 +-
 .../Quality/Trec/TrecTopicsReader.cs               |   6 +-
 .../Quality/Utils/DocNameExtractor.cs              |   3 +-
 src/Lucene.Net.Facet/DrillSideways.cs              |   4 +-
 src/Lucene.Net.Facet/FacetsConfig.cs               |   8 +-
 .../Taxonomy/WriterCache/NameIntCacheLRU.cs        |  24 +--
 src/Lucene.Net.Grouping/SearchGroup.cs             |   5 +-
 .../Highlight/QueryTermExtractor.cs                |   4 +-
 .../PostingsHighlight/PostingsHighlighter.cs       |   2 +-
 src/Lucene.Net.Memory/MemoryIndex.Info.cs          |  38 +++--
 .../MemoryIndex.MemoryIndexReader.cs               |  40 +++--
 src/Lucene.Net.Memory/MemoryIndex.TermComparer.cs  |  38 +++--
 .../Index/MultiPassIndexSplitter.cs                |   4 +-
 .../Index/Sorter/SortingMergePolicy.cs             |   4 +-
 src/Lucene.Net.Queries/CommonTermsQuery.cs         |   4 +-
 src/Lucene.Net.Queries/Mlt/MoreLikeThis.cs         |   4 +-
 .../Surround/Query/ComposedQuery.cs                |  10 +-
 .../Surround/Query/NotQuery.cs                     |  18 ++-
 .../Suggest/Analyzing/AnalyzingSuggester.cs        |   4 +-
 .../Suggest/Analyzing/FreeTextSuggester.cs         |   5 +-
 .../Analysis/BaseTokenStreamTestCase.cs            |   2 +-
 .../Index/AlcoholicMergePolicy.cs                  |   3 +-
 .../Index/BaseStoredFieldsFormatTestCase.cs        |   1 -
 .../Search/ShardSearchingTestBase.cs               |   2 +-
 .../Configuration/TestConfigurationFactory.cs      |   2 +-
 src/Lucene.Net.TestFramework/Util/Fst/FSTTester.cs | 111 +++++++-------
 .../Miscellaneous/TestStemmerOverrideFilter.cs     |   2 +-
 .../Analysis/Miscellaneous/TestTrimFilter.cs       |   3 +-
 .../Analysis/Synonym/TestSlowSynonymFilter.cs      |   3 +-
 src/Lucene.Net.Tests.Facet/TestDrillSideways.cs    |   9 +-
 src/Lucene.Net.Tests.Join/TestBlockJoin.cs         |  11 +-
 .../Index/Sorter/SorterTestBase.cs                 |   3 +-
 src/Lucene.Net.Tests.Misc/Util/Fst/TestFSTsMisc.cs |  43 +++---
 .../Index/TestBackwardsCompatibility.cs            |   1 +
 src/Lucene.Net.Tests/Index/TestDocTermOrds.cs      |   3 +-
 src/Lucene.Net.Tests/Index/TestMaxTermFrequency.cs |   3 +-
 src/Lucene.Net.Tests/Index/TestPostingsOffsets.cs  |   1 +
 .../Search/TestMultiPhraseQuery.cs                 |   5 +-
 .../Search/TestPhrasePrefixQuery.cs                |   6 +-
 src/Lucene.Net.Tests/Support/TestListExtensions.cs | 169 ---------------------
 .../Util/Automaton/TestCompiledAutomaton.cs        |   3 +-
 src/Lucene.Net.Tests/Util/Fst/TestFSTs.cs          |  17 +--
 .../Util/TestRecyclingByteBlockAllocator.cs        |   1 +
 .../Util/TestRecyclingIntBlockAllocator.cs         |   1 +
 src/Lucene.Net/Codecs/DocValuesConsumer.cs         |   2 +-
 src/Lucene.Net/Index/FieldInfos.cs                 |  12 +-
 src/Lucene.Net/Index/FrozenBufferedUpdates.cs      |   5 +-
 src/Lucene.Net/Index/MultiFields.cs                |   2 +-
 src/Lucene.Net/Index/MultiTerms.cs                 |   2 +-
 src/Lucene.Net/Index/SegmentDocValues.cs           |   2 +-
 src/Lucene.Net/Index/SegmentMerger.cs              |   2 +-
 src/Lucene.Net/Index/StandardDirectoryReader.cs    |   2 +-
 src/Lucene.Net/Search/BooleanQuery.cs              |   2 +-
 src/Lucene.Net/Search/BooleanScorer2.cs            |   2 +-
 src/Lucene.Net/Search/DisjunctionMaxQuery.cs       |   4 +-
 src/Lucene.Net/Search/FieldCacheImpl.cs            |   6 +-
 src/Lucene.Net/Search/FuzzyTermsEnum.cs            |   2 +-
 src/Lucene.Net/Search/MinShouldMatchSumScorer.cs   |   2 +-
 src/Lucene.Net/Search/PhraseQuery.cs               |   2 +-
 src/Lucene.Net/Search/SloppyPhraseScorer.cs        |   2 +-
 src/Lucene.Net/Search/Spans/SpanNearQuery.cs       |   2 +-
 src/Lucene.Net/Search/Spans/SpanOrQuery.cs         |   2 +-
 src/Lucene.Net/Search/TopTermsRewrite.cs           |   5 +-
 src/Lucene.Net/Store/CompoundFileDirectory.cs      |   2 +-
 src/Lucene.Net/Store/CompoundFileWriter.cs         |   2 +-
 src/Lucene.Net/Store/FileSwitchDirectory.cs        |   2 +-
 src/Lucene.Net/Store/LockStressTest.cs             |   3 +-
 src/Lucene.Net/Store/NRTCachingDirectory.cs        |   4 +-
 src/Lucene.Net/Store/RAMDirectory.cs               |   2 +-
 .../Support/CollectionExtensions.cs}               |  28 ++--
 src/Lucene.Net/Support/IO/FileSupport.cs           |  15 +-
 src/Lucene.Net/Support/Index/TaskMergeScheduler.cs |   3 +-
 src/Lucene.Net/Support/ListExtensions.cs           |  72 ---------
 src/Lucene.Net/Support/SetExtensions.cs            |  10 --
 src/Lucene.Net/Support/Text/StringExtensions.cs    |  52 +++++++
 src/Lucene.Net/Support/Util/ExceptionExtensions.cs |   3 +-
 src/Lucene.Net/Support/WeakDictionary.cs           |   4 +-
 src/Lucene.Net/Util/Attribute.cs                   |   6 -
 src/Lucene.Net/Util/Automaton/Automaton.cs         |   2 +-
 src/Lucene.Net/Util/Automaton/SpecialOperations.cs |   1 +
 src/Lucene.Net/Util/ByteBlockPool.cs               |   2 +-
 src/Lucene.Net/Util/QueryBuilder.cs                |   2 +-
 src/Lucene.Net/Util/SPIClassIterator.cs            |   1 -
 98 files changed, 383 insertions(+), 591 deletions(-)
 delete mode 100644 src/Lucene.Net.Tests/Support/TestListExtensions.cs
 copy src/{Lucene.Net.TestFramework/Support/Randomized/Generators/RandomPicks.cs => Lucene.Net/Support/CollectionExtensions.cs} (50%)
 create mode 100644 src/Lucene.Net/Support/Text/StringExtensions.cs


[lucenenet] 06/14: build/Dependencies.props: Updated Morfologik.Stemming dependency to 2.1.6-beta0007

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit de24ba2e9b5f7b975bce52d86fd1f14878b2f4b0
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Wed Jul 29 02:34:29 2020 +0700

    build/Dependencies.props: Updated Morfologik.Stemming dependency to 2.1.6-beta0007
---
 build/Dependencies.props | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build/Dependencies.props b/build/Dependencies.props
index d7ac200..c0795e0 100644
--- a/build/Dependencies.props
+++ b/build/Dependencies.props
@@ -58,7 +58,7 @@
     <MicrosoftExtensionsConfigurationXmlPackageVersion>$(MicrosoftExtensionsConfigurationPackageVersion)</MicrosoftExtensionsConfigurationXmlPackageVersion>
     <MicrosoftExtensionsDependencyInjectionPackageVersion>3.1.4</MicrosoftExtensionsDependencyInjectionPackageVersion>
     <MicrosoftNETTestSdkPackageVersion>16.6.1</MicrosoftNETTestSdkPackageVersion>
-    <MorfologikFsaPackageVersion>2.1.6-beta-0005</MorfologikFsaPackageVersion>
+    <MorfologikFsaPackageVersion>2.1.6-beta-0007</MorfologikFsaPackageVersion>
     <MorfologikPolishPackageVersion>$(MorfologikFsaPackageVersion)</MorfologikPolishPackageVersion>
     <MorfologikStemmingPackageVersion>$(MorfologikFsaPackageVersion)</MorfologikStemmingPackageVersion>
     <MSTestTestFrameworkPackageVersion>2.0.0</MSTestTestFrameworkPackageVersion>


[lucenenet] 07/14: PERFORMANCE: Use J2N's ICollection.ToArray() extension method that uses ICollection.CopyTo(), which takes precedence over the LINQ IEnumerable.ToArray() extension method. Benchmarks show about a 1/3 increase in performance. (see #261)

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit 5f9bcb999f6e2ce80a11d186a99400933722db7e
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Fri Jul 24 06:17:07 2020 +0700

    PERFORMANCE: Use J2N's ICollection<T>.ToArray() extension method that uses ICollection<T>.CopyTo(), which takes precedence over the LINQ IEnumerable<T>.ToArray() extension method. Benchmarks show about a 1/3 increase in performance. (see #261)
---
 .../Analysis/Pt/RSLPStemmerBase.cs                 |  4 +-
 .../Analysis/Query/QueryAutoStopWordAnalyzer.cs    |  4 +-
 .../Analysis/Synonym/SlowSynonymMap.cs             |  4 +-
 .../OpenNLPChunkerFilter.cs                        |  5 +--
 .../OpenNLPLemmatizerFilter.cs                     |  5 +--
 .../OpenNLPPOSFilter.cs                            |  3 +-
 .../ByTask/Feeds/EnwikiQueryMaker.cs               |  4 +-
 .../ByTask/Feeds/SimpleSloppyPhraseQueryMaker.cs   |  3 +-
 src/Lucene.Net.Benchmark/Quality/QualityQuery.cs   |  4 +-
 src/Lucene.Net.Benchmark/Quality/QualityStats.cs   |  4 +-
 .../Quality/Trec/QueryDriver.cs                    |  6 +--
 .../Quality/Trec/Trec1MQReader.cs                  |  6 +--
 .../Quality/Trec/TrecTopicsReader.cs               |  6 +--
 src/Lucene.Net.Facet/DrillSideways.cs              |  4 +-
 src/Lucene.Net.Facet/FacetsConfig.cs               |  8 ++--
 .../Highlight/QueryTermExtractor.cs                |  4 +-
 .../PostingsHighlight/PostingsHighlighter.cs       |  2 +-
 src/Lucene.Net.Memory/MemoryIndex.Info.cs          | 38 ++++++++--------
 .../MemoryIndex.MemoryIndexReader.cs               | 40 ++++++++---------
 src/Lucene.Net.Memory/MemoryIndex.TermComparer.cs  | 38 ++++++++--------
 .../Index/MultiPassIndexSplitter.cs                |  4 +-
 .../Index/Sorter/SortingMergePolicy.cs             |  4 +-
 src/Lucene.Net.Queries/CommonTermsQuery.cs         |  4 +-
 src/Lucene.Net.Queries/Mlt/MoreLikeThis.cs         |  4 +-
 .../Suggest/Analyzing/AnalyzingSuggester.cs        |  4 +-
 .../Analysis/BaseTokenStreamTestCase.cs            |  2 +-
 .../Index/AlcoholicMergePolicy.cs                  |  3 +-
 .../Index/BaseStoredFieldsFormatTestCase.cs        |  1 -
 .../Search/ShardSearchingTestBase.cs               |  2 +-
 .../Miscellaneous/TestStemmerOverrideFilter.cs     |  2 +-
 .../Analysis/Miscellaneous/TestTrimFilter.cs       |  3 +-
 .../Analysis/Synonym/TestSlowSynonymFilter.cs      |  3 +-
 src/Lucene.Net.Tests.Facet/TestDrillSideways.cs    |  9 ++--
 src/Lucene.Net.Tests.Join/TestBlockJoin.cs         | 11 +++--
 .../Index/Sorter/SorterTestBase.cs                 |  3 +-
 src/Lucene.Net.Tests.Misc/Util/Fst/TestFSTsMisc.cs | 43 +++++++++---------
 .../Index/TestBackwardsCompatibility.cs            |  1 +
 src/Lucene.Net.Tests/Index/TestDocTermOrds.cs      |  3 +-
 src/Lucene.Net.Tests/Index/TestMaxTermFrequency.cs |  3 +-
 src/Lucene.Net.Tests/Index/TestPostingsOffsets.cs  |  1 +
 .../Search/TestMultiPhraseQuery.cs                 |  5 ++-
 .../Search/TestPhrasePrefixQuery.cs                |  6 +--
 .../Util/Automaton/TestCompiledAutomaton.cs        |  3 +-
 .../Util/TestRecyclingByteBlockAllocator.cs        |  1 +
 .../Util/TestRecyclingIntBlockAllocator.cs         |  1 +
 src/Lucene.Net/Codecs/DocValuesConsumer.cs         |  2 +-
 src/Lucene.Net/Index/FieldInfos.cs                 |  2 +-
 src/Lucene.Net/Index/FrozenBufferedUpdates.cs      |  5 ++-
 src/Lucene.Net/Index/MultiFields.cs                |  2 +-
 src/Lucene.Net/Index/MultiTerms.cs                 |  2 +-
 src/Lucene.Net/Index/SegmentDocValues.cs           |  2 +-
 src/Lucene.Net/Index/SegmentMerger.cs              |  2 +-
 src/Lucene.Net/Index/StandardDirectoryReader.cs    |  2 +-
 src/Lucene.Net/Search/BooleanQuery.cs              |  2 +-
 src/Lucene.Net/Search/BooleanScorer2.cs            |  2 +-
 src/Lucene.Net/Search/DisjunctionMaxQuery.cs       |  4 +-
 src/Lucene.Net/Search/FieldCacheImpl.cs            |  6 +--
 src/Lucene.Net/Search/FuzzyTermsEnum.cs            |  2 +-
 src/Lucene.Net/Search/MinShouldMatchSumScorer.cs   |  2 +-
 src/Lucene.Net/Search/PhraseQuery.cs               |  2 +-
 src/Lucene.Net/Search/SloppyPhraseScorer.cs        |  2 +-
 src/Lucene.Net/Search/Spans/SpanNearQuery.cs       |  2 +-
 src/Lucene.Net/Search/Spans/SpanOrQuery.cs         |  2 +-
 src/Lucene.Net/Search/TopTermsRewrite.cs           |  5 ++-
 src/Lucene.Net/Store/CompoundFileDirectory.cs      |  2 +-
 src/Lucene.Net/Store/CompoundFileWriter.cs         |  2 +-
 src/Lucene.Net/Store/FileSwitchDirectory.cs        |  2 +-
 src/Lucene.Net/Store/NRTCachingDirectory.cs        |  4 +-
 src/Lucene.Net/Store/RAMDirectory.cs               |  2 +-
 src/Lucene.Net/Support/CollectionExtensions.cs     | 51 ++++++++++++++++++++++
 src/Lucene.Net/Support/Index/TaskMergeScheduler.cs |  3 +-
 src/Lucene.Net/Support/SetExtensions.cs            | 10 -----
 src/Lucene.Net/Support/Util/ExceptionExtensions.cs |  3 +-
 src/Lucene.Net/Support/WeakDictionary.cs           |  4 +-
 src/Lucene.Net/Util/Attribute.cs                   |  6 ---
 src/Lucene.Net/Util/Automaton/Automaton.cs         |  2 +-
 src/Lucene.Net/Util/Automaton/SpecialOperations.cs |  1 +
 src/Lucene.Net/Util/ByteBlockPool.cs               |  2 +-
 src/Lucene.Net/Util/QueryBuilder.cs                |  2 +-
 src/Lucene.Net/Util/SPIClassIterator.cs            |  1 -
 80 files changed, 244 insertions(+), 221 deletions(-)

diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Pt/RSLPStemmerBase.cs b/src/Lucene.Net.Analysis.Common/Analysis/Pt/RSLPStemmerBase.cs
index 0f4eb50..e47e0c1 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Pt/RSLPStemmerBase.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Pt/RSLPStemmerBase.cs
@@ -1,11 +1,11 @@
-using J2N.Text;
+using J2N.Collections.Generic.Extensions;
+using J2N.Text;
 using Lucene.Net.Analysis.Util;
 using Lucene.Net.Util;
 using System;
 using System.Collections.Generic;
 using System.Globalization;
 using System.IO;
-using System.Linq;
 using System.Text;
 using System.Text.RegularExpressions;
 
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Query/QueryAutoStopWordAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Query/QueryAutoStopWordAnalyzer.cs
index 243fa3b..98573e0 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Query/QueryAutoStopWordAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Query/QueryAutoStopWordAnalyzer.cs
@@ -1,11 +1,11 @@
-using Lucene.Net.Analysis.Core;
+using J2N.Collections.Generic.Extensions;
+using Lucene.Net.Analysis.Core;
 using Lucene.Net.Analysis.Util;
 using Lucene.Net.Index;
 using Lucene.Net.Support;
 using Lucene.Net.Util;
 using System.Collections.Generic;
 using System.IO;
-using System.Linq;
 using JCG = J2N.Collections.Generic;
 
 namespace Lucene.Net.Analysis.Query
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SlowSynonymMap.cs b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SlowSynonymMap.cs
index 35e49fb..bd896d3 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SlowSynonymMap.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SlowSynonymMap.cs
@@ -1,10 +1,10 @@
-using Lucene.Net.Analysis.Util;
+using J2N.Collections.Generic.Extensions;
+using Lucene.Net.Analysis.Util;
 using Lucene.Net.Support;
 using Lucene.Net.Util;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics.CodeAnalysis;
-using System.Linq;
 using System.Text;
 
 namespace Lucene.Net.Analysis.Synonym
diff --git a/src/Lucene.Net.Analysis.OpenNLP/OpenNLPChunkerFilter.cs b/src/Lucene.Net.Analysis.OpenNLP/OpenNLPChunkerFilter.cs
index 141b8a0..0dacec4 100644
--- a/src/Lucene.Net.Analysis.OpenNLP/OpenNLPChunkerFilter.cs
+++ b/src/Lucene.Net.Analysis.OpenNLP/OpenNLPChunkerFilter.cs
@@ -3,7 +3,6 @@ using Lucene.Net.Analysis.OpenNlp.Tools;
 using Lucene.Net.Analysis.TokenAttributes;
 using Lucene.Net.Util;
 using System.Collections.Generic;
-using System.Linq;
 
 namespace Lucene.Net.Analysis.OpenNlp
 {
@@ -75,8 +74,8 @@ namespace Lucene.Net.Analysis.OpenNlp
 
         private void NextSentence()
         {
-            IList<string> termList = new List<string>();
-            IList<string> posTagList = new List<string>();
+            var termList = new List<string>();
+            var posTagList = new List<string>();
             sentenceTokenAttrs.Clear();
             bool endOfSentence = false;
             while (!endOfSentence && (moreTokensAvailable = m_input.IncrementToken()))
diff --git a/src/Lucene.Net.Analysis.OpenNLP/OpenNLPLemmatizerFilter.cs b/src/Lucene.Net.Analysis.OpenNLP/OpenNLPLemmatizerFilter.cs
index 096516b..e981e25 100644
--- a/src/Lucene.Net.Analysis.OpenNLP/OpenNLPLemmatizerFilter.cs
+++ b/src/Lucene.Net.Analysis.OpenNLP/OpenNLPLemmatizerFilter.cs
@@ -3,7 +3,6 @@ using Lucene.Net.Analysis.OpenNlp.Tools;
 using Lucene.Net.Analysis.TokenAttributes;
 using Lucene.Net.Util;
 using System.Collections.Generic;
-using System.Linq;
 
 namespace Lucene.Net.Analysis.OpenNlp
 {
@@ -92,8 +91,8 @@ namespace Lucene.Net.Analysis.OpenNlp
 
         private void NextSentence()
         {
-            IList<string> tokenList = new List<string>();
-            IList<string> typeList = new List<string>();
+            var tokenList = new List<string>();
+            var typeList = new List<string>();
             sentenceTokenAttrs.Clear();
             bool endOfSentence = false;
             while (!endOfSentence && (moreTokensAvailable = m_input.IncrementToken()))
diff --git a/src/Lucene.Net.Analysis.OpenNLP/OpenNLPPOSFilter.cs b/src/Lucene.Net.Analysis.OpenNLP/OpenNLPPOSFilter.cs
index 0539efe..42f8230 100644
--- a/src/Lucene.Net.Analysis.OpenNLP/OpenNLPPOSFilter.cs
+++ b/src/Lucene.Net.Analysis.OpenNLP/OpenNLPPOSFilter.cs
@@ -3,7 +3,6 @@ using Lucene.Net.Analysis.OpenNlp.Tools;
 using Lucene.Net.Analysis.TokenAttributes;
 using Lucene.Net.Util;
 using System.Collections.Generic;
-using System.Linq;
 
 namespace Lucene.Net.Analysis.OpenNlp
 {
@@ -74,7 +73,7 @@ namespace Lucene.Net.Analysis.OpenNlp
 
         private string[] NextSentence()
         {
-            IList<string> termList = new List<string>();
+            var termList = new List<string>();
             sentenceTokenAttrs.Clear();
             bool endOfSentence = false;
             while (!endOfSentence && (moreTokensAvailable = m_input.IncrementToken()))
diff --git a/src/Lucene.Net.Benchmark/ByTask/Feeds/EnwikiQueryMaker.cs b/src/Lucene.Net.Benchmark/ByTask/Feeds/EnwikiQueryMaker.cs
index 1527ce7..69179db 100644
--- a/src/Lucene.Net.Benchmark/ByTask/Feeds/EnwikiQueryMaker.cs
+++ b/src/Lucene.Net.Benchmark/ByTask/Feeds/EnwikiQueryMaker.cs
@@ -1,4 +1,5 @@
-using Lucene.Net.Analysis;
+using J2N.Collections.Generic.Extensions;
+using Lucene.Net.Analysis;
 using Lucene.Net.Analysis.Standard;
 using Lucene.Net.Benchmarks.ByTask.Tasks;
 using Lucene.Net.Index;
@@ -8,7 +9,6 @@ using Lucene.Net.Search.Spans;
 using Lucene.Net.Util;
 using System;
 using System.Collections.Generic;
-using System.Linq;
 using Console = Lucene.Net.Util.SystemConsole;
 
 namespace Lucene.Net.Benchmarks.ByTask.Feeds
diff --git a/src/Lucene.Net.Benchmark/ByTask/Feeds/SimpleSloppyPhraseQueryMaker.cs b/src/Lucene.Net.Benchmark/ByTask/Feeds/SimpleSloppyPhraseQueryMaker.cs
index dea0d89..571fef0 100644
--- a/src/Lucene.Net.Benchmark/ByTask/Feeds/SimpleSloppyPhraseQueryMaker.cs
+++ b/src/Lucene.Net.Benchmark/ByTask/Feeds/SimpleSloppyPhraseQueryMaker.cs
@@ -2,7 +2,6 @@
 using Lucene.Net.Index;
 using Lucene.Net.Search;
 using System.Collections.Generic;
-using System.Linq;
 
 namespace Lucene.Net.Benchmarks.ByTask.Feeds
 {
@@ -42,7 +41,7 @@ namespace Lucene.Net.Benchmarks.ByTask.Feeds
             words = w.ToArray();
 
             // create queries (that would find stuff) with varying slops
-            IList<Query> queries = new List<Query>();
+            List<Query> queries = new List<Query>();
             for (int slop = 0; slop < 8; slop++)
             {
                 for (int qlen = 2; qlen < 6; qlen++)
diff --git a/src/Lucene.Net.Benchmark/Quality/QualityQuery.cs b/src/Lucene.Net.Benchmark/Quality/QualityQuery.cs
index ebb1b3d..4e4af17 100644
--- a/src/Lucene.Net.Benchmark/Quality/QualityQuery.cs
+++ b/src/Lucene.Net.Benchmark/Quality/QualityQuery.cs
@@ -1,8 +1,8 @@
-using J2N.Text;
+using J2N.Collections.Generic.Extensions;
+using J2N.Text;
 using System;
 using System.Collections.Generic;
 using System.Globalization;
-using System.Linq;
 
 namespace Lucene.Net.Benchmarks.Quality
 {
diff --git a/src/Lucene.Net.Benchmark/Quality/QualityStats.cs b/src/Lucene.Net.Benchmark/Quality/QualityStats.cs
index df00676..2ed4e12 100644
--- a/src/Lucene.Net.Benchmark/Quality/QualityStats.cs
+++ b/src/Lucene.Net.Benchmark/Quality/QualityStats.cs
@@ -1,9 +1,9 @@
-using System;
+using J2N.Collections.Generic.Extensions;
+using System;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Globalization;
 using System.IO;
-using System.Linq;
 
 namespace Lucene.Net.Benchmarks.Quality
 {
diff --git a/src/Lucene.Net.Benchmark/Quality/Trec/QueryDriver.cs b/src/Lucene.Net.Benchmark/Quality/Trec/QueryDriver.cs
index 5c5d024..bc44f5a 100644
--- a/src/Lucene.Net.Benchmark/Quality/Trec/QueryDriver.cs
+++ b/src/Lucene.Net.Benchmark/Quality/Trec/QueryDriver.cs
@@ -1,14 +1,14 @@
-using Lucene.Net.Benchmarks.Quality.Utils;
+using J2N.Collections.Generic.Extensions;
+using Lucene.Net.Benchmarks.Quality.Utils;
 using Lucene.Net.Index;
 using Lucene.Net.Search;
 using Lucene.Net.Util;
 using System;
 using System.Collections.Generic;
 using System.IO;
-using System.Linq;
 using System.Text;
-using JCG = J2N.Collections.Generic;
 using Console = Lucene.Net.Util.SystemConsole;
+using JCG = J2N.Collections.Generic;
 
 namespace Lucene.Net.Benchmarks.Quality.Trec
 {
diff --git a/src/Lucene.Net.Benchmark/Quality/Trec/Trec1MQReader.cs b/src/Lucene.Net.Benchmark/Quality/Trec/Trec1MQReader.cs
index 85dceda..d9be721 100644
--- a/src/Lucene.Net.Benchmark/Quality/Trec/Trec1MQReader.cs
+++ b/src/Lucene.Net.Benchmark/Quality/Trec/Trec1MQReader.cs
@@ -1,7 +1,7 @@
-using System;
+using J2N.Collections.Generic.Extensions;
+using System;
 using System.Collections.Generic;
 using System.IO;
-using System.Linq;
 
 namespace Lucene.Net.Benchmarks.Quality.Trec
 {
@@ -83,7 +83,7 @@ namespace Lucene.Net.Benchmarks.Quality.Trec
             {
                 reader.Dispose();
             }
-            // sort result array (by ID) 
+            // sort result array (by ID)
             QualityQuery[] qq = res.ToArray();
             Array.Sort(qq);
             return qq;
diff --git a/src/Lucene.Net.Benchmark/Quality/Trec/TrecTopicsReader.cs b/src/Lucene.Net.Benchmark/Quality/Trec/TrecTopicsReader.cs
index 5063313..eabc3ab 100644
--- a/src/Lucene.Net.Benchmark/Quality/Trec/TrecTopicsReader.cs
+++ b/src/Lucene.Net.Benchmark/Quality/Trec/TrecTopicsReader.cs
@@ -1,8 +1,8 @@
-using J2N.Text;
+using J2N.Collections.Generic.Extensions;
+using J2N.Text;
 using System;
 using System.Collections.Generic;
 using System.IO;
-using System.Linq;
 using System.Text;
 
 namespace Lucene.Net.Benchmarks.Quality.Trec
@@ -114,7 +114,7 @@ namespace Lucene.Net.Benchmarks.Quality.Trec
             {
                 reader.Dispose();
             }
-            // sort result array (by ID) 
+            // sort result array (by ID)
             QualityQuery[] qq = res.ToArray();
             Array.Sort(qq);
             return qq;
diff --git a/src/Lucene.Net.Facet/DrillSideways.cs b/src/Lucene.Net.Facet/DrillSideways.cs
index 31fbaaa..f75c909 100644
--- a/src/Lucene.Net.Facet/DrillSideways.cs
+++ b/src/Lucene.Net.Facet/DrillSideways.cs
@@ -1,10 +1,10 @@
-using Lucene.Net.Facet.SortedSet;
+using J2N.Collections.Generic.Extensions;
+using Lucene.Net.Facet.SortedSet;
 using Lucene.Net.Facet.Taxonomy;
 using Lucene.Net.Search;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
-using System.Linq;
 
 namespace Lucene.Net.Facet
 {
diff --git a/src/Lucene.Net.Facet/FacetsConfig.cs b/src/Lucene.Net.Facet/FacetsConfig.cs
index 300614a..ec0b835 100644
--- a/src/Lucene.Net.Facet/FacetsConfig.cs
+++ b/src/Lucene.Net.Facet/FacetsConfig.cs
@@ -1,9 +1,9 @@
-using Lucene.Net.Support;
+using J2N.Collections.Generic.Extensions;
+using Lucene.Net.Support;
 using System;
 using System.Collections.Concurrent;
 using System.Collections.Generic;
 using System.Diagnostics;
-using System.Linq;
 using System.Text;
 using System.Threading;
 using JCG = J2N.Collections.Generic;
@@ -34,15 +34,15 @@ namespace Lucene.Net.Facet
     using Document = Lucene.Net.Documents.Document;
     using FacetLabel = Lucene.Net.Facet.Taxonomy.FacetLabel;
     using Field = Lucene.Net.Documents.Field;
-    using SingleAssociationFacetField = Lucene.Net.Facet.Taxonomy.SingleAssociationFacetField;
     using IIndexableField = Lucene.Net.Index.IIndexableField;
     using IIndexableFieldType = Lucene.Net.Index.IIndexableFieldType;
     using Int32AssociationFacetField = Lucene.Net.Facet.Taxonomy.Int32AssociationFacetField;
     using Int32sRef = Lucene.Net.Util.Int32sRef;
+    using ITaxonomyWriter = Lucene.Net.Facet.Taxonomy.ITaxonomyWriter;
+    using SingleAssociationFacetField = Lucene.Net.Facet.Taxonomy.SingleAssociationFacetField;
     using SortedSetDocValuesFacetField = Lucene.Net.Facet.SortedSet.SortedSetDocValuesFacetField;
     using SortedSetDocValuesField = Lucene.Net.Documents.SortedSetDocValuesField;
     using StringField = Lucene.Net.Documents.StringField;
-    using ITaxonomyWriter = Lucene.Net.Facet.Taxonomy.ITaxonomyWriter;
 
     /// <summary>
     /// Records per-dimension configuration.  By default a
diff --git a/src/Lucene.Net.Highlighter/Highlight/QueryTermExtractor.cs b/src/Lucene.Net.Highlighter/Highlight/QueryTermExtractor.cs
index 5716f63..2f5c41d 100644
--- a/src/Lucene.Net.Highlighter/Highlight/QueryTermExtractor.cs
+++ b/src/Lucene.Net.Highlighter/Highlight/QueryTermExtractor.cs
@@ -1,9 +1,9 @@
-using J2N.Text;
+using J2N.Collections.Generic.Extensions;
+using J2N.Text;
 using Lucene.Net.Index;
 using System;
 using System.Collections.Generic;
 using System.IO;
-using System.Linq;
 using JCG = J2N.Collections.Generic;
 
 namespace Lucene.Net.Search.Highlight
diff --git a/src/Lucene.Net.Highlighter/PostingsHighlight/PostingsHighlighter.cs b/src/Lucene.Net.Highlighter/PostingsHighlight/PostingsHighlighter.cs
index 5911100..b894dbe 100644
--- a/src/Lucene.Net.Highlighter/PostingsHighlight/PostingsHighlighter.cs
+++ b/src/Lucene.Net.Highlighter/PostingsHighlight/PostingsHighlighter.cs
@@ -1,4 +1,5 @@
 #if FEATURE_BREAKITERATOR
+using J2N.Collections.Generic.Extensions;
 using J2N.Text;
 using ICU4N.Text;
 using Lucene.Net.Analysis;
@@ -11,7 +12,6 @@ using System.Collections.Generic;
 using System.Diagnostics;
 using System.Globalization;
 using System.IO;
-using System.Linq;
 using System.Text;
 using JCG = J2N.Collections.Generic;
 
diff --git a/src/Lucene.Net.Memory/MemoryIndex.Info.cs b/src/Lucene.Net.Memory/MemoryIndex.Info.cs
index 2d2d8ff..3ca4ff7 100644
--- a/src/Lucene.Net.Memory/MemoryIndex.Info.cs
+++ b/src/Lucene.Net.Memory/MemoryIndex.Info.cs
@@ -1,29 +1,25 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
 using Lucene.Net.Util;
 using System;
 
 namespace Lucene.Net.Index.Memory
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
     public partial class MemoryIndex
     {
         /// <summary>
diff --git a/src/Lucene.Net.Memory/MemoryIndex.MemoryIndexReader.cs b/src/Lucene.Net.Memory/MemoryIndex.MemoryIndexReader.cs
index 74b8090..2bf296e 100644
--- a/src/Lucene.Net.Memory/MemoryIndex.MemoryIndexReader.cs
+++ b/src/Lucene.Net.Memory/MemoryIndex.MemoryIndexReader.cs
@@ -1,24 +1,4 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
+using J2N.Collections.Generic.Extensions;
 using Lucene.Net.Search;
 using Lucene.Net.Search.Similarities;
 using Lucene.Net.Util;
@@ -26,10 +6,26 @@ using System;
 using System.Collections;
 using System.Collections.Generic;
 using System.Diagnostics;
-using System.Linq;
 
 namespace Lucene.Net.Index.Memory
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
     public partial class MemoryIndex
     {
         ///////////////////////////////////////////////////////////////////////////////
diff --git a/src/Lucene.Net.Memory/MemoryIndex.TermComparer.cs b/src/Lucene.Net.Memory/MemoryIndex.TermComparer.cs
index 6d4ad12..dde97f5 100644
--- a/src/Lucene.Net.Memory/MemoryIndex.TermComparer.cs
+++ b/src/Lucene.Net.Memory/MemoryIndex.TermComparer.cs
@@ -1,29 +1,25 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
 using System;
 using System.Collections.Generic;
 
 namespace Lucene.Net.Index.Memory
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
     public partial class MemoryIndex
     {
         private class TermComparer
diff --git a/src/Lucene.Net.Misc/Index/MultiPassIndexSplitter.cs b/src/Lucene.Net.Misc/Index/MultiPassIndexSplitter.cs
index a24ca47..66d40b3 100644
--- a/src/Lucene.Net.Misc/Index/MultiPassIndexSplitter.cs
+++ b/src/Lucene.Net.Misc/Index/MultiPassIndexSplitter.cs
@@ -1,11 +1,11 @@
-using Lucene.Net.Store;
+using J2N.Collections.Generic.Extensions;
+using Lucene.Net.Store;
 using Lucene.Net.Util;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Globalization;
 using System.IO;
-using System.Linq;
 using Console = Lucene.Net.Util.SystemConsole;
 
 namespace Lucene.Net.Index
diff --git a/src/Lucene.Net.Misc/Index/Sorter/SortingMergePolicy.cs b/src/Lucene.Net.Misc/Index/Sorter/SortingMergePolicy.cs
index 6fcb3eb..4692901 100644
--- a/src/Lucene.Net.Misc/Index/Sorter/SortingMergePolicy.cs
+++ b/src/Lucene.Net.Misc/Index/Sorter/SortingMergePolicy.cs
@@ -1,11 +1,11 @@
-using Lucene.Net.Search;
+using J2N.Collections.Generic.Extensions;
+using Lucene.Net.Search;
 using Lucene.Net.Store;
 using Lucene.Net.Util;
 using Lucene.Net.Util.Packed;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
-using System.Linq;
 
 namespace Lucene.Net.Index.Sorter
 {
diff --git a/src/Lucene.Net.Queries/CommonTermsQuery.cs b/src/Lucene.Net.Queries/CommonTermsQuery.cs
index 2651ba7..212345d 100644
--- a/src/Lucene.Net.Queries/CommonTermsQuery.cs
+++ b/src/Lucene.Net.Queries/CommonTermsQuery.cs
@@ -1,4 +1,5 @@
-using Lucene.Net.Index;
+using J2N.Collections.Generic.Extensions;
+using Lucene.Net.Index;
 using Lucene.Net.Search;
 using Lucene.Net.Util;
 using System;
@@ -6,7 +7,6 @@ using System.Collections;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Globalization;
-using System.Linq;
 using System.Text;
 using JCG = J2N.Collections.Generic;
 
diff --git a/src/Lucene.Net.Queries/Mlt/MoreLikeThis.cs b/src/Lucene.Net.Queries/Mlt/MoreLikeThis.cs
index 0011d82..1a8574c 100644
--- a/src/Lucene.Net.Queries/Mlt/MoreLikeThis.cs
+++ b/src/Lucene.Net.Queries/Mlt/MoreLikeThis.cs
@@ -1,4 +1,5 @@
-using Lucene.Net.Analysis;
+using J2N.Collections.Generic.Extensions;
+using Lucene.Net.Analysis;
 using Lucene.Net.Analysis.TokenAttributes;
 using Lucene.Net.Documents;
 using Lucene.Net.Index;
@@ -10,7 +11,6 @@ using System;
 using System.Collections.Generic;
 using System.Diagnostics.CodeAnalysis;
 using System.IO;
-using System.Linq;
 using System.Text;
 
 namespace Lucene.Net.Queries.Mlt
diff --git a/src/Lucene.Net.Suggest/Suggest/Analyzing/AnalyzingSuggester.cs b/src/Lucene.Net.Suggest/Suggest/Analyzing/AnalyzingSuggester.cs
index ff1de2a..3ec11c5 100644
--- a/src/Lucene.Net.Suggest/Suggest/Analyzing/AnalyzingSuggester.cs
+++ b/src/Lucene.Net.Suggest/Suggest/Analyzing/AnalyzingSuggester.cs
@@ -1,4 +1,5 @@
-using Lucene.Net.Analysis;
+using J2N.Collections.Generic.Extensions;
+using Lucene.Net.Analysis;
 using Lucene.Net.Store;
 using Lucene.Net.Support;
 using Lucene.Net.Support.IO;
@@ -9,7 +10,6 @@ using System;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.IO;
-using System.Linq;
 using JCG = J2N.Collections.Generic;
 
 namespace Lucene.Net.Search.Suggest.Analyzing
diff --git a/src/Lucene.Net.TestFramework/Analysis/BaseTokenStreamTestCase.cs b/src/Lucene.Net.TestFramework/Analysis/BaseTokenStreamTestCase.cs
index 859e90c..dea1fa3 100644
--- a/src/Lucene.Net.TestFramework/Analysis/BaseTokenStreamTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Analysis/BaseTokenStreamTestCase.cs
@@ -1,3 +1,4 @@
+using J2N.Collections.Generic.Extensions;
 using J2N.Threading;
 using Lucene.Net.Analysis.TokenAttributes;
 using Lucene.Net.Documents;
@@ -8,7 +9,6 @@ using System;
 using System.Collections.Generic;
 using System.Globalization;
 using System.IO;
-using System.Linq;
 using System.Text;
 using System.Threading;
 using Assert = Lucene.Net.TestFramework.Assert;
diff --git a/src/Lucene.Net.TestFramework/Index/AlcoholicMergePolicy.cs b/src/Lucene.Net.TestFramework/Index/AlcoholicMergePolicy.cs
index 7ae990b..610f473 100644
--- a/src/Lucene.Net.TestFramework/Index/AlcoholicMergePolicy.cs
+++ b/src/Lucene.Net.TestFramework/Index/AlcoholicMergePolicy.cs
@@ -1,6 +1,5 @@
 using Lucene.Net.Util;
 using System;
-using System.Linq;
 
 namespace Lucene.Net.Index
 {
@@ -56,7 +55,7 @@ namespace Lucene.Net.Index
             if (hourOfDay < 6 || hourOfDay > 20 || random.Next(23) == 5)
             // its 5 o'clock somewhere
             {
-                Drink[] values = Enum.GetValues(typeof(Drink)).Cast<Drink>().ToArray();
+                Drink[] values = (Drink[])Enum.GetValues(typeof(Drink));
                 // pick a random drink during the day
                 Drink drink = values[random.Next(values.Length - 1)];
                 return (long)drink * info.GetSizeInBytes();
diff --git a/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs b/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
index 9e03dde..6e0dc32 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseStoredFieldsFormatTestCase.cs
@@ -17,7 +17,6 @@ using Lucene.Net.Util;
 using System;
 using System.Collections.Generic;
 using System.Globalization;
-using System.Linq;
 using System.Text;
 using JCG = J2N.Collections.Generic;
 using Console = Lucene.Net.Util.SystemConsole;
diff --git a/src/Lucene.Net.TestFramework/Search/ShardSearchingTestBase.cs b/src/Lucene.Net.TestFramework/Search/ShardSearchingTestBase.cs
index 453adae..6852ca0 100644
--- a/src/Lucene.Net.TestFramework/Search/ShardSearchingTestBase.cs
+++ b/src/Lucene.Net.TestFramework/Search/ShardSearchingTestBase.cs
@@ -1,3 +1,4 @@
+using J2N.Collections.Generic.Extensions;
 using J2N.Threading;
 using Lucene.Net.Analysis;
 using Lucene.Net.Index;
@@ -8,7 +9,6 @@ using Lucene.Net.Util;
 using System;
 using System.Collections.Concurrent;
 using System.Collections.Generic;
-using System.Linq;
 using JCG = J2N.Collections.Generic;
 using Console = Lucene.Net.Util.SystemConsole;
 using Debug = Lucene.Net.Diagnostics.Debug; // LUCENENET NOTE: We cannot use System.Diagnostics.Debug because those calls will be optimized out of the release!
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Miscellaneous/TestStemmerOverrideFilter.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Miscellaneous/TestStemmerOverrideFilter.cs
index 47450f1..dbf1573 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Miscellaneous/TestStemmerOverrideFilter.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Miscellaneous/TestStemmerOverrideFilter.cs
@@ -1,8 +1,8 @@
 using J2N;
+using J2N.Collections.Generic.Extensions;
 using J2N.Text;
 using Lucene.Net.Analysis.Core;
 using Lucene.Net.Analysis.En;
-using Lucene.Net.Analysis.Miscellaneous;
 using Lucene.Net.Util;
 using NUnit.Framework;
 using System.Collections.Generic;
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Miscellaneous/TestTrimFilter.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Miscellaneous/TestTrimFilter.cs
index 1943883..92962dd 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Miscellaneous/TestTrimFilter.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Miscellaneous/TestTrimFilter.cs
@@ -1,4 +1,5 @@
-using Lucene.Net.Analysis.Core;
+using J2N.Collections.Generic.Extensions;
+using Lucene.Net.Analysis.Core;
 using Lucene.Net.Analysis.TokenAttributes;
 using Lucene.Net.Util;
 using NUnit.Framework;
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Synonym/TestSlowSynonymFilter.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Synonym/TestSlowSynonymFilter.cs
index 38167ea..54f01de 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Synonym/TestSlowSynonymFilter.cs
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Synonym/TestSlowSynonymFilter.cs
@@ -1,4 +1,5 @@
-using J2N.Text;
+using J2N.Collections.Generic.Extensions;
+using J2N.Text;
 using Lucene.Net.Analysis.TokenAttributes;
 using NUnit.Framework;
 using System;
diff --git a/src/Lucene.Net.Tests.Facet/TestDrillSideways.cs b/src/Lucene.Net.Tests.Facet/TestDrillSideways.cs
index eb57574..b86b08d 100644
--- a/src/Lucene.Net.Tests.Facet/TestDrillSideways.cs
+++ b/src/Lucene.Net.Tests.Facet/TestDrillSideways.cs
@@ -1,4 +1,5 @@
-using J2N.Text;
+using J2N.Collections.Generic.Extensions;
+using J2N.Text;
 using Lucene.Net.Search;
 using Lucene.Net.Support;
 using NUnit.Framework;
@@ -1061,7 +1062,7 @@ namespace Lucene.Net.Facet
         {
             int numDims = dimValues.Length;
 
-            IList<Doc> hits = new List<Doc>();
+            List<Doc> hits = new List<Doc>();
             Counters drillDownCounts = new Counters(dimValues);
             Counters[] drillSidewaysCounts = new Counters[dimValues.Length];
             for (int dim = 0; dim < numDims; dim++)
@@ -1151,9 +1152,7 @@ namespace Lucene.Net.Facet
                 idToDocID[s.Doc(i).Get("id")] = i;
             }
 
-            var hitsSorted = hits.ToArray();
-            Array.Sort(hitsSorted);
-            hits = hitsSorted.ToList();
+            hits.Sort();
 
             TestFacetResult res = new TestFacetResult();
             res.Hits = hits;
diff --git a/src/Lucene.Net.Tests.Join/TestBlockJoin.cs b/src/Lucene.Net.Tests.Join/TestBlockJoin.cs
index dfe0a0f..ac4199d 100644
--- a/src/Lucene.Net.Tests.Join/TestBlockJoin.cs
+++ b/src/Lucene.Net.Tests.Join/TestBlockJoin.cs
@@ -1,13 +1,13 @@
-using Lucene.Net.Analysis;
+using J2N.Collections.Generic.Extensions;
+using Lucene.Net.Analysis;
 using Lucene.Net.Documents;
 using Lucene.Net.Documents.Extensions;
-using Lucene.Net.Search.Grouping;
 using Lucene.Net.Index;
 using Lucene.Net.Index.Extensions;
 using Lucene.Net.Join;
 using Lucene.Net.Search;
+using Lucene.Net.Search.Grouping;
 using Lucene.Net.Store;
-using Lucene.Net.Support;
 using Lucene.Net.Util;
 using NUnit.Framework;
 using System;
@@ -15,7 +15,6 @@ using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using Console = Lucene.Net.Util.SystemConsole;
-using J2N.Collections.Generic.Extensions;
 
 namespace Lucene.Net.Tests.Join
 {
@@ -503,7 +502,7 @@ namespace Lucene.Net.Tests.Join
 
         private Sort GetRandomSort(string prefix, int numFields)
         {
-            IList<SortField> sortFields = new List<SortField>();
+            List<SortField> sortFields = new List<SortField>();
             // TODO: sometimes sort by score; problem is scores are
             // not comparable across the two indices
             // sortFields.Add(SortField.FIELD_SCORE);
@@ -805,7 +804,7 @@ namespace Lucene.Net.Tests.Join
                 }
 
                 // Merge both sorts:
-                IList<SortField> sortFields = new List<SortField>(parentSort.GetSort());
+                List<SortField> sortFields = new List<SortField>(parentSort.GetSort());
                 sortFields.AddRange(childSort.GetSort());
                 Sort parentAndChildSort = new Sort(sortFields.ToArray());
 
diff --git a/src/Lucene.Net.Tests.Misc/Index/Sorter/SorterTestBase.cs b/src/Lucene.Net.Tests.Misc/Index/Sorter/SorterTestBase.cs
index f09b96d..0d9eeeb 100644
--- a/src/Lucene.Net.Tests.Misc/Index/Sorter/SorterTestBase.cs
+++ b/src/Lucene.Net.Tests.Misc/Index/Sorter/SorterTestBase.cs
@@ -12,7 +12,6 @@ using NUnit.Framework;
 using System;
 using System.Collections.Generic;
 using System.Globalization;
-using System.Linq;
 using Console = Lucene.Net.Util.SystemConsole;
 
 namespace Lucene.Net.Index.Sorter
@@ -186,7 +185,7 @@ namespace Lucene.Net.Index.Sorter
 
             if (Verbose)
             {
-                Console.WriteLine("Shuffled IDs for indexing: " + Arrays.ToString(ids.ToArray()));
+                Console.WriteLine("Shuffled IDs for indexing: " + Collections.ToString(ids));
             }
 
             PositionsTokenStream positions = new PositionsTokenStream();
diff --git a/src/Lucene.Net.Tests.Misc/Util/Fst/TestFSTsMisc.cs b/src/Lucene.Net.Tests.Misc/Util/Fst/TestFSTsMisc.cs
index 59ebe9d..f1e74c9 100644
--- a/src/Lucene.Net.Tests.Misc/Util/Fst/TestFSTsMisc.cs
+++ b/src/Lucene.Net.Tests.Misc/Util/Fst/TestFSTsMisc.cs
@@ -1,34 +1,31 @@
-/*
- *
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
-*/
-
+using J2N.Collections.Generic.Extensions;
 using Lucene.Net.Store;
 using NUnit.Framework;
 using System;
 using System.Collections.Generic;
 using System.Linq;
-using JCG = J2N.Collections.Generic;
 using Console = Lucene.Net.Util.SystemConsole;
+using JCG = J2N.Collections.Generic;
 
 namespace Lucene.Net.Util.Fst
 {
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
     public class TestFSTsMisc : LuceneTestCase
     {
         private MockDirectoryWrapper dir;
@@ -67,7 +64,7 @@ namespace Lucene.Net.Util.Fst
                 {
                     int numWords = random.nextInt(maxNumWords + 1);
                     ISet<Int32sRef> termsSet = new JCG.HashSet<Int32sRef>();
-                    Int32sRef[] terms = new Int32sRef[numWords];
+                    //Int32sRef[] terms = new Int32sRef[numWords]; // LUCENENET: Not used
                     while (termsSet.size() < numWords)
                     {
                         string term = FSTTester<object>.GetRandomString(random);
diff --git a/src/Lucene.Net.Tests/Index/TestBackwardsCompatibility.cs b/src/Lucene.Net.Tests/Index/TestBackwardsCompatibility.cs
index e1ebc0e..a19c6b4 100644
--- a/src/Lucene.Net.Tests/Index/TestBackwardsCompatibility.cs
+++ b/src/Lucene.Net.Tests/Index/TestBackwardsCompatibility.cs
@@ -1,4 +1,5 @@
 using J2N;
+using J2N.Collections.Generic.Extensions;
 using Lucene.Net.Index.Extensions;
 using NUnit.Framework;
 using System;
diff --git a/src/Lucene.Net.Tests/Index/TestDocTermOrds.cs b/src/Lucene.Net.Tests/Index/TestDocTermOrds.cs
index 23775e8..1ba122e 100644
--- a/src/Lucene.Net.Tests/Index/TestDocTermOrds.cs
+++ b/src/Lucene.Net.Tests/Index/TestDocTermOrds.cs
@@ -1,3 +1,4 @@
+using J2N.Collections.Generic.Extensions;
 using Lucene.Net.Documents;
 using Lucene.Net.Index.Extensions;
 using Lucene.Net.Search;
@@ -5,9 +6,9 @@ using NUnit.Framework;
 using System;
 using System.Collections.Generic;
 using System.Linq;
-using JCG = J2N.Collections.Generic;
 using Assert = Lucene.Net.TestFramework.Assert;
 using Console = Lucene.Net.Util.SystemConsole;
+using JCG = J2N.Collections.Generic;
 
 namespace Lucene.Net.Index
 {
diff --git a/src/Lucene.Net.Tests/Index/TestMaxTermFrequency.cs b/src/Lucene.Net.Tests/Index/TestMaxTermFrequency.cs
index ec0d023..d9bd693 100644
--- a/src/Lucene.Net.Tests/Index/TestMaxTermFrequency.cs
+++ b/src/Lucene.Net.Tests/Index/TestMaxTermFrequency.cs
@@ -5,7 +5,6 @@ using Lucene.Net.Support;
 using NUnit.Framework;
 using System;
 using System.Collections.Generic;
-using System.Linq;
 using Assert = Lucene.Net.TestFramework.Assert;
 
 namespace Lucene.Net.Index
@@ -109,7 +108,7 @@ namespace Lucene.Net.Index
             expected.Add(max);
 
             terms.Shuffle(Random);
-            return Arrays.ToString(terms.ToArray());
+            return Collections.ToString(terms);
         }
 
         /// <summary>
diff --git a/src/Lucene.Net.Tests/Index/TestPostingsOffsets.cs b/src/Lucene.Net.Tests/Index/TestPostingsOffsets.cs
index a6d7ef3..c506b90 100644
--- a/src/Lucene.Net.Tests/Index/TestPostingsOffsets.cs
+++ b/src/Lucene.Net.Tests/Index/TestPostingsOffsets.cs
@@ -1,3 +1,4 @@
+using J2N.Collections.Generic.Extensions;
 using Lucene.Net.Documents;
 using Lucene.Net.Index.Extensions;
 using Lucene.Net.Search;
diff --git a/src/Lucene.Net.Tests/Search/TestMultiPhraseQuery.cs b/src/Lucene.Net.Tests/Search/TestMultiPhraseQuery.cs
index 504562e..086f81d 100644
--- a/src/Lucene.Net.Tests/Search/TestMultiPhraseQuery.cs
+++ b/src/Lucene.Net.Tests/Search/TestMultiPhraseQuery.cs
@@ -1,8 +1,9 @@
+using J2N.Collections.Generic.Extensions;
+using Lucene.Net.Documents;
+using NUnit.Framework;
 using System;
 using System.Collections.Generic;
 using System.Linq;
-using Lucene.Net.Documents;
-using NUnit.Framework;
 using Assert = Lucene.Net.TestFramework.Assert;
 using Console = Lucene.Net.Util.SystemConsole;
 
diff --git a/src/Lucene.Net.Tests/Search/TestPhrasePrefixQuery.cs b/src/Lucene.Net.Tests/Search/TestPhrasePrefixQuery.cs
index 319f4db..22f7bcd 100644
--- a/src/Lucene.Net.Tests/Search/TestPhrasePrefixQuery.cs
+++ b/src/Lucene.Net.Tests/Search/TestPhrasePrefixQuery.cs
@@ -1,8 +1,8 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
+using J2N.Collections.Generic.Extensions;
 using Lucene.Net.Documents;
 using NUnit.Framework;
+using System;
+using System.Collections.Generic;
 using Assert = Lucene.Net.TestFramework.Assert;
 
 namespace Lucene.Net.Search
diff --git a/src/Lucene.Net.Tests/Util/Automaton/TestCompiledAutomaton.cs b/src/Lucene.Net.Tests/Util/Automaton/TestCompiledAutomaton.cs
index 0d77750..1f19a77 100644
--- a/src/Lucene.Net.Tests/Util/Automaton/TestCompiledAutomaton.cs
+++ b/src/Lucene.Net.Tests/Util/Automaton/TestCompiledAutomaton.cs
@@ -1,10 +1,11 @@
+using J2N.Collections.Generic.Extensions;
 using NUnit.Framework;
 using System;
 using System.Collections.Generic;
 using System.Linq;
-using JCG = J2N.Collections.Generic;
 using Assert = Lucene.Net.TestFramework.Assert;
 using Console = Lucene.Net.Util.SystemConsole;
+using JCG = J2N.Collections.Generic;
 
 namespace Lucene.Net.Util.Automaton
 {
diff --git a/src/Lucene.Net.Tests/Util/TestRecyclingByteBlockAllocator.cs b/src/Lucene.Net.Tests/Util/TestRecyclingByteBlockAllocator.cs
index ea4c360..9eba354 100644
--- a/src/Lucene.Net.Tests/Util/TestRecyclingByteBlockAllocator.cs
+++ b/src/Lucene.Net.Tests/Util/TestRecyclingByteBlockAllocator.cs
@@ -1,3 +1,4 @@
+using J2N.Collections.Generic.Extensions;
 using NUnit.Framework;
 using System;
 using System.Collections.Generic;
diff --git a/src/Lucene.Net.Tests/Util/TestRecyclingIntBlockAllocator.cs b/src/Lucene.Net.Tests/Util/TestRecyclingIntBlockAllocator.cs
index f1c5b12..ab44866 100644
--- a/src/Lucene.Net.Tests/Util/TestRecyclingIntBlockAllocator.cs
+++ b/src/Lucene.Net.Tests/Util/TestRecyclingIntBlockAllocator.cs
@@ -1,3 +1,4 @@
+using J2N.Collections.Generic.Extensions;
 using NUnit.Framework;
 using System;
 using System.Collections.Generic;
diff --git a/src/Lucene.Net/Codecs/DocValuesConsumer.cs b/src/Lucene.Net/Codecs/DocValuesConsumer.cs
index 0b90d3a..c16ef25 100644
--- a/src/Lucene.Net/Codecs/DocValuesConsumer.cs
+++ b/src/Lucene.Net/Codecs/DocValuesConsumer.cs
@@ -1,8 +1,8 @@
+using J2N.Collections.Generic.Extensions;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.IO;
-using System.Linq;
 
 namespace Lucene.Net.Codecs
 {
diff --git a/src/Lucene.Net/Index/FieldInfos.cs b/src/Lucene.Net/Index/FieldInfos.cs
index 59bdcbc..46caee4 100644
--- a/src/Lucene.Net/Index/FieldInfos.cs
+++ b/src/Lucene.Net/Index/FieldInfos.cs
@@ -1,8 +1,8 @@
+using J2N.Collections.Generic.Extensions;
 using System;
 using System.Collections;
 using System.Collections.Generic;
 using System.Diagnostics;
-using System.Linq;
 using JCG = J2N.Collections.Generic;
 
 namespace Lucene.Net.Index
diff --git a/src/Lucene.Net/Index/FrozenBufferedUpdates.cs b/src/Lucene.Net/Index/FrozenBufferedUpdates.cs
index d768c11..1e1080f 100644
--- a/src/Lucene.Net/Index/FrozenBufferedUpdates.cs
+++ b/src/Lucene.Net/Index/FrozenBufferedUpdates.cs
@@ -1,8 +1,8 @@
+using J2N.Collections.Generic.Extensions;
 using System;
 using System.Collections;
 using System.Collections.Generic;
 using System.Diagnostics;
-using System.Linq;
 
 namespace Lucene.Net.Index
 {
@@ -68,7 +68,8 @@ namespace Lucene.Net.Index
         {
             this.isSegmentPrivate = isSegmentPrivate;
             Debug.Assert(!isSegmentPrivate || deletes.terms.Count == 0, "segment private package should only have del queries");
-            Term[] termsArray = deletes.terms.Keys.ToArray(/*new Term[deletes.Terms.Count]*/);
+            Term[] termsArray = deletes.terms.Keys.ToArray(/*new Term[deletes.terms.Count]*/);
+
             termCount = termsArray.Length;
             ArrayUtil.TimSort(termsArray);
             PrefixCodedTerms.Builder builder = new PrefixCodedTerms.Builder();
diff --git a/src/Lucene.Net/Index/MultiFields.cs b/src/Lucene.Net/Index/MultiFields.cs
index 91e78c3..dfda748 100644
--- a/src/Lucene.Net/Index/MultiFields.cs
+++ b/src/Lucene.Net/Index/MultiFields.cs
@@ -1,8 +1,8 @@
+using J2N.Collections.Generic.Extensions;
 using Lucene.Net.Util;
 using System.Collections.Concurrent;
 using System.Collections.Generic;
 using System.Diagnostics;
-using System.Linq;
 using JCG = J2N.Collections.Generic;
 
 namespace Lucene.Net.Index
diff --git a/src/Lucene.Net/Index/MultiTerms.cs b/src/Lucene.Net/Index/MultiTerms.cs
index 35ae959..6cbcd43 100644
--- a/src/Lucene.Net/Index/MultiTerms.cs
+++ b/src/Lucene.Net/Index/MultiTerms.cs
@@ -1,7 +1,7 @@
+using J2N.Collections.Generic.Extensions;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
-using System.Linq;
 
 namespace Lucene.Net.Index
 {
diff --git a/src/Lucene.Net/Index/SegmentDocValues.cs b/src/Lucene.Net/Index/SegmentDocValues.cs
index d5935b7..a9846f1 100644
--- a/src/Lucene.Net/Index/SegmentDocValues.cs
+++ b/src/Lucene.Net/Index/SegmentDocValues.cs
@@ -1,9 +1,9 @@
+using J2N.Collections.Generic.Extensions;
 using Lucene.Net.Util;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Globalization;
-using System.Linq;
 
 namespace Lucene.Net.Index
 {
diff --git a/src/Lucene.Net/Index/SegmentMerger.cs b/src/Lucene.Net/Index/SegmentMerger.cs
index d5c4d74..8a2128f 100644
--- a/src/Lucene.Net/Index/SegmentMerger.cs
+++ b/src/Lucene.Net/Index/SegmentMerger.cs
@@ -1,9 +1,9 @@
+using J2N.Collections.Generic.Extensions;
 using Lucene.Net.Support;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.IO;
-using System.Linq;
 using System.Runtime.CompilerServices;
 
 namespace Lucene.Net.Index
diff --git a/src/Lucene.Net/Index/StandardDirectoryReader.cs b/src/Lucene.Net/Index/StandardDirectoryReader.cs
index 5bb29c5..dd8c99a 100644
--- a/src/Lucene.Net/Index/StandardDirectoryReader.cs
+++ b/src/Lucene.Net/Index/StandardDirectoryReader.cs
@@ -1,8 +1,8 @@
+using J2N.Collections.Generic.Extensions;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.IO;
-using System.Linq;
 using System.Text;
 
 namespace Lucene.Net.Index
diff --git a/src/Lucene.Net/Search/BooleanQuery.cs b/src/Lucene.Net/Search/BooleanQuery.cs
index 6ea6a67..59f225b 100644
--- a/src/Lucene.Net/Search/BooleanQuery.cs
+++ b/src/Lucene.Net/Search/BooleanQuery.cs
@@ -1,8 +1,8 @@
 using J2N;
+using J2N.Collections.Generic.Extensions;
 using System;
 using System.Collections;
 using System.Collections.Generic;
-using System.Linq;
 #if FEATURE_SERIALIZABLE_EXCEPTIONS
 using System.Runtime.Serialization;
 #endif
diff --git a/src/Lucene.Net/Search/BooleanScorer2.cs b/src/Lucene.Net/Search/BooleanScorer2.cs
index ae4ace1..3daf92e 100644
--- a/src/Lucene.Net/Search/BooleanScorer2.cs
+++ b/src/Lucene.Net/Search/BooleanScorer2.cs
@@ -1,6 +1,6 @@
+using J2N.Collections.Generic.Extensions;
 using System;
 using System.Collections.Generic;
-using System.Linq;
 
 namespace Lucene.Net.Search
 {
diff --git a/src/Lucene.Net/Search/DisjunctionMaxQuery.cs b/src/Lucene.Net/Search/DisjunctionMaxQuery.cs
index 04184a5..be1c56a 100644
--- a/src/Lucene.Net/Search/DisjunctionMaxQuery.cs
+++ b/src/Lucene.Net/Search/DisjunctionMaxQuery.cs
@@ -1,8 +1,8 @@
+using J2N.Collections.Generic.Extensions;
 using Lucene.Net.Util;
 using System;
 using System.Collections;
 using System.Collections.Generic;
-using System.Linq;
 using System.Text;
 using JCG = J2N.Collections.Generic;
 
@@ -66,7 +66,7 @@ namespace Lucene.Net.Search
         /// <summary>
         /// Multiple of the non-max disjunct scores added into our final score.  Non-zero values support tie-breaking.
         /// </summary>
-        private float tieBreakerMultiplier = 0.0f;
+        private readonly float tieBreakerMultiplier = 0.0f;
 
         /// <summary>
         /// Creates a new empty <see cref="DisjunctionMaxQuery"/>.  Use <see cref="Add(Query)"/> to add the subqueries. </summary>
diff --git a/src/Lucene.Net/Search/FieldCacheImpl.cs b/src/Lucene.Net/Search/FieldCacheImpl.cs
index 61b4e2e..42c9be4 100644
--- a/src/Lucene.Net/Search/FieldCacheImpl.cs
+++ b/src/Lucene.Net/Search/FieldCacheImpl.cs
@@ -1,3 +1,4 @@
+using J2N.Collections.Generic.Extensions;
 using Lucene.Net.Index;
 using Lucene.Net.Support;
 using Lucene.Net.Support.IO;
@@ -6,7 +7,6 @@ using System.Collections.Concurrent;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.IO;
-using System.Linq;
 using System.Runtime.CompilerServices;
 
 namespace Lucene.Net.Search
@@ -146,7 +146,7 @@ namespace Lucene.Net.Search
 
         private class CoreClosedListenerAnonymousInnerClassHelper : SegmentReader.ICoreDisposedListener
         {
-            private FieldCacheImpl outerInstance;
+            private readonly FieldCacheImpl outerInstance;
 
             public CoreClosedListenerAnonymousInnerClassHelper(FieldCacheImpl outerInstance)
             {
@@ -164,7 +164,7 @@ namespace Lucene.Net.Search
 
         private class ReaderClosedListenerAnonymousInnerClassHelper : IndexReader.IReaderClosedListener
         {
-            private FieldCacheImpl outerInstance;
+            private readonly FieldCacheImpl outerInstance;
 
             public ReaderClosedListenerAnonymousInnerClassHelper(FieldCacheImpl outerInstance)
             {
diff --git a/src/Lucene.Net/Search/FuzzyTermsEnum.cs b/src/Lucene.Net/Search/FuzzyTermsEnum.cs
index 31fec71..41ab164 100644
--- a/src/Lucene.Net/Search/FuzzyTermsEnum.cs
+++ b/src/Lucene.Net/Search/FuzzyTermsEnum.cs
@@ -1,4 +1,5 @@
 using J2N;
+using J2N.Collections.Generic.Extensions;
 using Lucene.Net.Index;
 using Lucene.Net.Support;
 using Lucene.Net.Util;
@@ -6,7 +7,6 @@ using System;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.IO;
-using System.Linq;
 using JCG = J2N.Collections.Generic;
 
 namespace Lucene.Net.Search
diff --git a/src/Lucene.Net/Search/MinShouldMatchSumScorer.cs b/src/Lucene.Net/Search/MinShouldMatchSumScorer.cs
index e56daaf..3742c1c 100644
--- a/src/Lucene.Net/Search/MinShouldMatchSumScorer.cs
+++ b/src/Lucene.Net/Search/MinShouldMatchSumScorer.cs
@@ -1,8 +1,8 @@
 using J2N;
+using J2N.Collections.Generic.Extensions;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
-using System.Linq;
 
 namespace Lucene.Net.Search
 {
diff --git a/src/Lucene.Net/Search/PhraseQuery.cs b/src/Lucene.Net/Search/PhraseQuery.cs
index 22d6549..0ebb334 100644
--- a/src/Lucene.Net/Search/PhraseQuery.cs
+++ b/src/Lucene.Net/Search/PhraseQuery.cs
@@ -1,10 +1,10 @@
+using J2N.Collections.Generic.Extensions;
 using Lucene.Net.Index;
 using Lucene.Net.Support;
 using System;
 using System.Collections;
 using System.Collections.Generic;
 using System.Diagnostics;
-using System.Linq;
 using System.Text;
 using JCG = J2N.Collections.Generic;
 
diff --git a/src/Lucene.Net/Search/SloppyPhraseScorer.cs b/src/Lucene.Net/Search/SloppyPhraseScorer.cs
index a7213bc..c78836d 100644
--- a/src/Lucene.Net/Search/SloppyPhraseScorer.cs
+++ b/src/Lucene.Net/Search/SloppyPhraseScorer.cs
@@ -1,7 +1,7 @@
+using J2N.Collections.Generic.Extensions;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
-using System.Linq;
 using JCG = J2N.Collections.Generic;
 
 namespace Lucene.Net.Search
diff --git a/src/Lucene.Net/Search/Spans/SpanNearQuery.cs b/src/Lucene.Net/Search/Spans/SpanNearQuery.cs
index d5e9422..a4bbe9a 100644
--- a/src/Lucene.Net/Search/Spans/SpanNearQuery.cs
+++ b/src/Lucene.Net/Search/Spans/SpanNearQuery.cs
@@ -1,6 +1,6 @@
+using J2N.Collections.Generic.Extensions;
 using System;
 using System.Collections.Generic;
-using System.Linq;
 using System.Text;
 using JCG = J2N.Collections.Generic;
 
diff --git a/src/Lucene.Net/Search/Spans/SpanOrQuery.cs b/src/Lucene.Net/Search/Spans/SpanOrQuery.cs
index 59f803f..74e228c 100644
--- a/src/Lucene.Net/Search/Spans/SpanOrQuery.cs
+++ b/src/Lucene.Net/Search/Spans/SpanOrQuery.cs
@@ -1,6 +1,6 @@
+using J2N.Collections.Generic.Extensions;
 using System;
 using System.Collections.Generic;
-using System.Linq;
 using System.Text;
 using JCG = J2N.Collections.Generic;
 
diff --git a/src/Lucene.Net/Search/TopTermsRewrite.cs b/src/Lucene.Net/Search/TopTermsRewrite.cs
index 2f07eb8..f4b9b5e 100644
--- a/src/Lucene.Net/Search/TopTermsRewrite.cs
+++ b/src/Lucene.Net/Search/TopTermsRewrite.cs
@@ -1,7 +1,7 @@
+using J2N.Collections.Generic.Extensions;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
-using System.Linq;
 using JCG = J2N.Collections.Generic;
 
 namespace Lucene.Net.Search
@@ -77,7 +77,8 @@ namespace Lucene.Net.Search
             CollectTerms(reader, query, new TermCollectorAnonymousInnerClassHelper(this, maxSize, stQueue));
 
             var q = GetTopLevelQuery();
-            ScoreTerm[] scoreTerms = stQueue.ToArray(/*new ScoreTerm[stQueue.size()]*/);
+            ScoreTerm[] scoreTerms = stQueue.ToArray(/*new ScoreTerm[stQueue.Count]*/);
+
             ArrayUtil.TimSort(scoreTerms, scoreTermSortByTermComp);
 
             foreach (ScoreTerm st in scoreTerms)
diff --git a/src/Lucene.Net/Store/CompoundFileDirectory.cs b/src/Lucene.Net/Store/CompoundFileDirectory.cs
index b0230f5..d3d7e7c 100644
--- a/src/Lucene.Net/Store/CompoundFileDirectory.cs
+++ b/src/Lucene.Net/Store/CompoundFileDirectory.cs
@@ -1,10 +1,10 @@
+using J2N.Collections.Generic.Extensions;
 using J2N.Numerics;
 using Lucene.Net.Support;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.IO;
-using System.Linq;
 
 namespace Lucene.Net.Store
 {
diff --git a/src/Lucene.Net/Store/CompoundFileWriter.cs b/src/Lucene.Net/Store/CompoundFileWriter.cs
index 5a3900c..885426a 100644
--- a/src/Lucene.Net/Store/CompoundFileWriter.cs
+++ b/src/Lucene.Net/Store/CompoundFileWriter.cs
@@ -1,9 +1,9 @@
+using J2N.Collections.Generic.Extensions;
 using J2N.Threading.Atomic;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.IO;
-using System.Linq;
 using System.Runtime.CompilerServices;
 using JCG = J2N.Collections.Generic;
 
diff --git a/src/Lucene.Net/Store/FileSwitchDirectory.cs b/src/Lucene.Net/Store/FileSwitchDirectory.cs
index 7eec170..49b734f 100644
--- a/src/Lucene.Net/Store/FileSwitchDirectory.cs
+++ b/src/Lucene.Net/Store/FileSwitchDirectory.cs
@@ -1,7 +1,7 @@
+using J2N.Collections.Generic.Extensions;
 using System;
 using System.Collections.Generic;
 using System.IO;
-using System.Linq;
 using JCG = J2N.Collections.Generic;
 
 namespace Lucene.Net.Store
diff --git a/src/Lucene.Net/Store/NRTCachingDirectory.cs b/src/Lucene.Net/Store/NRTCachingDirectory.cs
index acafa79..1eb8e16 100644
--- a/src/Lucene.Net/Store/NRTCachingDirectory.cs
+++ b/src/Lucene.Net/Store/NRTCachingDirectory.cs
@@ -1,9 +1,9 @@
+using J2N.Collections.Generic.Extensions;
 using System;
 using System.Collections.Generic;
 using System.IO;
-using System.Linq;
-using JCG = J2N.Collections.Generic;
 using Console = Lucene.Net.Util.SystemConsole;
+using JCG = J2N.Collections.Generic;
 
 namespace Lucene.Net.Store
 {
diff --git a/src/Lucene.Net/Store/RAMDirectory.cs b/src/Lucene.Net/Store/RAMDirectory.cs
index 5b3c705..7cf0746 100644
--- a/src/Lucene.Net/Store/RAMDirectory.cs
+++ b/src/Lucene.Net/Store/RAMDirectory.cs
@@ -1,10 +1,10 @@
+using J2N.Collections.Generic.Extensions;
 using J2N.Threading.Atomic;
 using System;
 using System.Collections.Concurrent;
 using System.Collections.Generic;
 using System.Globalization;
 using System.IO;
-using System.Linq;
 
 namespace Lucene.Net.Store
 {
diff --git a/src/Lucene.Net/Support/CollectionExtensions.cs b/src/Lucene.Net/Support/CollectionExtensions.cs
new file mode 100644
index 0000000..6eb7ed0
--- /dev/null
+++ b/src/Lucene.Net/Support/CollectionExtensions.cs
@@ -0,0 +1,51 @@
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Runtime.CompilerServices;
+
+namespace Lucene.Net.Support
+{
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
+    /// <summary>
+    /// Extensions for <see cref="ICollection{T}"/>.
+    /// </summary>
+    internal static class CollectionExtensions
+    {
+        /// <summary>
+        /// Removes the given collection of elements from the source <see cref="ICollection{T}"/>.
+        /// </summary>
+        /// <typeparam name="T">The type of the elements of <paramref name="source"/>.</typeparam>
+        /// <param name="source">An <see cref="ICollection{T}"/> to remove elements from.</param>
+        /// <param name="removeList">An <see cref="IEnumerable{T}"/> containing the items to remove from <paramref name="source"/>.</param>
+        [DebuggerStepThrough]
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
+        public static void RemoveAll<T>(this ICollection<T> source, IEnumerable<T> removeList)
+        {
+            if (source == null)
+                throw new ArgumentNullException(nameof(source));
+
+            if (source.Count == 0) return;
+
+            foreach (var elt in removeList)
+            {
+                source.Remove(elt);
+            }
+        }
+    }
+}
diff --git a/src/Lucene.Net/Support/Index/TaskMergeScheduler.cs b/src/Lucene.Net/Support/Index/TaskMergeScheduler.cs
index 29058de..64a5272 100644
--- a/src/Lucene.Net/Support/Index/TaskMergeScheduler.cs
+++ b/src/Lucene.Net/Support/Index/TaskMergeScheduler.cs
@@ -1,4 +1,5 @@
-using Lucene.Net.Support.Threading;
+using J2N.Collections.Generic.Extensions;
+using Lucene.Net.Support.Threading;
 using Lucene.Net.Util;
 using System;
 using System.Collections.Generic;
diff --git a/src/Lucene.Net/Support/SetExtensions.cs b/src/Lucene.Net/Support/SetExtensions.cs
index 4ab38e9..53e91a7 100644
--- a/src/Lucene.Net/Support/SetExtensions.cs
+++ b/src/Lucene.Net/Support/SetExtensions.cs
@@ -1,7 +1,6 @@
 using System;
 using System.Collections;
 using System.Collections.Generic;
-using System.Diagnostics;
 
 namespace Lucene.Net.Support
 {
@@ -24,15 +23,6 @@ namespace Lucene.Net.Support
 
     internal static class SetExtensions
     {
-        [DebuggerStepThrough]
-        public static void RemoveAll<T>(this ICollection<T> theSet, IEnumerable<T> removeList)
-        {
-            foreach (var elt in removeList)
-            {
-                theSet.Remove(elt);
-            }
-        }
-
         /// <summary>
         /// Returns a concurrent wrapper for the current <see cref="ISet{T}"/>.
         /// </summary>
diff --git a/src/Lucene.Net/Support/Util/ExceptionExtensions.cs b/src/Lucene.Net/Support/Util/ExceptionExtensions.cs
index bd38e59..5983af1 100644
--- a/src/Lucene.Net/Support/Util/ExceptionExtensions.cs
+++ b/src/Lucene.Net/Support/Util/ExceptionExtensions.cs
@@ -1,4 +1,5 @@
-using System;
+using J2N.Collections.Generic.Extensions;
+using System;
 using System.Collections.Generic;
 using System.Linq;
 
diff --git a/src/Lucene.Net/Support/WeakDictionary.cs b/src/Lucene.Net/Support/WeakDictionary.cs
index 3d6567f..c8be30c 100644
--- a/src/Lucene.Net/Support/WeakDictionary.cs
+++ b/src/Lucene.Net/Support/WeakDictionary.cs
@@ -38,11 +38,11 @@ namespace Lucene.Net.Support
         private int _gcCollections = 0;
 
         public WeakDictionary(int initialCapacity)
-            : this(initialCapacity, Enumerable.Empty<KeyValuePair<TKey, TValue>>())
+            : this(initialCapacity, Arrays.Empty<KeyValuePair<TKey, TValue>>())
         { }
 
         public WeakDictionary()
-            : this(32, Enumerable.Empty<KeyValuePair<TKey, TValue>>())
+            : this(32, Arrays.Empty<KeyValuePair<TKey, TValue>>())
         { }
 
         public WeakDictionary(IEnumerable<KeyValuePair<TKey, TValue>> otherDictionary)
diff --git a/src/Lucene.Net/Util/Attribute.cs b/src/Lucene.Net/Util/Attribute.cs
index c9eda89..782392f 100644
--- a/src/Lucene.Net/Util/Attribute.cs
+++ b/src/Lucene.Net/Util/Attribute.cs
@@ -1,9 +1,3 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Reflection;
-using System.Text;
-
 namespace Lucene.Net.Util
 {
     /*
diff --git a/src/Lucene.Net/Util/Automaton/Automaton.cs b/src/Lucene.Net/Util/Automaton/Automaton.cs
index 51ab8b3..36fe166 100644
--- a/src/Lucene.Net/Util/Automaton/Automaton.cs
+++ b/src/Lucene.Net/Util/Automaton/Automaton.cs
@@ -1,8 +1,8 @@
 using J2N;
+using J2N.Collections.Generic.Extensions;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
-using System.Linq;
 using System.Text;
 using JCG = J2N.Collections.Generic;
 
diff --git a/src/Lucene.Net/Util/Automaton/SpecialOperations.cs b/src/Lucene.Net/Util/Automaton/SpecialOperations.cs
index c22ce6d..f9e0f3f 100644
--- a/src/Lucene.Net/Util/Automaton/SpecialOperations.cs
+++ b/src/Lucene.Net/Util/Automaton/SpecialOperations.cs
@@ -1,3 +1,4 @@
+using J2N.Collections.Generic.Extensions;
 using J2N.Text;
 using System.Collections.Generic;
 using System.Linq;
diff --git a/src/Lucene.Net/Util/ByteBlockPool.cs b/src/Lucene.Net/Util/ByteBlockPool.cs
index 50deda9..bfb7ed1 100644
--- a/src/Lucene.Net/Util/ByteBlockPool.cs
+++ b/src/Lucene.Net/Util/ByteBlockPool.cs
@@ -1,10 +1,10 @@
+using J2N.Collections.Generic.Extensions;
 using J2N.Numerics;
 using Lucene.Net.Support;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Diagnostics.CodeAnalysis;
-using System.Linq;
 
 namespace Lucene.Net.Util
 {
diff --git a/src/Lucene.Net/Util/QueryBuilder.cs b/src/Lucene.Net/Util/QueryBuilder.cs
index 336a543..25f0079 100644
--- a/src/Lucene.Net/Util/QueryBuilder.cs
+++ b/src/Lucene.Net/Util/QueryBuilder.cs
@@ -1,9 +1,9 @@
+using J2N.Collections.Generic.Extensions;
 using Lucene.Net.Analysis.TokenAttributes;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.IO;
-using System.Linq;
 
 namespace Lucene.Net.Util
 {
diff --git a/src/Lucene.Net/Util/SPIClassIterator.cs b/src/Lucene.Net/Util/SPIClassIterator.cs
index 24da34e..a2cbebd 100644
--- a/src/Lucene.Net/Util/SPIClassIterator.cs
+++ b/src/Lucene.Net/Util/SPIClassIterator.cs
@@ -1,7 +1,6 @@
 using System;
 using System.Collections.Generic;
 using System.Linq;
-using System.Reflection;
 using JCG = J2N.Collections.Generic;
 
 namespace Lucene.Net.Util


[lucenenet] 05/14: build.Dependencies.props: Upgraded ICU4N package version to 60.1.0-alpha.352

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit ca6e0dcd6eaabad5087933fca37d8457c932bc17
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Tue Jul 28 21:04:59 2020 +0700

    build.Dependencies.props: Upgraded ICU4N package version to 60.1.0-alpha.352
---
 build/Dependencies.props | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build/Dependencies.props b/build/Dependencies.props
index 0d6edfb..d7ac200 100644
--- a/build/Dependencies.props
+++ b/build/Dependencies.props
@@ -32,7 +32,7 @@
         https://github.com/apache/lucene-solr/tree/31d7ec7bbfdcd2c4cc61d9d35e962165410b65fe/lucene/analysis/icu/src/data/utr30
         Just make sure they are adjusted to the right version of ICU/Lucene.
     <ICU4NPackageVersion>[60.1,60.2)</ICU4NPackageVersion> -->
-    <ICU4NPackageVersion>60.1.0-alpha.351</ICU4NPackageVersion>
+    <ICU4NPackageVersion>60.1.0-alpha.352</ICU4NPackageVersion>
     <ICU4NCollationPackageVersion>$(ICU4NPackageVersion)</ICU4NCollationPackageVersion>
     <ICU4NCurrencyDataPackageVersion>$(ICU4NPackageVersion)</ICU4NCurrencyDataPackageVersion>
     <ICU4NLanguageDataPackageVersion>$(ICU4NPackageVersion)</ICU4NLanguageDataPackageVersion>


[lucenenet] 04/14: build/Dependencies.props: Upgraded J2N package dependency to 2.0.0-beta-0009

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit af89b6630280098e90e31f08b4002326411430bf
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Sat Jul 25 15:00:07 2020 +0700

    build/Dependencies.props: Upgraded J2N package dependency to 2.0.0-beta-0009
---
 build/Dependencies.props | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/build/Dependencies.props b/build/Dependencies.props
index fd067cc..0d6edfb 100644
--- a/build/Dependencies.props
+++ b/build/Dependencies.props
@@ -38,7 +38,7 @@
     <ICU4NLanguageDataPackageVersion>$(ICU4NPackageVersion)</ICU4NLanguageDataPackageVersion>
     <ICU4NRegionDataPackageVersion>$(ICU4NPackageVersion)</ICU4NRegionDataPackageVersion>
     <ICU4NTransliteratorPackageVersion>$(ICU4NPackageVersion)</ICU4NTransliteratorPackageVersion>
-    <J2NPackageVersion>2.0.0-beta-0008</J2NPackageVersion>
+    <J2NPackageVersion>2.0.0-beta-0009</J2NPackageVersion>
     <MicrosoftAspNetCoreHttpAbstractionsPackageVersion>1.0.3</MicrosoftAspNetCoreHttpAbstractionsPackageVersion>
     <MicrosoftAspNetCoreTestHostPackageVersion>1.0.3</MicrosoftAspNetCoreTestHostPackageVersion>
     <MicrosoftCodeAnalysisAnalyzersPackageVersion>2.9.8</MicrosoftCodeAnalysisAnalyzersPackageVersion>


[lucenenet] 03/14: PERFORMANCE: Lucene.Net.Index.FieldInfos: Changed Builder.FieldInfo() method to TryGetFieldInfo() to optimize check for value (see #261)

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit 299e04766ed37af0b9b91affdac6a7e01bd81fa0
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Thu Jul 23 12:05:50 2020 +0700

    PERFORMANCE: Lucene.Net.Index.FieldInfos: Changed Builder.FieldInfo() method to TryGetFieldInfo() to optimize check for value (see #261)
---
 src/Lucene.Net/Index/FieldInfos.cs | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/src/Lucene.Net/Index/FieldInfos.cs b/src/Lucene.Net/Index/FieldInfos.cs
index 6f6c77d..59bdcbc 100644
--- a/src/Lucene.Net/Index/FieldInfos.cs
+++ b/src/Lucene.Net/Index/FieldInfos.cs
@@ -365,8 +365,8 @@ namespace Lucene.Net.Index
 
             private FieldInfo AddOrUpdateInternal(string name, int preferredFieldNumber, bool isIndexed, bool storeTermVector, bool omitNorms, bool storePayloads, IndexOptions indexOptions, DocValuesType docValues, DocValuesType normType)
             {
-                FieldInfo fi = FieldInfo(name);
-                if (fi == null)
+                // LUCENENET: Bypass FieldInfo method so we can access the quick boolean check
+                if (!TryGetFieldInfo(name, out FieldInfo fi) || fi is null)
                 {
                     // this field wasn't yet added to this in-RAM
                     // segment's FieldInfo, so now we get a global
@@ -410,11 +410,9 @@ namespace Lucene.Net.Index
                 return AddOrUpdateInternal(fi.Name, fi.Number, fi.IsIndexed, fi.HasVectors, fi.OmitsNorms, fi.HasPayloads, fi.IndexOptions, fi.DocValuesType, fi.NormType);
             }
 
-            public FieldInfo FieldInfo(string fieldName)
+            public bool TryGetFieldInfo(string fieldName, out FieldInfo ret) // LUCENENET specific - changed from FieldInfo to TryGetFieldInfo
             {
-                FieldInfo ret;
-                byName.TryGetValue(fieldName, out ret);
-                return ret;
+                return byName.TryGetValue(fieldName, out ret);
             }
 
             public FieldInfos Finish()


[lucenenet] 08/14: Lucene.Net.Support.IO.FileSupport::CreateTempFile(): Optimized the check for invalid characters to shave off a few ns

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit 75f4e0b0ed6980a9f8c025ce85bc74dfc93dd531
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Fri Jul 24 08:53:47 2020 +0700

    Lucene.Net.Support.IO.FileSupport::CreateTempFile(): Optimized the check for invalid characters to shave off a few ns
---
 src/Lucene.Net/Support/IO/FileSupport.cs        | 15 +++----
 src/Lucene.Net/Support/Text/StringExtensions.cs | 52 +++++++++++++++++++++++++
 2 files changed, 60 insertions(+), 7 deletions(-)

diff --git a/src/Lucene.Net/Support/IO/FileSupport.cs b/src/Lucene.Net/Support/IO/FileSupport.cs
index 2fdaf9d..a4b903c 100644
--- a/src/Lucene.Net/Support/IO/FileSupport.cs
+++ b/src/Lucene.Net/Support/IO/FileSupport.cs
@@ -1,8 +1,9 @@
+using Lucene.Net.Support.Text;
 using Lucene.Net.Util;
 using System;
 using System.Collections.Concurrent;
+using System.Collections.Generic;
 using System.IO;
-using System.Linq;
 using System.Text;
 
 namespace Lucene.Net.Support.IO
@@ -29,6 +30,8 @@ namespace Lucene.Net.Support.IO
     /// </summary>
     internal static class FileSupport
     {
+        private static readonly char[] INVALID_FILENAME_CHARS = Path.GetInvalidFileNameChars();
+
         // LUCNENENET NOTE: Lookup the HResult value we are interested in for the current OS
         // by provoking the exception during initialization and caching its HResult value for later.
         // We optimize for Windows because those HResult values are known and documented, but for
@@ -157,12 +160,10 @@ namespace Lucene.Net.Support.IO
                 throw new ArgumentException("Prefix string too short");
 
             // Ensure the strings passed don't contain invalid characters
-            char[] invalid = Path.GetInvalidFileNameChars();
-
-            if (prefix.ToCharArray().Intersect(invalid).Any())
-                throw new ArgumentException(string.Format("Prefix contains invalid characters. You may not use any of '{0}'", string.Join(", ", invalid)));
-            if (suffix != null && suffix.ToCharArray().Intersect(invalid).Any())
-                throw new ArgumentException(string.Format("Suffix contains invalid characters. You may not use any of '{0}'", string.Join(", ", invalid)));
+            if (prefix.ContainsAny(INVALID_FILENAME_CHARS))
+                throw new ArgumentException(string.Format("Prefix contains invalid characters. You may not use any of '{0}'", string.Join(", ", INVALID_FILENAME_CHARS)));
+            if (suffix != null && suffix.ContainsAny(INVALID_FILENAME_CHARS))
+                throw new ArgumentException(string.Format("Suffix contains invalid characters. You may not use any of '{0}'", string.Join(", ", INVALID_FILENAME_CHARS)));
 
             // If no directory supplied, create one.
             if (directory == null)
diff --git a/src/Lucene.Net/Support/Text/StringExtensions.cs b/src/Lucene.Net/Support/Text/StringExtensions.cs
new file mode 100644
index 0000000..3886a0e
--- /dev/null
+++ b/src/Lucene.Net/Support/Text/StringExtensions.cs
@@ -0,0 +1,52 @@
+using J2N.Text;
+using System;
+using System.Runtime.CompilerServices;
+
+namespace Lucene.Net.Support.Text
+{
+    /*
+     * Licensed to the Apache Software Foundation (ASF) under one or more
+     * contributor license agreements.  See the NOTICE file distributed with
+     * this work for additional information regarding copyright ownership.
+     * The ASF licenses this file to You under the Apache License, Version 2.0
+     * (the "License"); you may not use this file except in compliance with
+     * the License.  You may obtain a copy of the License at
+     *
+     *     http://www.apache.org/licenses/LICENSE-2.0
+     *
+     * Unless required by applicable law or agreed to in writing, software
+     * distributed under the License is distributed on an "AS IS" BASIS,
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     * See the License for the specific language governing permissions and
+     * limitations under the License.
+     */
+
+    /// <summary>
+    /// Extensions to <see cref="string"/>.
+    /// </summary>
+    internal static class StringExtensions
+    {
+        /// <summary>
+        /// Returns <c>true</c> if <paramref name="input"/> contains any character from <paramref name="charsToCompare"/>.
+        /// </summary>
+        /// <param name="input">The string in which to seek characters from <paramref name="charsToCompare"/>.</param>
+        /// <param name="charsToCompare">An array of characters to check.</param>
+        /// <returns><c>true</c> if any <paramref name="charsToCompare"/> are found, otherwise; <c>false</c>.</returns>
+        [MethodImpl(MethodImplOptions.AggressiveInlining)]
+        public static bool ContainsAny(this string input, char[] charsToCompare)
+        {
+            if (input == null)
+                throw new ArgumentNullException(nameof(input));
+            if (charsToCompare == null)
+                throw new ArgumentNullException(nameof(charsToCompare));
+
+            // Ensure the strings passed don't contain invalid characters
+            for (int i = 0; i < charsToCompare.Length; i++)
+            {
+                if (input.Contains(charsToCompare[i]))
+                    return true;
+            }
+            return false;
+        }
+    }
+}


[lucenenet] 01/14: PERFORMANCE: Lucene.Net.TestFramework: Fixed FSTTester to delete while iterating forward instead of using .ElementAt() to iterate in reverse, which takes about 3x longer (see #261)

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit b4c473e328553439db2ac03c0a56c752b6459163
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Thu Jul 23 09:41:28 2020 +0700

    PERFORMANCE: Lucene.Net.TestFramework: Fixed FSTTester to delete while iterating forward instead of using .ElementAt() to iterate in reverse, which takes about 3x longer (see #261)
---
 src/Lucene.Net.TestFramework/Util/Fst/FSTTester.cs | 105 +++++++++++----------
 src/Lucene.Net.Tests/Util/Fst/TestFSTs.cs          |  17 +---
 2 files changed, 57 insertions(+), 65 deletions(-)

diff --git a/src/Lucene.Net.TestFramework/Util/Fst/FSTTester.cs b/src/Lucene.Net.TestFramework/Util/Fst/FSTTester.cs
index 333f253..69c9f7a 100644
--- a/src/Lucene.Net.TestFramework/Util/Fst/FSTTester.cs
+++ b/src/Lucene.Net.TestFramework/Util/Fst/FSTTester.cs
@@ -5,9 +5,9 @@ using Lucene.Net.Support;
 using Lucene.Net.Util.Packed;
 using System;
 using System.Collections;
+using System.Collections.Concurrent;
 using System.Collections.Generic;
 using System.IO;
-using System.Linq;
 using System.Text;
 using JCG = J2N.Collections.Generic;
 using Console = Lucene.Net.Util.SystemConsole;
@@ -823,8 +823,9 @@ namespace Lucene.Net.Util.Fst
 
             // build all prefixes
 
-            // LUCENENET: We don't want to use a J2N dictionary here because of performance
-            IDictionary<Int32sRef, CountMinOutput<T>> prefixes = new Dictionary<Int32sRef, CountMinOutput<T>>();
+            // LUCENENET: We use ConcurrentDictionary<TKey, TValue> because Dictionary<TKey, TValue> doesn't support
+            // deletion while iterating, but ConcurrentDictionary does.
+            IDictionary<Int32sRef, CountMinOutput<T>> prefixes = new ConcurrentDictionary<Int32sRef, CountMinOutput<T>>();
             Int32sRef scratch = new Int32sRef(10);
             foreach (InputOutput<T> pair in pairs)
             {
@@ -867,69 +868,69 @@ namespace Lucene.Net.Util.Fst
                 Console.WriteLine("TEST: now prune");
             }
 
-
             // prune 'em
-            // LUCENENET NOTE: Altered this a bit to go in reverse rather than use an enumerator since
-            // in .NET you cannot delete records while enumerating forward through a dictionary.
-            for (int i = prefixes.Count - 1; i >= 0; i--)
+            using (var it = prefixes.GetEnumerator())
             {
-                KeyValuePair<Int32sRef, CountMinOutput<T>> ent = prefixes.ElementAt(i);
-                Int32sRef prefix = ent.Key;
-                CountMinOutput<T> cmo = ent.Value;
-                if (LuceneTestCase.Verbose)
-                {
-                    Console.WriteLine("  term prefix=" + InputToString(inputMode, prefix, false) + " count=" + cmo.Count + " isLeaf=" + cmo.IsLeaf + " output=" + outputs.OutputToString(cmo.Output) + " isFinal=" + cmo.IsFinal);
-                }
-                bool keep;
-                if (prune1 > 0)
+                while (it.MoveNext())
                 {
-                    keep = cmo.Count >= prune1;
-                }
-                else
-                {
-                    Debug.Assert(prune2 > 0);
-                    if (prune2 > 1 && cmo.Count >= prune2)
-                    {
-                        keep = true;
-                    }
-                    else if (prefix.Length > 0)
+                    var ent = it.Current;
+                    Int32sRef prefix = ent.Key;
+                    CountMinOutput<T> cmo = ent.Value;
+                    if (LuceneTestCase.Verbose)
                     {
-                        // consult our parent
-                        scratch.Length = prefix.Length - 1;
-                        Array.Copy(prefix.Int32s, prefix.Offset, scratch.Int32s, 0, scratch.Length);
-                        prefixes.TryGetValue(scratch, out CountMinOutput<T> cmo2);
-                        //System.out.println("    parent count = " + (cmo2 == null ? -1 : cmo2.count));
-                        keep = cmo2 != null && ((prune2 > 1 && cmo2.Count >= prune2) || (prune2 == 1 && (cmo2.Count >= 2 || prefix.Length <= 1)));
+                        Console.WriteLine("  term prefix=" + InputToString(inputMode, prefix, false) + " count=" + cmo.Count + " isLeaf=" + cmo.IsLeaf + " output=" + outputs.OutputToString(cmo.Output) + " isFinal=" + cmo.IsFinal);
                     }
-                    else if (cmo.Count >= prune2)
+                    bool keep;
+                    if (prune1 > 0)
                     {
-                        keep = true;
+                        keep = cmo.Count >= prune1;
                     }
                     else
                     {
-                        keep = false;
+                        Debug.Assert(prune2 > 0);
+                        if (prune2 > 1 && cmo.Count >= prune2)
+                        {
+                            keep = true;
+                        }
+                        else if (prefix.Length > 0)
+                        {
+                            // consult our parent
+                            scratch.Length = prefix.Length - 1;
+                            Array.Copy(prefix.Int32s, prefix.Offset, scratch.Int32s, 0, scratch.Length);
+                            keep = prefixes.TryGetValue(scratch, out CountMinOutput<T> cmo2) && cmo2 != null && ((prune2 > 1 && cmo2.Count >= prune2) || (prune2 == 1 && (cmo2.Count >= 2 || prefix.Length <= 1)));
+                            //System.out.println("    parent count = " + (cmo2 == null ? -1 : cmo2.count));
+                        }
+                        else if (cmo.Count >= prune2)
+                        {
+                            keep = true;
+                        }
+                        else
+                        {
+                            keep = false;
+                        }
                     }
-                }
 
-                if (!keep)
-                {
-                    prefixes.Remove(prefix);
-                    //System.out.println("    remove");
-                }
-                else
-                {
-                    // clear isLeaf for all ancestors
-                    //System.out.println("    keep");
-                    scratch.CopyInt32s(prefix);
-                    scratch.Length--;
-                    while (scratch.Length >= 0)
+                    if (!keep)
+                    {
+                        //it.remove();
+                        prefixes.Remove(ent);
+                        //System.out.println("    remove");
+                    }
+                    else
                     {
-                        if (prefixes.TryGetValue(scratch, out CountMinOutput<T> cmo2) && cmo2 != null)
+                        // clear isLeaf for all ancestors
+                        //System.out.println("    keep");
+                        scratch.CopyInt32s(prefix);
+                        scratch.Length--;
+                        while (scratch.Length >= 0)
                         {
-                            //System.out.println("    clear isLeaf " + inputToString(inputMode, scratch));
-                            cmo2.IsLeaf = false;
+                            if (prefixes.TryGetValue(scratch, out CountMinOutput<T> cmo2) && cmo2 != null)
+                            {
+                                //System.out.println("    clear isLeaf " + inputToString(inputMode, scratch));
+                                cmo2.IsLeaf = false;
+                            }
+                            scratch.Length--;
                         }
-                        scratch.Length--;
                     }
                 }
             }
diff --git a/src/Lucene.Net.Tests/Util/Fst/TestFSTs.cs b/src/Lucene.Net.Tests/Util/Fst/TestFSTs.cs
index ecab235..bd051c0 100644
--- a/src/Lucene.Net.Tests/Util/Fst/TestFSTs.cs
+++ b/src/Lucene.Net.Tests/Util/Fst/TestFSTs.cs
@@ -268,18 +268,9 @@ namespace Lucene.Net.Util.Fst
 
 
         [Test]
-        [Slow]
         public virtual void TestRandomWords()
         {
-            // LUCENENET specific: NUnit will crash with an OOM if we do the full test
-            // with verbosity enabled. So, making this a manual setting that can be
-            // turned on if, and only if, needed for debugging. If the setting is turned
-            // on, we are decresing the number of iterations by 9/10, which seems to
-            // keep it from crashing.
-            bool isVerbose = false; // Enable manually
-            int maxNumWords = isVerbose ? 500 : 1000;
-          
-            TestRandomWords(maxNumWords, AtLeast(2), isVerbose);
+            TestRandomWords(1000, AtLeast(2));
             //testRandomWords(100, 1);
         }
 
@@ -295,12 +286,12 @@ namespace Lucene.Net.Util.Fst
             }
         }
 
-        private void TestRandomWords(int maxNumWords, int numIter, bool VERBOSE)
+        private void TestRandomWords(int maxNumWords, int numIter)
         {
             Random random = new Random(Random.Next());
             for (int iter = 0; iter < numIter; iter++)
             {
-                if (VERBOSE)
+                if (Verbose)
                 {
                     Console.WriteLine("\nTEST: iter " + iter);
                 }
@@ -323,7 +314,7 @@ namespace Lucene.Net.Util.Fst
         [Nightly]
         public virtual void TestBigSet()
         {
-            TestRandomWords(TestUtil.NextInt32(Random, 50000, 60000), 1, false);
+            TestRandomWords(TestUtil.NextInt32(Random, 50000, 60000), 1);
         }
 
         // Build FST for all unique terms in the test line docs


[lucenenet] 14/14: Lucene.Net.TestFramework: Fixed broken XML doc comment

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit 7622fbf913894109261695775742ca1d6f731363
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Sun Jul 26 10:54:28 2020 +0700

    Lucene.Net.TestFramework: Fixed broken XML doc comment
---
 .../Support/Configuration/TestConfigurationFactory.cs                   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Lucene.Net.TestFramework/Support/Configuration/TestConfigurationFactory.cs b/src/Lucene.Net.TestFramework/Support/Configuration/TestConfigurationFactory.cs
index eec42bd..c9f4a70 100644
--- a/src/Lucene.Net.TestFramework/Support/Configuration/TestConfigurationFactory.cs
+++ b/src/Lucene.Net.TestFramework/Support/Configuration/TestConfigurationFactory.cs
@@ -40,7 +40,7 @@ namespace Lucene.Net.Configuration
         internal string TestDirectory { get; set; }
 
         /// <summary>
-        /// Initializes a cache containing a <see cref="LuceneDefaultConfigurationSource"/> and a JSON source by default. 
+        /// Initializes a cache containing a <see cref="EnvironmentVariablesConfigurationProvider"/> and a JSON source by default. 
         /// Uses the supplied <see cref="JsonTestSettingsFileName"/>.
         /// </summary>
         /// <returns>An <see cref="IConfiguration"/> instance.</returns>


[lucenenet] 10/14: PERFORMANCE: Eliminated several calls to FirstOrDefault(), LastOrDefault(), Skip(), First(), and Last() (see #261)

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit 61bd53961e748ae032ad42ed90bb5bef67b05a98
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Fri Jul 24 09:03:26 2020 +0700

    PERFORMANCE: Eliminated several calls to FirstOrDefault(), LastOrDefault(), Skip(), First(), and Last() (see #261)
---
 src/Lucene.Net.Analysis.Kuromoji/JapaneseTokenizer.cs  |  3 +--
 .../Language/Bm/PhoneticEngine.cs                      |  4 +---
 .../Quality/Utils/DocNameExtractor.cs                  |  3 +--
 src/Lucene.Net.Grouping/SearchGroup.cs                 |  5 ++---
 src/Lucene.Net.QueryParser/Surround/Query/NotQuery.cs  | 18 ++++++++++++------
 src/Lucene.Net/Store/LockStressTest.cs                 |  3 +--
 6 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/src/Lucene.Net.Analysis.Kuromoji/JapaneseTokenizer.cs b/src/Lucene.Net.Analysis.Kuromoji/JapaneseTokenizer.cs
index 3dda7bb..cfd9a9a 100644
--- a/src/Lucene.Net.Analysis.Kuromoji/JapaneseTokenizer.cs
+++ b/src/Lucene.Net.Analysis.Kuromoji/JapaneseTokenizer.cs
@@ -10,7 +10,6 @@ using System.Collections.Generic;
 using System.Diagnostics;
 using System.Globalization;
 using System.IO;
-using System.Linq;
 using System.Threading;
 using Console = Lucene.Net.Util.SystemConsole;
 
@@ -379,7 +378,7 @@ namespace Lucene.Net.Analysis.Ja
                 Parse();
             }
 
-            Token token = pending.LastOrDefault();
+            Token token = pending[pending.Count - 1]; // LUCENENET: The above loop ensures we don't get here unless we have at least 1 item
             if (token != null)
             {
                 pending.Remove(token);
diff --git a/src/Lucene.Net.Analysis.Phonetic/Language/Bm/PhoneticEngine.cs b/src/Lucene.Net.Analysis.Phonetic/Language/Bm/PhoneticEngine.cs
index daae63b..2845a36 100644
--- a/src/Lucene.Net.Analysis.Phonetic/Language/Bm/PhoneticEngine.cs
+++ b/src/Lucene.Net.Analysis.Phonetic/Language/Bm/PhoneticEngine.cs
@@ -5,12 +5,10 @@ using Lucene.Net.Support;
 using Lucene.Net.Util;
 using System;
 using System.Collections.Generic;
-using System.Linq;
 using System.Text;
 using System.Text.RegularExpressions;
 using JCG = J2N.Collections.Generic;
 
-
 namespace Lucene.Net.Analysis.Phonetic.Language.Bm
 {
     /*
@@ -483,7 +481,7 @@ namespace Lucene.Net.Analysis.Phonetic.Language.Bm
             {
                 // not a multi-word name
                 //input = words.iterator().next();
-                input = words.FirstOrDefault();
+                input = words[0];
             }
             else
             {
diff --git a/src/Lucene.Net.Benchmark/Quality/Utils/DocNameExtractor.cs b/src/Lucene.Net.Benchmark/Quality/Utils/DocNameExtractor.cs
index a4aba7d..ee9bdec 100644
--- a/src/Lucene.Net.Benchmark/Quality/Utils/DocNameExtractor.cs
+++ b/src/Lucene.Net.Benchmark/Quality/Utils/DocNameExtractor.cs
@@ -3,7 +3,6 @@ using Lucene.Net.Search;
 using System;
 using System.Collections.Generic;
 using System.IO;
-using System.Linq;
 
 namespace Lucene.Net.Benchmarks.Quality.Utils
 {
@@ -52,7 +51,7 @@ namespace Lucene.Net.Benchmarks.Quality.Utils
             IList<string> name = new List<string>();
             searcher.IndexReader.Document(docid, new StoredFieldVisitorAnonymousHelper(this, name));
 
-            return name.FirstOrDefault();
+            return name.Count > 0 ? name[0] : null;
         }
 
         private class StoredFieldVisitorAnonymousHelper : StoredFieldVisitor
diff --git a/src/Lucene.Net.Grouping/SearchGroup.cs b/src/Lucene.Net.Grouping/SearchGroup.cs
index 3e5c293..2f3a8aa 100644
--- a/src/Lucene.Net.Grouping/SearchGroup.cs
+++ b/src/Lucene.Net.Grouping/SearchGroup.cs
@@ -4,7 +4,6 @@ using System.Collections.Generic;
 using System.Diagnostics;
 using System.Diagnostics.CodeAnalysis;
 using System.Linq;
-using System.Reflection;
 using JCG = J2N.Collections.Generic;
 
 namespace Lucene.Net.Search.Grouping
@@ -390,7 +389,7 @@ namespace Lucene.Net.Search.Grouping
                 // Prune un-competitive groups:
                 while (queue.Count > topN)
                 {
-                    MergedGroup<T> group = queue.Last();
+                    MergedGroup<T> group = queue.Max;
                     queue.Remove(group);
                     //System.out.println("PRUNE: " + group);
                     group.IsInQueue = false;
@@ -421,7 +420,7 @@ namespace Lucene.Net.Search.Grouping
 
                 while (queue.Count != 0)
                 {
-                    MergedGroup<T> group = queue.First();
+                    MergedGroup<T> group = queue.Min;
                     queue.Remove(group);
                     group.IsProcessed = true;
                     //System.out.println("  pop: shards=" + group.shards + " group=" + (group.groupValue == null ? "null" : (((BytesRef) group.groupValue).utf8ToString())) + " sortValues=" + Arrays.toString(group.topValues));
diff --git a/src/Lucene.Net.QueryParser/Surround/Query/NotQuery.cs b/src/Lucene.Net.QueryParser/Surround/Query/NotQuery.cs
index 64a0633..13a8ba9 100644
--- a/src/Lucene.Net.QueryParser/Surround/Query/NotQuery.cs
+++ b/src/Lucene.Net.QueryParser/Surround/Query/NotQuery.cs
@@ -1,6 +1,5 @@
 using Lucene.Net.Search;
 using System.Collections.Generic;
-using System.Linq;
 
 namespace Lucene.Net.QueryParsers.Surround.Query
 {
@@ -34,12 +33,19 @@ namespace Lucene.Net.QueryParsers.Surround.Query
         public override Search.Query MakeLuceneQueryFieldNoBoost(string fieldName, BasicQueryFactory qf)
         {
             var luceneSubQueries = MakeLuceneSubQueriesField(fieldName, qf);
-            BooleanQuery bq = new BooleanQuery();
-            bq.Add(luceneSubQueries.FirstOrDefault(), Occur.MUST);
+            BooleanQuery bq = new BooleanQuery
+            {
+                { luceneSubQueries.Count > 0 ? luceneSubQueries[0] : null, Occur.MUST }
+            };
+
+            // LUCENENET: SubList() is slow, so we do an array copy operation instead
+            var luceneSubQueriesArray = new Search.Query[luceneSubQueries.Count - 1];
+            for (int i = 1, j = 0; i < luceneSubQueries.Count; i++, j++)
+                luceneSubQueriesArray[j] = luceneSubQueries[i];
+
             SrndBooleanQuery.AddQueriesToBoolean(bq,
-                // FIXME: do not allow weights on prohibited subqueries.
-                    //luceneSubQueries.subList(1, luceneSubQueries.size()),
-                    luceneSubQueries.Skip(1).ToList(),
+                    // FIXME: do not allow weights on prohibited subqueries.
+                    luceneSubQueriesArray,
                 // later subqueries: not required, prohibited
                     Occur.MUST_NOT);
             return bq;
diff --git a/src/Lucene.Net/Store/LockStressTest.cs b/src/Lucene.Net/Store/LockStressTest.cs
index 3913d41..bcaf9d4 100644
--- a/src/Lucene.Net/Store/LockStressTest.cs
+++ b/src/Lucene.Net/Store/LockStressTest.cs
@@ -1,7 +1,6 @@
 using System;
 using System.Globalization;
 using System.IO;
-using System.Linq;
 using System.Net;
 using System.Net.Sockets;
 using System.Threading;
@@ -78,7 +77,7 @@ namespace Lucene.Net.Store
             int count = Convert.ToInt32(args[arg++], CultureInfo.InvariantCulture);
 
             IPAddress[] addresses = Dns.GetHostAddressesAsync(verifierHost).Result;
-            IPAddress addr = addresses.FirstOrDefault();
+            IPAddress addr = addresses.Length > 0 ? addresses[0] : null;
 
             Type c;
             try


[lucenenet] 11/14: Lucene.Net.QueryParser.Surround.Query.ComposedQuery::MakeLuceneSubQueriesField(): Added missing using block on enumerator

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit f49ad8143083055274b841e757174996c8b5a6e2
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Fri Jul 24 09:08:08 2020 +0700

    Lucene.Net.QueryParser.Surround.Query.ComposedQuery::MakeLuceneSubQueriesField(): Added missing using block on enumerator
---
 src/Lucene.Net.QueryParser/Surround/Query/ComposedQuery.cs | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/Lucene.Net.QueryParser/Surround/Query/ComposedQuery.cs b/src/Lucene.Net.QueryParser/Surround/Query/ComposedQuery.cs
index 1bc9a9c..92c8ccd 100644
--- a/src/Lucene.Net.QueryParser/Surround/Query/ComposedQuery.cs
+++ b/src/Lucene.Net.QueryParser/Surround/Query/ComposedQuery.cs
@@ -53,16 +53,18 @@ namespace Lucene.Net.QueryParsers.Surround.Query
 
         public virtual SrndQuery GetSubQuery(int qn) { return m_queries[qn]; }
 
-        private bool operatorInfix;
+        private readonly bool operatorInfix;
         public virtual bool IsOperatorInfix => operatorInfix; /* else prefix operator */
 
         public virtual IList<Search.Query> MakeLuceneSubQueriesField(string fn, BasicQueryFactory qf)
         {
             List<Search.Query> luceneSubQueries = new List<Search.Query>();
-            IEnumerator<SrndQuery> sqi = GetSubQueriesEnumerator();
-            while (sqi.MoveNext())
+            using (IEnumerator<SrndQuery> sqi = GetSubQueriesEnumerator())
             {
-                luceneSubQueries.Add((sqi.Current).MakeLuceneQueryField(fn, qf));
+                while (sqi.MoveNext())
+                {
+                    luceneSubQueries.Add((sqi.Current).MakeLuceneQueryField(fn, qf));
+                }
             }
             return luceneSubQueries;
         }


[lucenenet] 12/14: Lucene.Net.Support.ListExtensions: Factored out BinarySearch in favor of implementation from J2N

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit 4302e0f6aae946a3f0fb4e867927e2598a0b1e7f
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Sun Jul 26 08:05:18 2020 +0700

    Lucene.Net.Support.ListExtensions: Factored out BinarySearch in favor of implementation from J2N
---
 src/Lucene.Net.TestFramework/Util/Fst/FSTTester.cs |   6 +-
 src/Lucene.Net.Tests/Support/TestListExtensions.cs | 169 ---------------------
 src/Lucene.Net/Support/ListExtensions.cs           |  72 ---------
 3 files changed, 3 insertions(+), 244 deletions(-)

diff --git a/src/Lucene.Net.TestFramework/Util/Fst/FSTTester.cs b/src/Lucene.Net.TestFramework/Util/Fst/FSTTester.cs
index 69c9f7a..8465d97 100644
--- a/src/Lucene.Net.TestFramework/Util/Fst/FSTTester.cs
+++ b/src/Lucene.Net.TestFramework/Util/Fst/FSTTester.cs
@@ -1,7 +1,7 @@
 using J2N;
 using J2N.Collections;
+using J2N.Collections.Generic.Extensions;
 using Lucene.Net.Store;
-using Lucene.Net.Support;
 using Lucene.Net.Util.Packed;
 using System;
 using System.Collections;
@@ -9,11 +9,11 @@ using System.Collections.Concurrent;
 using System.Collections.Generic;
 using System.IO;
 using System.Text;
-using JCG = J2N.Collections.Generic;
+using Assert = Lucene.Net.TestFramework.Assert;
 using Console = Lucene.Net.Util.SystemConsole;
 using Debug = Lucene.Net.Diagnostics.Debug; // LUCENENET NOTE: We cannot use System.Diagnostics.Debug because those calls will be optimized out of the release!
-using Assert = Lucene.Net.TestFramework.Assert;
 using Directory = Lucene.Net.Store.Directory;
+using JCG = J2N.Collections.Generic;
 
 namespace Lucene.Net.Util.Fst
 {
diff --git a/src/Lucene.Net.Tests/Support/TestListExtensions.cs b/src/Lucene.Net.Tests/Support/TestListExtensions.cs
deleted file mode 100644
index 91e3e5f..0000000
--- a/src/Lucene.Net.Tests/Support/TestListExtensions.cs
+++ /dev/null
@@ -1,169 +0,0 @@
-using Lucene.Net.Support;
-using Lucene.Net.Util;
-using NUnit.Framework;
-using System;
-using System.Collections;
-using System.Collections.Generic;
-
-namespace Lucene.Net.Support
-{
-    /*
-     * Licensed to the Apache Software Foundation (ASF) under one or more
-     * contributor license agreements.  See the NOTICE file distributed with
-     * this work for additional information regarding copyright ownership.
-     * The ASF licenses this file to You under the Apache License, Version 2.0
-     * (the "License"); you may not use this file except in compliance with
-     * the License.  You may obtain a copy of the License at
-     *
-     *     http://www.apache.org/licenses/LICENSE-2.0
-     *
-     * Unless required by applicable law or agreed to in writing, software
-     * distributed under the License is distributed on an "AS IS" BASIS,
-     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     * See the License for the specific language governing permissions and
-     * limitations under the License.
-     */
-
-    public class TestListExtensions : LuceneTestCase
-    {
-        IList<int> ll;
-
-        IList<IComparable<object>> myReversedLinkedList;
-
-        static int[] objArray = LoadObjArray();
-        static IComparable<object>[] myobjArray = LoadMyObjArray();
-
-        private static int[] LoadObjArray()
-        {
-            var objArray = new int[1000];
-            for (int i = 0; i < objArray.Length; i++)
-            {
-                objArray[i] = i;
-            }
-            return objArray;
-        }
-
-        private static IComparable<object>[] LoadMyObjArray()
-        {
-            var myobjArray = new IComparable<object>[1000];
-            for (int i = 0; i < objArray.Length; i++)
-            {
-                myobjArray[i] = new MyInt(i);
-            }
-            return myobjArray;
-        }
-
-        public override void SetUp()
-        {
-            base.SetUp();
-            ll = new List<int>();
-            myReversedLinkedList = new List<IComparable<object>>(); // to be sorted in reverse
-
-            for (int i = 0; i < objArray.Length; i++)
-            {
-                ll.Add(objArray[i]);
-                //myll.add(myobjArray[i]);
-                //s.add(objArray[i]);
-                //mys.add(myobjArray[i]);
-                //reversedLinkedList.add(objArray[objArray.length - i - 1]);
-                myReversedLinkedList.Add(myobjArray[myobjArray.Length - i - 1]);
-                //hm.put(objArray[i].toString(), objArray[i]);
-            }
-        }
-
-        public class ReversedMyIntComparator : IComparer, IComparer<object>
-        {
-
-            public int Compare(Object o1, Object o2)
-            {
-                return -((MyInt)o1).CompareTo((MyInt)o2);
-            }
-
-            new public static int Equals(Object o1, Object o2)
-            {
-                return ((MyInt)o1).CompareTo((MyInt)o2);
-            }
-        }
-
-        internal class MyInt : IComparable<object>
-        {
-            internal int data;
-
-            public MyInt(int value)
-            {
-                data = value;
-            }
-
-            public int CompareTo(object obj)
-            {
-                return data > ((MyInt)obj).data ? 1 : (data < ((MyInt)obj).data ? -1 : 0);
-            }
-        }
-
-        /**
-         * @tests java.util.Collections#binarySearch(java.util.List,
-         *        java.lang.Object)
-         */
-        [Test]
-        public void Test_binarySearchLjava_util_ListLjava_lang_Object()
-        {
-            // Test for method int
-            // java.util.Collections.binarySearch(java.util.List, java.lang.Object)
-            // assumes ll is sorted and has no duplicate keys
-            int llSize = ll.size();
-            // Ensure a NPE is thrown if the list is NULL
-            IList<IComparable<object>> list = null;
-            try
-            {
-                list.BinarySearch(new MyInt(3));
-                fail("Expected NullPointerException for null list parameter");
-            }
-#pragma warning disable 168
-            catch (ArgumentNullException e)
-#pragma warning restore 168
-            {
-                //Expected
-            }
-            for (int counter = 0; counter < llSize; counter++)
-            {
-                assertEquals("Returned incorrect binary search item position", ll[counter], ll[ll.BinarySearch(ll[counter])]);
-            }
-        }
-
-        /**
-         * @tests java.util.Collections#binarySearch(java.util.List,
-         *        java.lang.Object, java.util.Comparator)
-         */
-        [Test]
-        public void Test_binarySearchLSystem_Collections_Generic_IListLSystem_ObjectLSystem_Collections_Generic_IComparer()
-        {
-            // Test for method int
-            // java.util.Collections.binarySearch(java.util.List, java.lang.Object,
-            // java.util.Comparator)
-            // assumes reversedLinkedList is sorted in reversed order and has no
-            // duplicate keys
-            int rSize = myReversedLinkedList.size();
-            ReversedMyIntComparator comp = new ReversedMyIntComparator();
-            // Ensure a NPE is thrown if the list is NULL
-            IList<IComparable<object>> list = null;
-            try
-            {
-                //Collections.binarySearch(null, new Object(), comp);
-                list.BinarySearch(new MyInt(3), comp);
-                fail("Expected NullPointerException for null list parameter");
-            }
-#pragma warning disable 168
-            catch (ArgumentNullException e)
-#pragma warning restore 168
-            {
-                //Expected
-            }
-            for (int counter = 0; counter < rSize; counter++)
-            {
-                assertEquals(
-                        "Returned incorrect binary search item position using custom comparator",
-                        myReversedLinkedList[counter], myReversedLinkedList[myReversedLinkedList.BinarySearch(myReversedLinkedList[counter], comp)]);
-            }
-        }
-    }
-}
diff --git a/src/Lucene.Net/Support/ListExtensions.cs b/src/Lucene.Net/Support/ListExtensions.cs
index b83febb..fb9ece0 100644
--- a/src/Lucene.Net/Support/ListExtensions.cs
+++ b/src/Lucene.Net/Support/ListExtensions.cs
@@ -22,78 +22,6 @@ namespace Lucene.Net.Support
 
     internal static class ListExtensions
     {
-        /// <summary>
-        /// Performs a binary search for the specified element in the specified
-        /// sorted list. The list needs to be already sorted in natural sorting
-        /// order. Searching in an unsorted array has an undefined result. It's also
-        /// undefined which element is found if there are multiple occurrences of the
-        /// same element.
-        /// </summary>
-        /// <typeparam name="T">The element type. Must implement <see cref="IComparable{T}"/>"/>.</typeparam>
-        /// <param name="list">The sorted list to search.</param>
-        /// <param name="item">The element to find.</param>
-        /// <returns>The non-negative index of the element, or a negative index which
-        /// is the <c>-index - 1</c> where the element would be inserted.</returns>
-        /// <exception cref="ArgumentNullException"><paramref name="list"/> is <c>null</c>.</exception>
-        public static int BinarySearch<T>(this IList<T> list, T item) where T : IComparable<T>
-        {
-            if (list == null)
-                throw new ArgumentNullException(nameof(list));
-
-            if (list.Count == 0)
-                return -1;
-
-            int low = 0, mid = list.Count, high = mid - 1, result = -1;
-            while (low <= high)
-            {
-                mid = (low + high) >> 1;
-                if ((result = -list[mid].CompareTo(item)) > 0)
-                    low = mid + 1;
-                else if (result == 0)
-                    return mid;
-                else
-                    high = mid - 1;
-            }
-            return -mid - (result < 0 ? 1 : 2);
-        }
-
-        /// <summary>
-        /// Performs a binary search for the specified element in the specified
-        /// sorted list using the specified comparator. The list needs to be already
-        /// sorted according to the <paramref name="comparer"/> passed. Searching in an unsorted array
-        /// has an undefined result. It's also undefined which element is found if
-        /// there are multiple occurrences of the same element.
-        /// </summary>
-        /// <typeparam name="T">The element type. Must implement <see cref="IComparable{T}"/>"/>.</typeparam>
-        /// <param name="list">The sorted <see cref="IList{T}"/> to search.</param>
-        /// <param name="item">The element to find.</param>
-        /// <param name="comparer">The comparer. If the comparer is <c>null</c> then the
-        /// search uses the objects' natural ordering.</param>
-        /// <returns>the non-negative index of the element, or a negative index which
-        /// is the <c>-index - 1</c> where the element would be inserted.</returns>
-        /// <exception cref="ArgumentNullException"><paramref name="list"/> is <c>null</c>.</exception>
-        public static int BinarySearch<T>(this IList<T> list, T item, IComparer<T> comparer) where T : IComparable<T>
-        {
-            if (list == null)
-                throw new ArgumentNullException(nameof(list));
-
-            if (comparer == null)
-                return BinarySearch(list, item);
-
-            int low = 0, mid = list.Count, high = mid - 1, result = -1;
-            while (low <= high)
-            {
-                mid = (low + high) >> 1;
-                if ((result = -comparer.Compare(list[mid], item)) > 0)
-                    low = mid + 1;
-                else if (result == 0)
-                    return mid;
-                else
-                    high = mid - 1;
-            }
-            return -mid - (result < 0 ? 1 : 2);
-        }
-
         public static IList<T> SubList<T>(this IList<T> list, int fromIndex, int toIndex)
         {
             // .NET Port: This is to mimic Java's List.subList method, which has a different usage


[lucenenet] 02/14: PERFORMANCE: Lucene.Net.Facet.Taxonomy.WriterCache.NameInt32CacheLRU: Changed from Dictionary to ConcurrentDictionary so we can delete items from the cache while forward iterating through it. (see #261)

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit 4bdb4e3f733901cfa6bc84fe13565f18b4e999a4
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Thu Jul 23 10:31:44 2020 +0700

    PERFORMANCE: Lucene.Net.Facet.Taxonomy.WriterCache.NameInt32CacheLRU: Changed from Dictionary to ConcurrentDictionary so we can delete items from the cache while forward iterating through it. (see #261)
---
 .../Taxonomy/WriterCache/NameIntCacheLRU.cs        | 24 +++++++++++++---------
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/src/Lucene.Net.Facet/Taxonomy/WriterCache/NameIntCacheLRU.cs b/src/Lucene.Net.Facet/Taxonomy/WriterCache/NameIntCacheLRU.cs
index c089885..22baa62 100644
--- a/src/Lucene.Net.Facet/Taxonomy/WriterCache/NameIntCacheLRU.cs
+++ b/src/Lucene.Net.Facet/Taxonomy/WriterCache/NameIntCacheLRU.cs
@@ -1,6 +1,6 @@
 using J2N.Collections.Concurrent;
+using System.Collections.Concurrent;
 using System.Collections.Generic;
-using System.Linq;
 
 namespace Lucene.Net.Facet.Taxonomy.WriterCache
 {
@@ -39,6 +39,7 @@ namespace Lucene.Net.Facet.Taxonomy.WriterCache
         internal long nMisses = 0; // for debug
         internal long nHits = 0; // for debug
         private readonly int maxCacheSize;
+        private readonly object syncLock = new object(); // LUCENENET specific so we don't lock this
 
         internal NameInt32CacheLRU(int limit)
         {
@@ -60,11 +61,13 @@ namespace Lucene.Net.Facet.Taxonomy.WriterCache
         {
             if (maxSize < int.MaxValue)
             {
-                cache = new LurchTable<object, int>(1000, LurchTableOrder.Access); //for LRU
+                cache = new LurchTable<object, int>(capacity: 1000, ordering: LurchTableOrder.Access); //for LRU
             }
             else
             {
-                cache = new Dictionary<object, int>(1000); //no need for LRU
+                // LUCENENET specific - we use ConcurrentDictionary here because it supports deleting while
+                // iterating through the collection, but Dictionary does not.
+                cache = new ConcurrentDictionary<object, int>(concurrencyLevel: 3, capacity: 1000); //no need for LRU
             }
         }
 
@@ -149,7 +152,7 @@ namespace Lucene.Net.Facet.Taxonomy.WriterCache
                 return false;
             }
 
-            lock (this)
+            lock (syncLock)
             {
                 // Double-check that another thread didn't beat us to the operation
                 n = cache.Count - (2 * maxCacheSize) / 3;
@@ -159,13 +162,14 @@ namespace Lucene.Net.Facet.Taxonomy.WriterCache
                 }
 
                 //System.Diagnostics.Debug.WriteLine("Removing cache entries in MakeRoomLRU");
-
-                // LUCENENET: Loop in reverse so we can safely delete
-                // a range of items (0 - n) without a 
-                // "Collection was modified" conflict
-                for (int i = n - 1; i >= 0; i--)
+                using (var it = cache.GetEnumerator())
                 {
-                    cache.Remove(cache.Keys.ElementAt(i));
+                    int i = 0;
+                    while (i < n && it.MoveNext())
+                    {
+                        cache.Remove(it.Current.Key);
+                        i++;
+                    }
                 }
             }
             return true;


[lucenenet] 13/14: Lucene.Net.Suggest.FreeTextSuggester: Converted from SubList().Clear() to RemoveRange()

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit 4266e1766212d7f858944a4b9c69e26df67cf33d
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Sun Jul 26 08:33:17 2020 +0700

    Lucene.Net.Suggest.FreeTextSuggester: Converted from SubList().Clear() to RemoveRange()
---
 src/Lucene.Net.Suggest/Suggest/Analyzing/FreeTextSuggester.cs | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/Lucene.Net.Suggest/Suggest/Analyzing/FreeTextSuggester.cs b/src/Lucene.Net.Suggest/Suggest/Analyzing/FreeTextSuggester.cs
index b6ce34b..2d058f3 100644
--- a/src/Lucene.Net.Suggest/Suggest/Analyzing/FreeTextSuggester.cs
+++ b/src/Lucene.Net.Suggest/Suggest/Analyzing/FreeTextSuggester.cs
@@ -7,15 +7,14 @@ using Lucene.Net.Documents;
 using Lucene.Net.Index;
 using Lucene.Net.Index.Extensions;
 using Lucene.Net.Store;
-using Lucene.Net.Support;
 using Lucene.Net.Util;
 using Lucene.Net.Util.Fst;
 using System;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.IO;
-using JCG = J2N.Collections.Generic;
 using Directory = Lucene.Net.Store.Directory;
+using JCG = J2N.Collections.Generic;
 
 namespace Lucene.Net.Search.Suggest.Analyzing
 {
@@ -798,7 +797,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
 
                 if (results.Count > num)
                 {
-                    results.SubList(num, results.Count).Clear();
+                    results.RemoveRange(num, results.Count - num); //results.SubList(num, results.Count).Clear();
                 }
 
                 return results;


[lucenenet] 09/14: Directory.Build.props: Disabled warnings for features that require .NET Standard 2.1

Posted by ni...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit 17c12bef618a11ce974ccc369df7309dd0c8c642
Author: Shad Storhaug <sh...@shadstorhaug.com>
AuthorDate: Fri Jul 24 08:54:40 2020 +0700

    Directory.Build.props: Disabled warnings for features that require .NET Standard 2.1
---
 Directory.Build.props | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Directory.Build.props b/Directory.Build.props
index 20c96ce..4804162 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -23,6 +23,9 @@
 
   <PropertyGroup>
     <LangVersion>8.0</LangVersion>
+    <!-- Disabling warnings that require .NET Standard 2.1 -->
+    <NoWarn>$(NoWarn);IDE0056</NoWarn>
+    <NoWarn>$(NoWarn);IDE0057</NoWarn>
   </PropertyGroup>
   
   <!-- IMPORTANT: When these values are changed, the CI counter number should also be reset. -->