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 76004096b6eea10aae290e78fc2fbc33e3f7f233
Author: Shad Storhaug <[email protected]>
AuthorDate: Wed Nov 9 21:13:49 2022 +0700

    BUG: Changed TokenAttribute usage from concrete implementation type to 
interface type to align with Lucene 4.8.0. We were using the concrete type in 
several places where it shouldn't have been.
---
 .../Analysis/Ar/ArabicStemFilter.cs                    |  4 ++--
 .../Analysis/Bg/BulgarianStemFilter.cs                 |  4 ++--
 .../Analysis/Br/BrazilianStemFilter.cs                 |  4 ++--
 .../Analysis/Ckb/SoraniStemFilter.cs                   |  4 ++--
 .../Analysis/CommonGrams/CommonGramsFilter.cs          |  4 ++--
 .../Analysis/Cz/CzechStemFilter.cs                     |  4 ++--
 .../Analysis/De/GermanLightStemFilter.cs               |  4 ++--
 .../Analysis/De/GermanMinimalStemFilter.cs             |  4 ++--
 .../Analysis/De/GermanStemFilter.cs                    |  4 ++--
 .../Analysis/El/GreekStemFilter.cs                     |  4 ++--
 .../Analysis/En/EnglishMinimalStemFilter.cs            |  4 ++--
 .../Analysis/En/KStemFilter.cs                         |  6 +++---
 .../Analysis/En/PorterStemFilter.cs                    |  6 +++---
 .../Analysis/Es/SpanishLightStemFilter.cs              |  4 ++--
 .../Analysis/Fa/PersianStemFilter.cs                   |  2 +-
 .../Analysis/Fi/FinnishLightStemFilter.cs              |  4 ++--
 .../Analysis/Fr/FrenchLightStemFilter.cs               |  4 ++--
 .../Analysis/Fr/FrenchMinimalStemFilter.cs             |  4 ++--
 .../Analysis/Fr/FrenchStemFilter.cs                    |  4 ++--
 .../Analysis/Gl/GalicianMinimalStemFilter.cs           |  4 ++--
 .../Analysis/Gl/GalicianStemFilter.cs                  |  4 ++--
 .../Analysis/Hi/HindiNormalizationFilter.cs            |  4 ++--
 .../Analysis/Hu/HungarianLightStemFilter.cs            |  4 ++--
 .../Analysis/Hunspell/HunspellStemFilter.cs            |  4 ++--
 .../Analysis/It/ItalianLightStemFilter.cs              |  4 ++--
 .../Analysis/Lv/LatvianStemFilter.cs                   |  4 ++--
 .../Analysis/Miscellaneous/CodepointCountFilter.cs     |  2 +-
 .../Analysis/Miscellaneous/KeywordMarkerFilter.cs      |  6 +++---
 .../Analysis/Miscellaneous/KeywordRepeatFilter.cs      |  6 +++---
 .../Analysis/Miscellaneous/LengthFilter.cs             |  2 +-
 .../Miscellaneous/PatternKeywordMarkerFilter.cs        |  8 ++++----
 .../Analysis/Miscellaneous/SetKeywordMarkerFilter.cs   |  8 ++++----
 .../Analysis/Miscellaneous/StemmerOverrideFilter.cs    |  4 ++--
 .../Analysis/NGram/NGramTokenFilter.cs                 | 18 ++++++++++++------
 .../Analysis/Nl/DutchStemFilter.cs                     |  4 ++--
 .../Analysis/No/NorwegianLightStemFilter.cs            |  4 ++--
 .../Analysis/No/NorwegianMinimalStemFilter.cs          |  4 ++--
 .../Analysis/Payloads/TokenOffsetPayloadTokenFilter.cs |  6 +++---
 .../Analysis/Pt/PortugueseLightStemFilter.cs           |  4 ++--
 .../Analysis/Pt/PortugueseMinimalStemFilter.cs         |  4 ++--
 .../Analysis/Pt/PortugueseStemFilter.cs                |  4 ++--
 .../Analysis/Ru/RussianLightStemFilter.cs              |  4 ++--
 .../Analysis/Snowball/SnowballFilter.cs                |  4 ++--
 .../Analysis/Standard/StandardTokenizerImpl.cs         |  4 ++--
 .../Standard/Std31/UAX29URLEmailTokenizerImpl31.cs     |  4 ++--
 .../Analysis/Sv/SwedishLightStemFilter.cs              |  4 ++--
 .../Analysis/Util/ElisionFilter.cs                     |  4 ++--
 .../Icu/TokenAttributes/ScriptAttributeImpl.cs         |  4 ++--
 .../TokenAttributes/BaseFormAttributeImpl.cs           |  4 ++--
 .../TokenAttributes/InflectionAttributeImpl.cs         |  4 ++--
 .../TokenAttributes/PartOfSpeechAttributeImpl.cs       |  4 ++--
 .../TokenAttributes/ReadingAttributeImpl.cs            |  4 ++--
 .../TokenAttributes/MorphosyntacticTagsAttribute.cs    |  4 ++--
 .../OpenNLPChunkerFilter.cs                            |  2 +-
 src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs |  2 +-
 .../Analysis/BaseTokenStreamTestCase.cs                | 16 ++++++++--------
 .../Analysis/CannedBinaryTokenStream.cs                |  8 ++++----
 .../Analysis/ValidatingTokenFilter.cs                  | 18 +++++++++---------
 .../Index/BaseTermVectorsFormatTestCase.cs             |  4 ++--
 .../Analysis/Synonym/TestSynonymMapFilter.cs           |  2 +-
 src/Lucene.Net.Tests/Index/Test2BPostingsBytes.cs      |  2 +-
 src/Lucene.Net.Tests/Index/Test2BTerms.cs              |  2 +-
 src/Lucene.Net.Tests/Index/TestPayloads.cs             | 10 +++++-----
 src/Lucene.Net/Analysis/NumericTokenStream.cs          |  6 +++---
 src/Lucene.Net/Analysis/Token.cs                       |  2 +-
 .../Analysis/TokenAttributes/CharTermAttribute.cs      |  4 ++--
 .../Analysis/TokenAttributes/FlagsAttribute.cs         |  9 +++------
 .../Analysis/TokenAttributes/IFlagsAttribute.cs        |  8 +++-----
 .../TokenAttributes/ITermToBytesRefAttribute.cs        |  4 ++--
 .../Analysis/TokenAttributes/KeywordAttribute.cs       |  9 ++++-----
 .../Analysis/TokenAttributes/OffsetAttribute.cs        |  4 ++--
 .../Analysis/TokenAttributes/PayloadAttribute.cs       | 12 +++++-------
 .../TokenAttributes/PositionIncrementAttribute.cs      |  4 ++--
 .../TokenAttributes/PositionLengthAttribute.cs         |  4 ++--
 .../Analysis/TokenAttributes/TypeAttribute.cs          | 13 ++++++-------
 src/Lucene.Net/Codecs/TermVectorsReader.cs             |  4 ++--
 src/Lucene.Net/Search/BoostAttributeImpl.cs            |  9 ++++-----
 src/Lucene.Net/Search/FuzzyTermsEnum.cs                |  4 ++--
 .../Search/MaxNonCompetitiveBoostAttributeImpl.cs      |  4 ++--
 src/Lucene.Net/Util/Attribute.cs                       |  4 ++--
 src/Lucene.Net/Util/AttributeImpl.cs                   |  2 +-
 src/Lucene.Net/Util/AttributeReflector.cs              |  7 ++++---
 82 files changed, 207 insertions(+), 210 deletions(-)

diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Ar/ArabicStemFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/Ar/ArabicStemFilter.cs
index 1684f8f0a..84b65b1b0 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Ar/ArabicStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Ar/ArabicStemFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 
 namespace Lucene.Net.Analysis.Ar
@@ -25,7 +25,7 @@ namespace Lucene.Net.Analysis.Ar
     /// <para/>
     /// To prevent terms from being stemmed use an instance of
     /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see 
cref="TokenFilter"/> that sets
-    /// the <see cref="KeywordAttribute"/> before this <seealso 
cref="TokenStream"/>.
+    /// the <see cref="IKeywordAttribute"/> before this <seealso 
cref="TokenStream"/>.
     /// </summary>
     /// <seealso cref="Miscellaneous.SetKeywordMarkerFilter"/>
     public sealed class ArabicStemFilter : TokenFilter
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Bg/BulgarianStemFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/Bg/BulgarianStemFilter.cs
index 4bc27031f..b488cab91 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Bg/BulgarianStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Bg/BulgarianStemFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 
 namespace Lucene.Net.Analysis.Bg
@@ -26,7 +26,7 @@ namespace Lucene.Net.Analysis.Bg
     /// <para>
     /// To prevent terms from being stemmed use an instance of
     /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see 
cref="TokenFilter"/> that sets
-    /// the <see cref="KeywordAttribute"/> before this <see 
cref="TokenStream"/>.
+    /// the <see cref="IKeywordAttribute"/> before this <see 
cref="TokenStream"/>.
     /// </para>
     /// </summary>
     public sealed class BulgarianStemFilter : TokenFilter
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Br/BrazilianStemFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/Br/BrazilianStemFilter.cs
index 76f4b4d57..30e8e39b9 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Br/BrazilianStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Br/BrazilianStemFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 using System;
 
@@ -26,7 +26,7 @@ namespace Lucene.Net.Analysis.Br
     /// <para>
     /// To prevent terms from being stemmed use an instance of
     /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see 
cref="TokenFilter"/> that sets
-    /// the <see cref="KeywordAttribute"/> before this <see 
cref="TokenStream"/>.
+    /// the <see cref="IKeywordAttribute"/> before this <see 
cref="TokenStream"/>.
     /// </para>
     /// </summary>
     /// <seealso cref="Miscellaneous.SetKeywordMarkerFilter"/>
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniStemFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniStemFilter.cs
index 19c36f797..b353fc5a4 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniStemFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 
 namespace Lucene.Net.Analysis.Ckb
@@ -25,7 +25,7 @@ namespace Lucene.Net.Analysis.Ckb
     /// <para>
     /// To prevent terms from being stemmed use an instance of
     /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see 
cref="TokenFilter"/> that sets
-    /// the <see cref="KeywordAttribute"/> before this <see 
cref="TokenStream"/>.
+    /// the <see cref="IKeywordAttribute"/> before this <see 
cref="TokenStream"/>.
     /// </para> 
     /// </summary>
     /// <seealso cref="Miscellaneous.SetKeywordMarkerFilter"/>
diff --git 
a/src/Lucene.Net.Analysis.Common/Analysis/CommonGrams/CommonGramsFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/CommonGrams/CommonGramsFilter.cs
index ca7b3b18a..80811c3bf 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/CommonGrams/CommonGramsFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/CommonGrams/CommonGramsFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 using Lucene.Net.Analysis.Util;
 using Lucene.Net.Util;
@@ -31,7 +31,7 @@ namespace Lucene.Net.Analysis.CommonGrams
     /// <summary>
     /// Construct bigrams for frequently occurring terms while indexing. 
Single terms
     /// are still indexed too, with bigrams overlaid. This is achieved through 
the
-    /// use of <see cref="PositionIncrementAttribute.PositionIncrement"/>. 
Bigrams have a type
+    /// use of <see cref="IPositionIncrementAttribute.PositionIncrement"/>. 
Bigrams have a type
     /// of <see cref="GRAM_TYPE"/> Example:
     /// <list type="bullet">
     ///     <item><description>input:"the quick brown fox"</description></item>
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Cz/CzechStemFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/Cz/CzechStemFilter.cs
index 055c83469..e6d070702 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Cz/CzechStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Cz/CzechStemFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 
 namespace Lucene.Net.Analysis.Cz
@@ -25,7 +25,7 @@ namespace Lucene.Net.Analysis.Cz
     /// <para>
     /// To prevent terms from being stemmed use an instance of
     /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see 
cref="TokenFilter"/> that sets
-    /// the <see cref="KeywordAttribute"/> before this <see 
cref="TokenStream"/>.
+    /// the <see cref="IKeywordAttribute"/> before this <see 
cref="TokenStream"/>.
     /// </para>
     /// <para><b>NOTE</b>: Input is expected to be in lowercase, 
     /// but with diacritical marks</para> </summary>
diff --git 
a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanLightStemFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanLightStemFilter.cs
index 39324e3b8..23d032a50 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanLightStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanLightStemFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 
 namespace Lucene.Net.Analysis.De
@@ -26,7 +26,7 @@ namespace Lucene.Net.Analysis.De
     /// <para>
     /// To prevent terms from being stemmed use an instance of
     /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see 
cref="TokenFilter"/> that sets
-    /// the <see cref="KeywordAttribute"/> before this <see 
cref="TokenStream"/>.
+    /// the <see cref="IKeywordAttribute"/> before this <see 
cref="TokenStream"/>.
     /// </para>
     /// </summary>
     public sealed class GermanLightStemFilter : TokenFilter
diff --git 
a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanMinimalStemFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanMinimalStemFilter.cs
index 084a5271d..9b334d7d7 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanMinimalStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanMinimalStemFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 
 namespace Lucene.Net.Analysis.De
@@ -26,7 +26,7 @@ namespace Lucene.Net.Analysis.De
     /// <para>
     /// To prevent terms from being stemmed use an instance of
     /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see 
cref="TokenFilter"/> that sets
-    /// the <see cref="KeywordAttribute"/> before this <see 
cref="TokenStream"/>.
+    /// the <see cref="IKeywordAttribute"/> before this <see 
cref="TokenStream"/>.
     /// </para>
     /// </summary>
     public sealed class GermanMinimalStemFilter : TokenFilter
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanStemFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanStemFilter.cs
index ad96338fe..8223f9c51 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanStemFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 using System;
 
@@ -31,7 +31,7 @@ namespace Lucene.Net.Analysis.De
     /// <para>
     /// To prevent terms from being stemmed use an instance of
     /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see 
cref="TokenFilter"/> that sets
-    /// the <see cref="KeywordAttribute"/> before this <see 
cref="TokenStream"/>.
+    /// the <see cref="IKeywordAttribute"/> before this <see 
cref="TokenStream"/>.
     /// </para> </summary>
     /// <seealso cref="Miscellaneous.SetKeywordMarkerFilter"/>
     public sealed class GermanStemFilter : TokenFilter
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/El/GreekStemFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/El/GreekStemFilter.cs
index fbc11556d..70240cc54 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/El/GreekStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/El/GreekStemFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 
 namespace Lucene.Net.Analysis.El
@@ -26,7 +26,7 @@ namespace Lucene.Net.Analysis.El
     /// <para>
     /// To prevent terms from being stemmed use an instance of
     /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see 
cref="TokenFilter"/> that sets
-    /// the <see cref="KeywordAttribute"/> before this <see 
cref="TokenStream"/>.
+    /// the <see cref="IKeywordAttribute"/> before this <see 
cref="TokenStream"/>.
     /// </para>
     /// <para>
     /// NOTE: Input is expected to be casefolded for Greek (including folding 
of final
diff --git 
a/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishMinimalStemFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishMinimalStemFilter.cs
index 40b006783..bb977ae4e 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishMinimalStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishMinimalStemFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 
 namespace Lucene.Net.Analysis.En
@@ -26,7 +26,7 @@ namespace Lucene.Net.Analysis.En
     /// <para>
     /// To prevent terms from being stemmed use an instance of
     /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see 
cref="TokenFilter"/> that sets
-    /// the <see cref="KeywordAttribute"/> before this <see 
cref="TokenStream"/>.
+    /// the <see cref="IKeywordAttribute"/> before this <see 
cref="TokenStream"/>.
     /// </para>
     /// </summary>
     public sealed class EnglishMinimalStemFilter : TokenFilter
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/En/KStemFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/En/KStemFilter.cs
index 1c74ed3fa..64cb187ac 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/En/KStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/En/KStemFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 using System.IO;
 
@@ -32,9 +32,9 @@ namespace Lucene.Net.Analysis.En
     /// All terms must already be lowercased for this filter to work correctly.
     /// 
     /// <para>
-    /// Note: This filter is aware of the <see cref="KeywordAttribute"/>. To 
prevent
+    /// Note: This filter is aware of the <see cref="IKeywordAttribute"/>. To 
prevent
     /// certain terms from being passed to the stemmer
-    /// <see cref="KeywordAttribute.IsKeyword"/> should be set to 
<code>true</code>
+    /// <see cref="IKeywordAttribute.IsKeyword"/> should be set to 
<code>true</code>
     /// in a previous <see cref="TokenStream"/>.
     /// 
     /// Note: For including the original term as well as the stemmed version, 
see
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/En/PorterStemFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/En/PorterStemFilter.cs
index c962bc4a6..808329ac4 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/En/PorterStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/En/PorterStemFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 
 namespace Lucene.Net.Analysis.En
@@ -41,9 +41,9 @@ namespace Lucene.Net.Analysis.En
     ///    }
     ///    </code>
     ///    <para>
-    ///    Note: This filter is aware of the <see cref="KeywordAttribute"/>. 
To prevent
+    ///    Note: This filter is aware of the <see cref="IKeywordAttribute"/>. 
To prevent
     ///    certain terms from being passed to the stemmer
-    ///    <see cref="KeywordAttribute.IsKeyword"/> should be set to 
<code>true</code>
+    ///    <see cref="IKeywordAttribute.IsKeyword"/> should be set to 
<code>true</code>
     ///    in a previous <see cref="TokenStream"/>.
     /// 
     ///    Note: For including the original term as well as the stemmed 
version, see
diff --git 
a/src/Lucene.Net.Analysis.Common/Analysis/Es/SpanishLightStemFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/Es/SpanishLightStemFilter.cs
index 43e3700d0..9e948308c 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Es/SpanishLightStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Es/SpanishLightStemFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 
 namespace Lucene.Net.Analysis.Es
@@ -26,7 +26,7 @@ namespace Lucene.Net.Analysis.Es
     /// <para>
     /// To prevent terms from being stemmed use an instance of
     /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see 
cref="TokenFilter"/> that sets
-    /// the <see cref="KeywordAttribute"/> before this <see 
cref="TokenStream"/>.
+    /// the <see cref="IKeywordAttribute"/> before this <see 
cref="TokenStream"/>.
     /// </para>
     /// </summary>
     public sealed class SpanishLightStemFilter : TokenFilter
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Fa/PersianStemFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/Fa/PersianStemFilter.cs
index 1a2dc6d1c..67f773cf5 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Fa/PersianStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Fa/PersianStemFilter.cs
@@ -25,7 +25,7 @@ namespace Lucene.Net.Analysis.Fa
     /// <para/>
     /// To prevent terms from being stemmed use an instance of
     /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see 
cref="TokenFilter"/> that sets
-    /// the <see cref="KeywordAttribute"/> before this <seealso 
cref="TokenStream"/>.
+    /// the <see cref="IKeywordAttribute"/> before this <seealso 
cref="TokenStream"/>.
     /// </summary>
     /// <seealso cref="Miscellaneous.SetKeywordMarkerFilter"/>
     public sealed class PersianStemFilter : TokenFilter
diff --git 
a/src/Lucene.Net.Analysis.Common/Analysis/Fi/FinnishLightStemFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/Fi/FinnishLightStemFilter.cs
index f5924e97f..f7b11f2db 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Fi/FinnishLightStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Fi/FinnishLightStemFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 
 namespace Lucene.Net.Analysis.Fi
@@ -26,7 +26,7 @@ namespace Lucene.Net.Analysis.Fi
     /// <para>
     /// To prevent terms from being stemmed use an instance of
     /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see 
cref="TokenFilter"/> that sets
-    /// the <see cref="KeywordAttribute"/> before this <see 
cref="TokenStream"/>.
+    /// the <see cref="IKeywordAttribute"/> before this <see 
cref="TokenStream"/>.
     /// </para>
     /// </summary>
     public sealed class FinnishLightStemFilter : TokenFilter
diff --git 
a/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchLightStemFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchLightStemFilter.cs
index de1b36838..3447d13b9 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchLightStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchLightStemFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 
 namespace Lucene.Net.Analysis.Fr
@@ -26,7 +26,7 @@ namespace Lucene.Net.Analysis.Fr
     /// <para>
     /// To prevent terms from being stemmed use an instance of
     /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see 
cref="TokenFilter"/> that sets
-    /// the <see cref="KeywordAttribute"/> before this <see 
cref="TokenStream"/>.
+    /// the <see cref="IKeywordAttribute"/> before this <see 
cref="TokenStream"/>.
     /// </para>
     /// </summary>
     public sealed class FrenchLightStemFilter : TokenFilter
diff --git 
a/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchMinimalStemFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchMinimalStemFilter.cs
index c5e0bc4a2..4f9df9c57 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchMinimalStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchMinimalStemFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 
 namespace Lucene.Net.Analysis.Fr
@@ -26,7 +26,7 @@ namespace Lucene.Net.Analysis.Fr
     /// <para>
     /// To prevent terms from being stemmed use an instance of
     /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see 
cref="TokenFilter"/> that sets
-    /// the <see cref="KeywordAttribute"/> before this <see 
cref="TokenStream"/>.
+    /// the <see cref="IKeywordAttribute"/> before this <see 
cref="TokenStream"/>.
     /// </para>
     /// </summary>
     public sealed class FrenchMinimalStemFilter : TokenFilter
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchStemFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchStemFilter.cs
index 57c571f5c..55ae3f46b 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchStemFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 using System;
 
@@ -30,7 +30,7 @@ namespace Lucene.Net.Analysis.Fr
     /// <para>
     /// To prevent terms from being stemmed use an instance of
     /// <see cref="Miscellaneous.KeywordMarkerFilter"/> or a custom <see 
cref="TokenFilter"/> that sets
-    /// the <see cref="KeywordAttribute"/> before this <see 
cref="TokenStream"/>.
+    /// the <see cref="IKeywordAttribute"/> before this <see 
cref="TokenStream"/>.
     /// </para> </summary>
     /// <seealso cref="Miscellaneous.KeywordMarkerFilter"/>
     /// @deprecated (3.1) Use <see cref="Snowball.SnowballFilter"/> with 
diff --git 
a/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianMinimalStemFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianMinimalStemFilter.cs
index 9a609332a..55cbf2b34 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianMinimalStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianMinimalStemFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 
 namespace Lucene.Net.Analysis.Gl
@@ -26,7 +26,7 @@ namespace Lucene.Net.Analysis.Gl
     /// <para>
     /// To prevent terms from being stemmed use an instance of
     /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see 
cref="TokenFilter"/> that sets
-    /// the <see cref="KeywordAttribute"/> before this <see 
cref="TokenStream"/>.
+    /// the <see cref="IKeywordAttribute"/> before this <see 
cref="TokenStream"/>.
     /// </para>
     /// </summary>
     public sealed class GalicianMinimalStemFilter : TokenFilter
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianStemFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianStemFilter.cs
index 0e546d281..f5e7e213a 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianStemFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 
 namespace Lucene.Net.Analysis.Gl
@@ -26,7 +26,7 @@ namespace Lucene.Net.Analysis.Gl
     /// <para>
     /// To prevent terms from being stemmed use an instance of
     /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see 
cref="TokenFilter"/> that sets
-    /// the <see cref="KeywordAttribute"/> before this <see 
cref="TokenStream"/>.
+    /// the <see cref="IKeywordAttribute"/> before this <see 
cref="TokenStream"/>.
     /// </para>
     /// </summary>
     public sealed class GalicianStemFilter : TokenFilter
diff --git 
a/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiNormalizationFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiNormalizationFilter.cs
index 579abd758..db7ec2b82 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiNormalizationFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiNormalizationFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 
 namespace Lucene.Net.Analysis.Hi
@@ -27,7 +27,7 @@ namespace Lucene.Net.Analysis.Hi
     /// In some cases the normalization may cause unrelated terms to conflate, 
so
     /// to prevent terms from being normalized use an instance of
     /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see 
cref="TokenFilter"/> that sets
-    /// the <see cref="KeywordAttribute"/> before this <see 
cref="TokenStream"/>.
+    /// the <see cref="IKeywordAttribute"/> before this <see 
cref="TokenStream"/>.
     /// </para> 
     /// </summary>
     /// <seealso cref="HindiNormalizer"/>
diff --git 
a/src/Lucene.Net.Analysis.Common/Analysis/Hu/HungarianLightStemFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/Hu/HungarianLightStemFilter.cs
index 44f4763b0..a84d37a34 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Hu/HungarianLightStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Hu/HungarianLightStemFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 
 namespace Lucene.Net.Analysis.Hu
@@ -26,7 +26,7 @@ namespace Lucene.Net.Analysis.Hu
     /// <para>
     /// To prevent terms from being stemmed use an instance of
     /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see 
cref="TokenFilter"/> that sets
-    /// the <see cref="KeywordAttribute"/> before this <see 
cref="TokenStream"/>.
+    /// the <see cref="IKeywordAttribute"/> before this <see 
cref="TokenStream"/>.
     /// </para>
     /// </summary>
     public sealed class HungarianLightStemFilter : TokenFilter
diff --git 
a/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/HunspellStemFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/HunspellStemFilter.cs
index 318edabc5..23cba0117 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/HunspellStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/HunspellStemFilter.cs
@@ -29,9 +29,9 @@ namespace Lucene.Net.Analysis.Hunspell
     /// multiple tokens for each consumed token
     /// 
     /// <para>
-    /// Note: This filter is aware of the <see cref="KeywordAttribute"/>. To 
prevent
+    /// Note: This filter is aware of the <see cref="IKeywordAttribute"/>. To 
prevent
     /// certain terms from being passed to the stemmer
-    /// <see cref="KeywordAttribute.IsKeyword"/> should be set to <c>true</c>
+    /// <see cref="IKeywordAttribute.IsKeyword"/> should be set to <c>true</c>
     /// in a previous <see cref="TokenStream"/>.
     /// 
     /// Note: For including the original term as well as the stemmed version, 
see
diff --git 
a/src/Lucene.Net.Analysis.Common/Analysis/It/ItalianLightStemFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/It/ItalianLightStemFilter.cs
index 4e1b24279..733b5f3dd 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/It/ItalianLightStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/It/ItalianLightStemFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 
 namespace Lucene.Net.Analysis.It
@@ -26,7 +26,7 @@ namespace Lucene.Net.Analysis.It
     /// <para>
     /// To prevent terms from being stemmed use an instance of
     /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see 
cref="TokenFilter"/> that sets
-    /// the <see cref="KeywordAttribute"/> before this <see 
cref="TokenStream"/>.
+    /// the <see cref="IKeywordAttribute"/> before this <see 
cref="TokenStream"/>.
     /// </para>
     /// </summary>
     public sealed class ItalianLightStemFilter : TokenFilter
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Lv/LatvianStemFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/Lv/LatvianStemFilter.cs
index a771e51ff..becb32b8b 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Lv/LatvianStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Lv/LatvianStemFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 
 namespace Lucene.Net.Analysis.Lv
@@ -26,7 +26,7 @@ namespace Lucene.Net.Analysis.Lv
     /// <para>
     /// To prevent terms from being stemmed use an instance of
     /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see 
cref="TokenFilter"/> that sets
-    /// the <see cref="KeywordAttribute"/> before this <see 
cref="TokenStream"/>.
+    /// the <see cref="IKeywordAttribute"/> before this <see 
cref="TokenStream"/>.
     /// </para>
     /// </summary>
     public sealed class LatvianStemFilter : TokenFilter
diff --git 
a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/CodepointCountFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/CodepointCountFilter.cs
index 3ebeb76bf..04b476d1a 100644
--- 
a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/CodepointCountFilter.cs
+++ 
b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/CodepointCountFilter.cs
@@ -39,7 +39,7 @@ namespace Lucene.Net.Analysis.Miscellaneous
 
         /// <summary>
         /// Create a new <see cref="CodepointCountFilter"/>. This will filter 
out tokens whose
-        /// <see cref="CharTermAttribute"/> is either too short (<see 
cref="Character.CodePointCount(char[], int, int)"/>
+        /// <see cref="ICharTermAttribute"/> is either too short (<see 
cref="Character.CodePointCount(char[], int, int)"/>
         /// &lt; min) or too long (<see cref="Character.CodePointCount(char[], 
int, int)"/> &gt; max). </summary>
         /// <param name="version"> the Lucene match version </param>
         /// <param name="in">      the <see cref="TokenStream"/> to consume 
</param>
diff --git 
a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/KeywordMarkerFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/KeywordMarkerFilter.cs
index ccf761b03..e5fd06fb1 100644
--- 
a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/KeywordMarkerFilter.cs
+++ 
b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/KeywordMarkerFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 
 namespace Lucene.Net.Analysis.Miscellaneous
@@ -21,9 +21,9 @@ namespace Lucene.Net.Analysis.Miscellaneous
      */
 
     /// <summary>
-    /// Marks terms as keywords via the <see cref="KeywordAttribute"/>.
+    /// Marks terms as keywords via the <see cref="IKeywordAttribute"/>.
     /// </summary>
-    /// <seealso cref="KeywordAttribute"/>
+    /// <seealso cref="IKeywordAttribute"/>
     public abstract class KeywordMarkerFilter : TokenFilter
     {
         private readonly IKeywordAttribute keywordAttr;
diff --git 
a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/KeywordRepeatFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/KeywordRepeatFilter.cs
index f0271145c..770aa74a6 100644
--- 
a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/KeywordRepeatFilter.cs
+++ 
b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/KeywordRepeatFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 
 namespace Lucene.Net.Analysis.Miscellaneous
@@ -22,8 +22,8 @@ namespace Lucene.Net.Analysis.Miscellaneous
 
     /// <summary>
     /// This TokenFilter emits each incoming token twice once as keyword and 
once non-keyword, in other words once with
-    /// <see cref="KeywordAttribute.IsKeyword"/> set to <c>true</c> and once 
set to <c>false</c>.
-    /// This is useful if used with a stem filter that respects the <see 
cref="KeywordAttribute"/> to index the stemmed and the
+    /// <see cref="IKeywordAttribute.IsKeyword"/> set to <c>true</c> and once 
set to <c>false</c>.
+    /// This is useful if used with a stem filter that respects the <see 
cref="IKeywordAttribute"/> to index the stemmed and the
     /// un-stemmed version of a term into the same field.
     /// </summary>
     public sealed class KeywordRepeatFilter : TokenFilter
diff --git 
a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/LengthFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/LengthFilter.cs
index 490c8a4b6..723b5cefe 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/LengthFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/LengthFilter.cs
@@ -55,7 +55,7 @@ namespace Lucene.Net.Analysis.Miscellaneous
 
         /// <summary>
         /// Create a new <see cref="LengthFilter"/>. This will filter out 
tokens whose
-        /// <see cref="CharTermAttribute"/> is either too short (<see 
cref="ICharTermAttribute.Length"/>
+        /// <see cref="ICharTermAttribute"/> is either too short (<see 
cref="ICharTermAttribute.Length"/>
         /// &lt; min) or too long (<see cref="ICharTermAttribute.Length"/> 
&gt; max). </summary>
         /// <param name="version"> the Lucene match version </param>
         /// <param name="in">      the <see cref="TokenStream"/> to consume 
</param>
diff --git 
a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/PatternKeywordMarkerFilter.cs
 
b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/PatternKeywordMarkerFilter.cs
index 4d74f9022..130d841a9 100644
--- 
a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/PatternKeywordMarkerFilter.cs
+++ 
b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/PatternKeywordMarkerFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 using System.Text.RegularExpressions;
 
@@ -22,9 +22,9 @@ namespace Lucene.Net.Analysis.Miscellaneous
      */
 
     /// <summary>
-    /// Marks terms as keywords via the <see cref="KeywordAttribute"/>. Each 
token
+    /// Marks terms as keywords via the <see cref="IKeywordAttribute"/>. Each 
token
     /// that matches the provided pattern is marked as a keyword by setting
-    /// <see cref="KeywordAttribute.IsKeyword"/> to <c>true</c>.
+    /// <see cref="IKeywordAttribute.IsKeyword"/> to <c>true</c>.
     /// </summary>
     public sealed class PatternKeywordMarkerFilter : KeywordMarkerFilter
     {
@@ -35,7 +35,7 @@ namespace Lucene.Net.Analysis.Miscellaneous
         /// <summary>
         /// Create a new <see cref="PatternKeywordMarkerFilter"/>, that marks 
the current
         /// token as a keyword if the tokens term buffer matches the provided
-        /// <see cref="Regex"/> via the <see cref="KeywordAttribute"/>.
+        /// <see cref="Regex"/> via the <see cref="IKeywordAttribute"/>.
         /// </summary>
         /// <param name="in">
         ///          <see cref="TokenStream"/> to filter </param>
diff --git 
a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/SetKeywordMarkerFilter.cs
 
b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/SetKeywordMarkerFilter.cs
index b30fa481c..bdafc7875 100644
--- 
a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/SetKeywordMarkerFilter.cs
+++ 
b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/SetKeywordMarkerFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 using Lucene.Net.Analysis.Util;
 
@@ -22,9 +22,9 @@ namespace Lucene.Net.Analysis.Miscellaneous
      */
 
     /// <summary>
-    /// Marks terms as keywords via the <see cref="KeywordAttribute"/>. Each 
token
+    /// Marks terms as keywords via the <see cref="IKeywordAttribute"/>. Each 
token
     /// contained in the provided set is marked as a keyword by setting
-    /// <see cref="KeywordAttribute.IsKeyword"/> to <c>true</c>.
+    /// <see cref="IKeywordAttribute.IsKeyword"/> to <c>true</c>.
     /// </summary>
     public sealed class SetKeywordMarkerFilter : KeywordMarkerFilter
     {
@@ -34,7 +34,7 @@ namespace Lucene.Net.Analysis.Miscellaneous
         /// <summary>
         /// Create a new <see cref="SetKeywordMarkerFilter"/>, that marks the 
current token as a
         /// keyword if the tokens term buffer is contained in the given set 
via the
-        /// <see cref="KeywordAttribute"/>.
+        /// <see cref="IKeywordAttribute"/>.
         /// </summary>
         /// <param name="in">
         ///          <see cref="TokenStream"/> to filter </param>
diff --git 
a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/StemmerOverrideFilter.cs
 
b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/StemmerOverrideFilter.cs
index eb8772c48..3f21ca5a0 100644
--- 
a/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/StemmerOverrideFilter.cs
+++ 
b/src/Lucene.Net.Analysis.Common/Analysis/Miscellaneous/StemmerOverrideFilter.cs
@@ -30,7 +30,7 @@ namespace Lucene.Net.Analysis.Miscellaneous
      */
 
     /// <summary>
-    /// Provides the ability to override any <see cref="KeywordAttribute"/> 
aware stemmer
+    /// Provides the ability to override any <see cref="IKeywordAttribute"/> 
aware stemmer
     /// with custom dictionary-based stemming.
     /// </summary>
     public sealed class StemmerOverrideFilter : TokenFilter
@@ -47,7 +47,7 @@ namespace Lucene.Net.Analysis.Miscellaneous
         /// Create a new <see cref="StemmerOverrideFilter"/>, performing 
dictionary-based stemming
         /// with the provided dictionary (<paramref 
name="stemmerOverrideMap"/>).
         /// <para>
-        /// Any dictionary-stemmed terms will be marked with <see 
cref="KeywordAttribute"/>
+        /// Any dictionary-stemmed terms will be marked with <see 
cref="IKeywordAttribute"/>
         /// so that they will not be stemmed with stemmers down the chain.
         /// </para>
         /// </summary>
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/NGram/NGramTokenFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/NGram/NGramTokenFilter.cs
index eca3daddf..e4749a489 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/NGram/NGramTokenFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/NGram/NGramTokenFilter.cs
@@ -114,22 +114,28 @@ namespace Lucene.Net.Analysis.NGram
             offsetAtt = AddAttribute<IOffsetAttribute>();
         }
 
-        private sealed class PositionIncrementAttributeAnonymousClass : 
PositionIncrementAttribute
+        private sealed class PositionIncrementAttributeAnonymousClass : 
IPositionIncrementAttribute
         {
-            public override int PositionIncrement
+            public int PositionIncrement
             {
                 get => 0;
-                set { }
+                set => _ = value;
             }
+
+            // LUCENENET specific - The interface requires this to be 
implemented, since we added it to avoid casts.
+            public void CopyTo(IAttribute target) => _ = target;
         }
 
-        private sealed class PositionLengthAttributeAnonymousClass : 
PositionLengthAttribute
+        private sealed class PositionLengthAttributeAnonymousClass : 
IPositionLengthAttribute
         {
-            public override int PositionLength
+            public int PositionLength
             {
                 get => 0;
-                set { }
+                set => _ = value;
             }
+
+            // LUCENENET specific - The interface requires this to be 
implemented, since we added it to avoid casts.
+            public void CopyTo(IAttribute target) => _ = target;
         }
 
         /// <summary>
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Nl/DutchStemFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/Nl/DutchStemFilter.cs
index 3b567a7dd..500e64003 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Nl/DutchStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Nl/DutchStemFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 using Lucene.Net.Analysis.Util;
 using System;
@@ -33,7 +33,7 @@ namespace Lucene.Net.Analysis.Nl
     /// <para>
     /// To prevent terms from being stemmed use an instance of
     /// <see cref="Miscellaneous.KeywordMarkerFilter"/> or a custom <see 
cref="TokenFilter"/> that sets
-    /// the <see cref="KeywordAttribute"/> before this <see 
cref="TokenStream"/>.
+    /// the <see cref="IKeywordAttribute"/> before this <see 
cref="TokenStream"/>.
     /// </para> 
     /// </summary>
     /// <seealso cref="Miscellaneous.KeywordMarkerFilter"/>
diff --git 
a/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianLightStemFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianLightStemFilter.cs
index 8595fc341..0ccb36220 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianLightStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianLightStemFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 
 namespace Lucene.Net.Analysis.No
@@ -26,7 +26,7 @@ namespace Lucene.Net.Analysis.No
     /// <para>
     /// To prevent terms from being stemmed use an instance of
     /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see 
cref="TokenFilter"/> that sets
-    /// the <see cref="KeywordAttribute"/> before this <see 
cref="TokenStream"/>.
+    /// the <see cref="IKeywordAttribute"/> before this <see 
cref="TokenStream"/>.
     /// </para>
     /// </summary>
     public sealed class NorwegianLightStemFilter : TokenFilter
diff --git 
a/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianMinimalStemFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianMinimalStemFilter.cs
index a85f8eb03..0b347efeb 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianMinimalStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/No/NorwegianMinimalStemFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 
 namespace Lucene.Net.Analysis.No
@@ -26,7 +26,7 @@ namespace Lucene.Net.Analysis.No
     /// <para>
     /// To prevent terms from being stemmed use an instance of
     /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see 
cref="TokenFilter"/> that sets
-    /// the <see cref="KeywordAttribute"/> before this <see 
cref="TokenStream"/>.
+    /// the <see cref="IKeywordAttribute"/> before this <see 
cref="TokenStream"/>.
     /// </para>
     /// </summary>
     public sealed class NorwegianMinimalStemFilter : TokenFilter
diff --git 
a/src/Lucene.Net.Analysis.Common/Analysis/Payloads/TokenOffsetPayloadTokenFilter.cs
 
b/src/Lucene.Net.Analysis.Common/Analysis/Payloads/TokenOffsetPayloadTokenFilter.cs
index c0f8d2bc5..806a3144d 100644
--- 
a/src/Lucene.Net.Analysis.Common/Analysis/Payloads/TokenOffsetPayloadTokenFilter.cs
+++ 
b/src/Lucene.Net.Analysis.Common/Analysis/Payloads/TokenOffsetPayloadTokenFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 using Lucene.Net.Util;
 
@@ -22,8 +22,8 @@ namespace Lucene.Net.Analysis.Payloads
      */
 
     /// <summary>
-    /// Adds the <see cref="OffsetAttribute.StartOffset"/>
-    /// and <see cref="OffsetAttribute.EndOffset"/>
+    /// Adds the <see cref="IOffsetAttribute.StartOffset"/>
+    /// and <see cref="IOffsetAttribute.EndOffset"/>
     /// First 4 bytes are the start
     /// </summary>
     public class TokenOffsetPayloadTokenFilter : TokenFilter
diff --git 
a/src/Lucene.Net.Analysis.Common/Analysis/Pt/PortugueseLightStemFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/Pt/PortugueseLightStemFilter.cs
index 22fb18b88..6c8490042 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Pt/PortugueseLightStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Pt/PortugueseLightStemFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 
 namespace Lucene.Net.Analysis.Pt
@@ -26,7 +26,7 @@ namespace Lucene.Net.Analysis.Pt
     /// <para>
     /// To prevent terms from being stemmed use an instance of
     /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see 
cref="TokenFilter"/> that sets
-    /// the <see cref="KeywordAttribute"/> before this <see 
cref="TokenStream"/>.
+    /// the <see cref="IKeywordAttribute"/> before this <see 
cref="TokenStream"/>.
     /// </para>
     /// </summary>
     public sealed class PortugueseLightStemFilter : TokenFilter
diff --git 
a/src/Lucene.Net.Analysis.Common/Analysis/Pt/PortugueseMinimalStemFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/Pt/PortugueseMinimalStemFilter.cs
index f3fce7553..584e52595 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Pt/PortugueseMinimalStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Pt/PortugueseMinimalStemFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 
 namespace Lucene.Net.Analysis.Pt
@@ -26,7 +26,7 @@ namespace Lucene.Net.Analysis.Pt
     /// <para>
     /// To prevent terms from being stemmed use an instance of
     /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see 
cref="TokenFilter"/> that sets
-    /// the <see cref="KeywordAttribute"/> before this <see 
cref="TokenStream"/>.
+    /// the <see cref="IKeywordAttribute"/> before this <see 
cref="TokenStream"/>.
     /// </para>
     /// </summary>
     public sealed class PortugueseMinimalStemFilter : TokenFilter
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Pt/PortugueseStemFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/Pt/PortugueseStemFilter.cs
index 932f82c01..2c8360489 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Pt/PortugueseStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Pt/PortugueseStemFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 
 namespace Lucene.Net.Analysis.Pt
@@ -26,7 +26,7 @@ namespace Lucene.Net.Analysis.Pt
     /// <para>
     /// To prevent terms from being stemmed use an instance of
     /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see 
cref="TokenFilter"/> that sets
-    /// the <see cref="KeywordAttribute"/> before this <see 
cref="TokenStream"/>.
+    /// the <see cref="IKeywordAttribute"/> before this <see 
cref="TokenStream"/>.
     /// </para>
     /// </summary>
     public sealed class PortugueseStemFilter : TokenFilter
diff --git 
a/src/Lucene.Net.Analysis.Common/Analysis/Ru/RussianLightStemFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/Ru/RussianLightStemFilter.cs
index 6a14022b3..dd834662d 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Ru/RussianLightStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Ru/RussianLightStemFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 
 namespace Lucene.Net.Analysis.Ru
@@ -26,7 +26,7 @@ namespace Lucene.Net.Analysis.Ru
     /// <para>
     /// To prevent terms from being stemmed use an instance of
     /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see 
cref="TokenFilter"/> that sets
-    /// the <see cref="KeywordAttribute"/> before this <see 
cref="TokenStream"/>.
+    /// the <see cref="IKeywordAttribute"/> before this <see 
cref="TokenStream"/>.
     /// </para>
     /// </summary>
     public sealed class RussianLightStemFilter : TokenFilter
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Snowball/SnowballFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/Snowball/SnowballFilter.cs
index f0df84c79..5f88d8f7c 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Snowball/SnowballFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Snowball/SnowballFilter.cs
@@ -35,9 +35,9 @@ namespace Lucene.Net.Analysis.Snowball
     /// </para>
     /// 
     /// <para>
-    /// Note: This filter is aware of the <see cref="KeywordAttribute"/>. To 
prevent
+    /// Note: This filter is aware of the <see cref="IKeywordAttribute"/>. To 
prevent
     /// certain terms from being passed to the stemmer
-    /// <see cref="KeywordAttribute.IsKeyword"/> should be set to <c>true</c>
+    /// <see cref="IKeywordAttribute.IsKeyword"/> should be set to <c>true</c>
     /// in a previous <see cref="TokenStream"/>.
     /// 
     /// Note: For including the original term as well as the stemmed version, 
see
diff --git 
a/src/Lucene.Net.Analysis.Common/Analysis/Standard/StandardTokenizerImpl.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/Standard/StandardTokenizerImpl.cs
index 1cb3cc6e3..1e53c1da7 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Standard/StandardTokenizerImpl.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Standard/StandardTokenizerImpl.cs
@@ -998,7 +998,7 @@ namespace Lucene.Net.Analysis.Standard
         public int YyChar => yyChar;
 
         /// <summary>
-        /// Fills CharTermAttribute with the current token text.
+        /// Fills <see cref="ICharTermAttribute"/> with the current token text.
         /// </summary>
         public void GetText(ICharTermAttribute t)
         {
@@ -1009,7 +1009,7 @@ namespace Lucene.Net.Analysis.Standard
         /// <summary>
         /// Creates a new scanner
         /// </summary>
-        /// <param name="in">  the TextReader to read input from. </param>
+        /// <param name="in"> the <see cref="TextReader"/> to read input from. 
</param>
         public StandardTokenizerImpl(TextReader @in)
         {
             this.zzReader = @in;
diff --git 
a/src/Lucene.Net.Analysis.Common/Analysis/Standard/Std31/UAX29URLEmailTokenizerImpl31.cs
 
b/src/Lucene.Net.Analysis.Common/Analysis/Standard/Std31/UAX29URLEmailTokenizerImpl31.cs
index 6cbdc6d6d..8597bc30c 100644
--- 
a/src/Lucene.Net.Analysis.Common/Analysis/Standard/Std31/UAX29URLEmailTokenizerImpl31.cs
+++ 
b/src/Lucene.Net.Analysis.Common/Analysis/Standard/Std31/UAX29URLEmailTokenizerImpl31.cs
@@ -3285,7 +3285,7 @@ namespace Lucene.Net.Analysis.Standard.Std31
 
         public int YyChar => yychar;
 
-        /// <summary>Fills CharTermAttribute with the current token 
text.</summary>
+        /// <summary>Fills <see cref="ICharTermAttribute"/> with the current 
token text.</summary>
         public void GetText(ICharTermAttribute t)
         {
             t.CopyBuffer(zzBuffer, zzStartRead, zzMarkedPos - zzStartRead);
@@ -3294,7 +3294,7 @@ namespace Lucene.Net.Analysis.Standard.Std31
         /// <summary>
         /// Creates a new scanner
         /// </summary>
-        /// <param name="in">the TextReader to read input from.</param>
+        /// <param name="in">the <see cref="TextReader"/> to read input 
from.</param>
         public UAX29URLEmailTokenizerImpl31(TextReader @in)
         {
             this.zzReader = @in;
diff --git 
a/src/Lucene.Net.Analysis.Common/Analysis/Sv/SwedishLightStemFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/Sv/SwedishLightStemFilter.cs
index ddd745e0f..47f96245a 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Sv/SwedishLightStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Sv/SwedishLightStemFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 
 namespace Lucene.Net.Analysis.Sv
@@ -26,7 +26,7 @@ namespace Lucene.Net.Analysis.Sv
     /// <para>
     /// To prevent terms from being stemmed use an instance of
     /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see 
cref="TokenFilter"/> that sets
-    /// the <see cref="KeywordAttribute"/> before this <see 
cref="TokenStream"/>.
+    /// the <see cref="IKeywordAttribute"/> before this <see 
cref="TokenStream"/>.
     /// </para>
     /// </summary>
     public sealed class SwedishLightStemFilter : TokenFilter
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Util/ElisionFilter.cs 
b/src/Lucene.Net.Analysis.Common/Analysis/Util/ElisionFilter.cs
index 399a00549..d8d321e4b 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Util/ElisionFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Util/ElisionFilter.cs
@@ -1,4 +1,4 @@
-// Lucene version compatibility level 4.8.1
+// Lucene version compatibility level 4.8.1
 using Lucene.Net.Analysis.TokenAttributes;
 
 namespace Lucene.Net.Analysis.Util
@@ -43,7 +43,7 @@ namespace Lucene.Net.Analysis.Util
         }
 
         /// <summary>
-        /// Increments the <see cref="TokenStream"/> with a <see 
cref="CharTermAttribute"/> without elisioned start
+        /// Increments the <see cref="TokenStream"/> with a <see 
cref="ICharTermAttribute"/> without elisioned start
         /// </summary>
         public override sealed bool IncrementToken()
         {
diff --git 
a/src/Lucene.Net.Analysis.ICU/Analysis/Icu/TokenAttributes/ScriptAttributeImpl.cs
 
b/src/Lucene.Net.Analysis.ICU/Analysis/Icu/TokenAttributes/ScriptAttributeImpl.cs
index 493d97470..383ebe55d 100644
--- 
a/src/Lucene.Net.Analysis.ICU/Analysis/Icu/TokenAttributes/ScriptAttributeImpl.cs
+++ 
b/src/Lucene.Net.Analysis.ICU/Analysis/Icu/TokenAttributes/ScriptAttributeImpl.cs
@@ -56,9 +56,9 @@ namespace Lucene.Net.Analysis.Icu.TokenAttributes
             code = UScript.Common;
         }
 
-        public override void CopyTo(IAttribute target)
+        public override void CopyTo(IAttribute target) // LUCENENET specific - 
intentionally expanding target to use IAttribute rather than Attribute
         {
-            ScriptAttribute t = (ScriptAttribute)target;
+            IScriptAttribute t = (IScriptAttribute)target;
             t.Code = code;
         }
 
diff --git 
a/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/BaseFormAttributeImpl.cs 
b/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/BaseFormAttributeImpl.cs
index 4d27dc8a3..187896418 100644
--- a/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/BaseFormAttributeImpl.cs
+++ b/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/BaseFormAttributeImpl.cs
@@ -41,9 +41,9 @@ namespace Lucene.Net.Analysis.Ja.TokenAttributes
             token = null;
         }
 
-        public override void CopyTo(IAttribute target)
+        public override void CopyTo(IAttribute target) // LUCENENET specific - 
intentionally expanding target to use IAttribute rather than Attribute
         {
-            BaseFormAttribute t = (BaseFormAttribute)target;
+            IBaseFormAttribute t = (IBaseFormAttribute)target;
             t.SetToken(token);
         }
 
diff --git 
a/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/InflectionAttributeImpl.cs 
b/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/InflectionAttributeImpl.cs
index f3d22e6d3..a70e8923a 100644
--- 
a/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/InflectionAttributeImpl.cs
+++ 
b/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/InflectionAttributeImpl.cs
@@ -47,9 +47,9 @@ namespace Lucene.Net.Analysis.Ja.TokenAttributes
             token = null;
         }
 
-        public override void CopyTo(IAttribute target)
+        public override void CopyTo(IAttribute target) // LUCENENET specific - 
intentionally expanding target to use IAttribute rather than Attribute
         {
-            InflectionAttribute t = (InflectionAttribute)target;
+            IInflectionAttribute t = (IInflectionAttribute)target;
             t.SetToken(token);
         }
 
diff --git 
a/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/PartOfSpeechAttributeImpl.cs 
b/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/PartOfSpeechAttributeImpl.cs
index c6722ba3f..e5e866413 100644
--- 
a/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/PartOfSpeechAttributeImpl.cs
+++ 
b/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/PartOfSpeechAttributeImpl.cs
@@ -42,9 +42,9 @@ namespace Lucene.Net.Analysis.Ja.TokenAttributes
             token = null;
         }
 
-        public override void CopyTo(IAttribute target)
+        public override void CopyTo(IAttribute target) // LUCENENET specific - 
intentionally expanding target to use IAttribute rather than Attribute
         {
-            PartOfSpeechAttribute t = (PartOfSpeechAttribute)target;
+            IPartOfSpeechAttribute t = (IPartOfSpeechAttribute)target;
             t.SetToken(token);
         }
 
diff --git 
a/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/ReadingAttributeImpl.cs 
b/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/ReadingAttributeImpl.cs
index d659b5a7e..b0145efbd 100644
--- a/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/ReadingAttributeImpl.cs
+++ b/src/Lucene.Net.Analysis.Kuromoji/TokenAttributes/ReadingAttributeImpl.cs
@@ -47,9 +47,9 @@ namespace Lucene.Net.Analysis.Ja.TokenAttributes
             token = null;
         }
 
-        public override void CopyTo(IAttribute target)
+        public override void CopyTo(IAttribute target) // LUCENENET specific - 
intentionally expanding target to use IAttribute rather than Attribute
         {
-            ReadingAttribute t = (ReadingAttribute)target;
+            IReadingAttribute t = (IReadingAttribute)target;
             t.SetToken(token);
         }
 
diff --git 
a/src/Lucene.Net.Analysis.Morfologik/Morfologik/TokenAttributes/MorphosyntacticTagsAttribute.cs
 
b/src/Lucene.Net.Analysis.Morfologik/Morfologik/TokenAttributes/MorphosyntacticTagsAttribute.cs
index 6fd65c025..22841878f 100644
--- 
a/src/Lucene.Net.Analysis.Morfologik/Morfologik/TokenAttributes/MorphosyntacticTagsAttribute.cs
+++ 
b/src/Lucene.Net.Analysis.Morfologik/Morfologik/TokenAttributes/MorphosyntacticTagsAttribute.cs
@@ -75,7 +75,7 @@ namespace Lucene.Net.Analysis.Morfologik.TokenAttributes
             return this.tags is null ? 0 : tags.GetHashCode();
         }
 
-        public override void CopyTo(IAttribute target)
+        public override void CopyTo(IAttribute target) // LUCENENET specific - 
intentionally expanding target to use IAttribute rather than Attribute
         {
             IList<StringBuilder> cloned = null;
             if (tags != null)
@@ -98,7 +98,7 @@ namespace Lucene.Net.Analysis.Morfologik.TokenAttributes
 
         public override void ReflectWith(IAttributeReflector reflector)
         {
-            reflector.Reflect(typeof(MorphosyntacticTagsAttribute), "tags", 
tags);
+            reflector.Reflect(typeof(IMorphosyntacticTagsAttribute), "tags", 
tags);
         }
     }
 }
diff --git a/src/Lucene.Net.Analysis.OpenNLP/OpenNLPChunkerFilter.cs 
b/src/Lucene.Net.Analysis.OpenNLP/OpenNLPChunkerFilter.cs
index bbaa1bcae..431d1abd4 100644
--- a/src/Lucene.Net.Analysis.OpenNLP/OpenNLPChunkerFilter.cs
+++ b/src/Lucene.Net.Analysis.OpenNLP/OpenNLPChunkerFilter.cs
@@ -26,7 +26,7 @@ namespace Lucene.Net.Analysis.OpenNlp
 
     /// <summary>
     /// Run OpenNLP chunker. Prerequisite: the <see cref="OpenNLPTokenizer"/> 
and <see cref="OpenNLPPOSFilter"/> must precede this filter.
-    /// Tags terms in the TypeAttribute, replacing the POS tags previously put 
there by <see cref="OpenNLPPOSFilter"/>.
+    /// Tags terms in the <see cref="ITypeAttribute"/>, replacing the POS tags 
previously put there by <see cref="OpenNLPPOSFilter"/>.
     /// </summary>
     public sealed class OpenNLPChunkerFilter : TokenFilter
     {
diff --git a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs 
b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
index 75363e18e..5665ec6f3 100644
--- a/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
+++ b/src/Lucene.Net.Codecs/Pulsing/PulsingPostingsReader.cs
@@ -701,7 +701,7 @@ namespace Lucene.Net.Codecs.Pulsing
                 // and is calling clearAttributes(), so they don't nuke the 
reuse information!
             }
 
-            public override void CopyTo(Util.IAttribute target)
+            public override void CopyTo(IAttribute target) // LUCENENET 
specific - intentionally expanding target to use IAttribute rather than 
Attribute
             {
                 // this makes no sense for us, because our state is 
per-docsenum.
                 // we don't want to copy any stuff over to another docsenum 
ever!
diff --git a/src/Lucene.Net.TestFramework/Analysis/BaseTokenStreamTestCase.cs 
b/src/Lucene.Net.TestFramework/Analysis/BaseTokenStreamTestCase.cs
index dcd9ade2d..55ed2e47f 100644
--- a/src/Lucene.Net.TestFramework/Analysis/BaseTokenStreamTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Analysis/BaseTokenStreamTestCase.cs
@@ -79,7 +79,7 @@ namespace Lucene.Net.Analysis
             return 76137213 ^ clearCalled.GetHashCode();
         }
 
-        public override void CopyTo(IAttribute target)
+        public override void CopyTo(IAttribute target) // LUCENENET specific - 
intentionally expanding target to use IAttribute rather than Attribute
         {
             ((CheckClearAttributesAttribute)target).Clear();
         }
@@ -125,42 +125,42 @@ namespace Lucene.Net.Analysis
                 ICharTermAttribute termAtt = null;
                 if (output.Length > 0)
                 {
-                    Assert.IsTrue(ts.HasAttribute<ICharTermAttribute>(), "has 
no CharTermAttribute");
+                    Assert.IsTrue(ts.HasAttribute<ICharTermAttribute>(), "has 
no ICharTermAttribute");
                     termAtt = ts.GetAttribute<ICharTermAttribute>();
                 }
 
                 IOffsetAttribute offsetAtt = null;
                 if (startOffsets != null || endOffsets != null || finalOffset 
!= null)
                 {
-                    Assert.IsTrue(ts.HasAttribute<IOffsetAttribute>(), "has no 
OffsetAttribute");
+                    Assert.IsTrue(ts.HasAttribute<IOffsetAttribute>(), "has no 
IOffsetAttribute");
                     offsetAtt = ts.GetAttribute<IOffsetAttribute>();
                 }
 
                 ITypeAttribute typeAtt = null;
                 if (types != null)
                 {
-                    Assert.IsTrue(ts.HasAttribute<ITypeAttribute>(), "has no 
TypeAttribute");
+                    Assert.IsTrue(ts.HasAttribute<ITypeAttribute>(), "has no 
ITypeAttribute");
                     typeAtt = ts.GetAttribute<ITypeAttribute>();
                 }
 
                 IPositionIncrementAttribute posIncrAtt = null;
                 if (posIncrements != null || finalPosInc != null)
                 {
-                    
Assert.IsTrue(ts.HasAttribute<IPositionIncrementAttribute>(), "has no 
PositionIncrementAttribute");
+                    
Assert.IsTrue(ts.HasAttribute<IPositionIncrementAttribute>(), "has no 
IPositionIncrementAttribute");
                     posIncrAtt = 
ts.GetAttribute<IPositionIncrementAttribute>();
                 }
 
                 IPositionLengthAttribute posLengthAtt = null;
                 if (posLengths != null)
                 {
-                    Assert.IsTrue(ts.HasAttribute<IPositionLengthAttribute>(), 
"has no PositionLengthAttribute");
+                    Assert.IsTrue(ts.HasAttribute<IPositionLengthAttribute>(), 
"has no IPositionLengthAttribute");
                     posLengthAtt = ts.GetAttribute<IPositionLengthAttribute>();
                 }
 
                 IKeywordAttribute keywordAtt = null;
                 if (keywordAtts != null)
                 {
-                    Assert.IsTrue(ts.HasAttribute<IKeywordAttribute>(), "has 
no KeywordAttribute");
+                    Assert.IsTrue(ts.HasAttribute<IKeywordAttribute>(), "has 
no IKeywordAttribute");
                     keywordAtt = ts.GetAttribute<IKeywordAttribute>();
                 }
 
@@ -169,7 +169,7 @@ namespace Lucene.Net.Analysis
                 IPayloadAttribute payloadAtt = null;
                 if (payloads != null)
                 {
-                    Assert.IsTrue(ts.HasAttribute<IPayloadAttribute>(), "has 
no PayloadAttribute");
+                    Assert.IsTrue(ts.HasAttribute<IPayloadAttribute>(), "has 
no IPayloadAttribute");
                     payloadAtt = ts.GetAttribute<IPayloadAttribute>();
                 }
 
diff --git a/src/Lucene.Net.TestFramework/Analysis/CannedBinaryTokenStream.cs 
b/src/Lucene.Net.TestFramework/Analysis/CannedBinaryTokenStream.cs
index 430478b6b..55895d202 100644
--- a/src/Lucene.Net.TestFramework/Analysis/CannedBinaryTokenStream.cs
+++ b/src/Lucene.Net.TestFramework/Analysis/CannedBinaryTokenStream.cs
@@ -1,4 +1,4 @@
-using Lucene.Net.Analysis.TokenAttributes;
+using Lucene.Net.Analysis.TokenAttributes;
 using Lucene.Net.Util;
 using System;
 using System.Runtime.CompilerServices;
@@ -90,10 +90,10 @@ namespace Lucene.Net.Analysis
             return RuntimeHelpers.GetHashCode(this);
         }
 
-        public override void CopyTo(IAttribute target)
+        public override void CopyTo(IAttribute target) // LUCENENET specific - 
intentionally expanding target to use IAttribute rather than Attribute
         {
-            BinaryTermAttribute other = (BinaryTermAttribute)target;
-            other.bytes.CopyBytes(bytes);
+            IBinaryTermAttribute other = (IBinaryTermAttribute)target;
+            other.BytesRef.CopyBytes(bytes);
         }
 
         public override object Clone()
diff --git a/src/Lucene.Net.TestFramework/Analysis/ValidatingTokenFilter.cs 
b/src/Lucene.Net.TestFramework/Analysis/ValidatingTokenFilter.cs
index 34ddeddde..dac4541c5 100644
--- a/src/Lucene.Net.TestFramework/Analysis/ValidatingTokenFilter.cs
+++ b/src/Lucene.Net.TestFramework/Analysis/ValidatingTokenFilter.cs
@@ -44,16 +44,16 @@ namespace Lucene.Net.Analysis
 
         private readonly IDictionary<int, int> posToEndOffset = new 
Dictionary<int, int>();
 
-        private readonly PositionIncrementAttribute posIncAtt;
-        private readonly PositionLengthAttribute posLenAtt;
-        private readonly OffsetAttribute offsetAtt;
-        private readonly CharTermAttribute termAtt;
+        private readonly IPositionIncrementAttribute posIncAtt;
+        private readonly IPositionLengthAttribute posLenAtt;
+        private readonly IOffsetAttribute offsetAtt;
+        private readonly ICharTermAttribute termAtt;
         private readonly bool offsetsAreCorrect;
 
         private readonly string name;
 
         // Returns null if the attr wasn't already added
-        private A GetAttrIfExists<A>() where A : Lucene.Net.Util.Attribute
+        private A GetAttrIfExists<A>() where A : Lucene.Net.Util.IAttribute
         {
             if (HasAttribute<A>())
             {
@@ -73,10 +73,10 @@ namespace Lucene.Net.Analysis
         public ValidatingTokenFilter(TokenStream @in, string name, bool 
offsetsAreCorrect)
             : base(@in)
         {
-            posIncAtt = GetAttrIfExists<PositionIncrementAttribute>();
-            posLenAtt = GetAttrIfExists<PositionLengthAttribute>();
-            offsetAtt = GetAttrIfExists<OffsetAttribute>();
-            termAtt = GetAttrIfExists<CharTermAttribute>();
+            posIncAtt = GetAttrIfExists<IPositionIncrementAttribute>();
+            posLenAtt = GetAttrIfExists<IPositionLengthAttribute>();
+            offsetAtt = GetAttrIfExists<IOffsetAttribute>();
+            termAtt = GetAttrIfExists<ICharTermAttribute>();
             this.name = name;
             this.offsetsAreCorrect = offsetsAreCorrect;
         }
diff --git 
a/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs 
b/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs
index dbb54e28d..5d9a5f894 100644
--- a/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs
+++ b/src/Lucene.Net.TestFramework/Index/BaseTermVectorsFormatTestCase.cs
@@ -218,9 +218,9 @@ namespace Lucene.Net.Index
                 return start + 31 * end;
             }
 
-            public override void CopyTo(IAttribute target)
+            public override void CopyTo(IAttribute target) // LUCENENET 
specific - intentionally expanding target to use IAttribute rather than 
Attribute
             {
-                OffsetAttribute t = (OffsetAttribute)target;
+                IOffsetAttribute t = (IOffsetAttribute)target;
                 t.SetOffset(start, end);
             }
         }
diff --git 
a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Synonym/TestSynonymMapFilter.cs 
b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Synonym/TestSynonymMapFilter.cs
index 70da7374a..7164838b3 100644
--- 
a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Synonym/TestSynonymMapFilter.cs
+++ 
b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Synonym/TestSynonymMapFilter.cs
@@ -64,7 +64,7 @@ namespace Lucene.Net.Analysis.Synonym
             b.Add(inputCharsRef, outputCharsRef, keepOrig);
         }
 
-        private void AssertEquals(CharTermAttribute term, string expected)
+        private void AssertEquals(ICharTermAttribute term, string expected)
         {
             assertEquals(expected.Length, term.Length);
             char[] buffer = term.Buffer;
diff --git a/src/Lucene.Net.Tests/Index/Test2BPostingsBytes.cs 
b/src/Lucene.Net.Tests/Index/Test2BPostingsBytes.cs
index ee3cd39d4..b79695a28 100644
--- a/src/Lucene.Net.Tests/Index/Test2BPostingsBytes.cs
+++ b/src/Lucene.Net.Tests/Index/Test2BPostingsBytes.cs
@@ -26,7 +26,7 @@ namespace Lucene.Net.Index
      */
 
     using BaseDirectoryWrapper = Lucene.Net.Store.BaseDirectoryWrapper;
-    using CharTermAttribute = 
Lucene.Net.Analysis.TokenAttributes.CharTermAttribute;
+    using ICharTermAttribute = 
Lucene.Net.Analysis.TokenAttributes.ICharTermAttribute;
     using Document = Documents.Document;
     using Field = Field;
     using FieldType = FieldType;
diff --git a/src/Lucene.Net.Tests/Index/Test2BTerms.cs 
b/src/Lucene.Net.Tests/Index/Test2BTerms.cs
index 475db64b7..698ad79fe 100644
--- a/src/Lucene.Net.Tests/Index/Test2BTerms.cs
+++ b/src/Lucene.Net.Tests/Index/Test2BTerms.cs
@@ -154,7 +154,7 @@ namespace Lucene.Net.Index
                     {
                         return new MyTermAttributeImpl();
                     }
-                    if (attClass.IsSubclassOf(typeof(CharTermAttribute)))
+                    if (typeof(ICharTermAttribute).IsAssignableFrom(attClass))
                     {
                         throw new ArgumentException("no");
                     }
diff --git a/src/Lucene.Net.Tests/Index/TestPayloads.cs 
b/src/Lucene.Net.Tests/Index/TestPayloads.cs
index f1ca0adbe..c6a5c4e36 100644
--- a/src/Lucene.Net.Tests/Index/TestPayloads.cs
+++ b/src/Lucene.Net.Tests/Index/TestPayloads.cs
@@ -42,7 +42,7 @@ namespace Lucene.Net.Index
     using Field = Field;
     using IBits = Lucene.Net.Util.IBits;
     using LuceneTestCase = Lucene.Net.Util.LuceneTestCase;
-    using PayloadAttribute = 
Lucene.Net.Analysis.TokenAttributes.PayloadAttribute;
+    using IPayloadAttribute = 
Lucene.Net.Analysis.TokenAttributes.IPayloadAttribute;
     using TestUtil = Lucene.Net.Util.TestUtil;
     using TextField = TextField;
 
@@ -695,7 +695,7 @@ namespace Lucene.Net.Index
             Document doc = new Document();
             Field field = new TextField("field", "", Field.Store.NO);
             TokenStream ts = new MockTokenizer(new StringReader("here we go"), 
MockTokenizer.WHITESPACE, true);
-            Assert.IsFalse(ts.HasAttribute<PayloadAttribute>());
+            Assert.IsFalse(ts.HasAttribute<IPayloadAttribute>());
             field.SetTokenStream(ts);
             doc.Add(field);
             writer.AddDocument(doc);
@@ -706,7 +706,7 @@ namespace Lucene.Net.Index
             field.SetTokenStream(ts);
             writer.AddDocument(doc);
             ts = new MockTokenizer(new StringReader("another"), 
MockTokenizer.WHITESPACE, true);
-            Assert.IsFalse(ts.HasAttribute<PayloadAttribute>());
+            Assert.IsFalse(ts.HasAttribute<IPayloadAttribute>());
             field.SetTokenStream(ts);
             writer.AddDocument(doc);
             DirectoryReader reader = writer.GetReader();
@@ -730,7 +730,7 @@ namespace Lucene.Net.Index
             Document doc = new Document();
             Field field = new TextField("field", "", Field.Store.NO);
             TokenStream ts = new MockTokenizer(new StringReader("here we go"), 
MockTokenizer.WHITESPACE, true);
-            Assert.IsFalse(ts.HasAttribute<PayloadAttribute>());
+            Assert.IsFalse(ts.HasAttribute<IPayloadAttribute>());
             field.SetTokenStream(ts);
             doc.Add(field);
             Field field2 = new TextField("field", "", Field.Store.NO);
@@ -742,7 +742,7 @@ namespace Lucene.Net.Index
             doc.Add(field2);
             Field field3 = new TextField("field", "", Field.Store.NO);
             ts = new MockTokenizer(new StringReader("nopayload"), 
MockTokenizer.WHITESPACE, true);
-            Assert.IsFalse(ts.HasAttribute<PayloadAttribute>());
+            Assert.IsFalse(ts.HasAttribute<IPayloadAttribute>());
             field3.SetTokenStream(ts);
             doc.Add(field3);
             writer.AddDocument(doc);
diff --git a/src/Lucene.Net/Analysis/NumericTokenStream.cs 
b/src/Lucene.Net/Analysis/NumericTokenStream.cs
index 290e18ab5..2eb79b8b7 100644
--- a/src/Lucene.Net/Analysis/NumericTokenStream.cs
+++ b/src/Lucene.Net/Analysis/NumericTokenStream.cs
@@ -148,7 +148,7 @@ namespace Lucene.Net.Analysis
                 var attClass = typeof(T);
                 if (typeof(ICharTermAttribute).IsAssignableFrom(attClass))
                 {
-                    throw new ArgumentException("NumericTokenStream does not 
support CharTermAttribute.");
+                    throw new ArgumentException("NumericTokenStream does not 
support ICharTermAttribute.");
                 }
                 return @delegate.CreateAttributeInstance<T>();
             }
@@ -223,9 +223,9 @@ namespace Lucene.Net.Analysis
                 reflector.Reflect(typeof(INumericTermAttribute), "valueSize", 
ValueSize);
             }
 
-            public override void CopyTo(Util.IAttribute target)
+            public override void CopyTo(IAttribute target) // LUCENENET 
specific - intentionally expanding target to use IAttribute rather than 
Attribute
             {
-                var a = (NumericTermAttribute)target;
+                var a = (INumericTermAttribute)target;
                 a.Init(_value, ValueSize, _precisionStep, Shift);
             }
         }
diff --git a/src/Lucene.Net/Analysis/Token.cs b/src/Lucene.Net/Analysis/Token.cs
index 78a92add2..006bd7c8a 100644
--- a/src/Lucene.Net/Analysis/Token.cs
+++ b/src/Lucene.Net/Analysis/Token.cs
@@ -593,7 +593,7 @@ namespace Lucene.Net.Analysis
             payload = prototype.payload;
         }
 
-        public override void CopyTo(IAttribute target)
+        public override void CopyTo(IAttribute target) // LUCENENET specific - 
intentionally expanding target to use IAttribute rather than Attribute
         {
             if (target is Token to)
             {
diff --git a/src/Lucene.Net/Analysis/TokenAttributes/CharTermAttribute.cs 
b/src/Lucene.Net/Analysis/TokenAttributes/CharTermAttribute.cs
index 1d3c9c456..824f1c84a 100644
--- a/src/Lucene.Net/Analysis/TokenAttributes/CharTermAttribute.cs
+++ b/src/Lucene.Net/Analysis/TokenAttributes/CharTermAttribute.cs
@@ -432,9 +432,9 @@ namespace Lucene.Net.Analysis.TokenAttributes
             reflector.Reflect(typeof(ITermToBytesRefAttribute), "bytes", 
BytesRef.DeepCopyOf(bytes));
         }
 
-        public override void CopyTo(IAttribute target)
+        public override void CopyTo(IAttribute target) // LUCENENET specific - 
intentionally expanding target to use IAttribute rather than Attribute
         {
-            CharTermAttribute t = (CharTermAttribute)target;
+            ICharTermAttribute t = (ICharTermAttribute)target;
             t.CopyBuffer(termBuffer, 0, termLength);
         }
 
diff --git a/src/Lucene.Net/Analysis/TokenAttributes/FlagsAttribute.cs 
b/src/Lucene.Net/Analysis/TokenAttributes/FlagsAttribute.cs
index 103731c8c..933fe9f76 100644
--- a/src/Lucene.Net/Analysis/TokenAttributes/FlagsAttribute.cs
+++ b/src/Lucene.Net/Analysis/TokenAttributes/FlagsAttribute.cs
@@ -1,4 +1,4 @@
-using System;
+using Lucene.Net.Util;
 
 namespace Lucene.Net.Analysis.TokenAttributes
 {
@@ -19,9 +19,6 @@ namespace Lucene.Net.Analysis.TokenAttributes
      * limitations under the License.
      */
 
-    using Attribute = Lucene.Net.Util.Attribute;
-    using IAttribute = Lucene.Net.Util.IAttribute;
-
     /// <summary>
     /// Default implementation of <see cref="IFlagsAttribute"/>. </summary>
     public class FlagsAttribute : Attribute, IFlagsAttribute // LUCENENET 
specific: Not implementing ICloneable per Microsoft's recommendation
@@ -65,9 +62,9 @@ namespace Lucene.Net.Analysis.TokenAttributes
             return flags;
         }
 
-        public override void CopyTo(IAttribute target)
+        public override void CopyTo(IAttribute target) // LUCENENET specific - 
intentionally expanding target to use IAttribute rather than Attribute
         {
-            FlagsAttribute t = (FlagsAttribute)target;
+            IFlagsAttribute t = (IFlagsAttribute)target;
             t.Flags = flags;
         }
     }
diff --git a/src/Lucene.Net/Analysis/TokenAttributes/IFlagsAttribute.cs 
b/src/Lucene.Net/Analysis/TokenAttributes/IFlagsAttribute.cs
index 2aa5cf185..f75222d67 100644
--- a/src/Lucene.Net/Analysis/TokenAttributes/IFlagsAttribute.cs
+++ b/src/Lucene.Net/Analysis/TokenAttributes/IFlagsAttribute.cs
@@ -1,4 +1,4 @@
-using Lucene.Net.Util;
+using Lucene.Net.Util;
 
 namespace Lucene.Net.Analysis.TokenAttributes
 {
@@ -22,18 +22,16 @@ namespace Lucene.Net.Analysis.TokenAttributes
     /// <summary> This attribute can be used to pass different flags down the 
<see cref="Tokenizer" /> chain,
     /// eg from one TokenFilter to another one.
     /// <para/>
-    /// This is completely distinct from <see cref="TypeAttribute"/>, although 
they do share similar purposes.
+    /// This is completely distinct from <see cref="ITypeAttribute"/>, 
although they do share similar purposes.
     /// The flags can be used to encode information about the token for use by 
other 
     /// <see cref="TokenFilter"/>s.
+    /// <para/>
     /// @lucene.experimental While we think this is here to stay, we may want 
to change it to be a long.
     /// </summary>
     public interface IFlagsAttribute : IAttribute
     {
         /// <summary>
         /// Get the bitset for any bits that have been set.
-        /// <para/>
-        /// This is completely distinct from <see cref="ITypeAttribute.Type" 
/>, although they do share similar purposes.
-        /// The flags can be used to encode information about the token for 
use by other <see cref="Lucene.Net.Analysis.TokenFilter" />s.
         /// </summary>
         int Flags { get; set; }
     }
diff --git 
a/src/Lucene.Net/Analysis/TokenAttributes/ITermToBytesRefAttribute.cs 
b/src/Lucene.Net/Analysis/TokenAttributes/ITermToBytesRefAttribute.cs
index a8964c129..8aa7ce637 100644
--- a/src/Lucene.Net/Analysis/TokenAttributes/ITermToBytesRefAttribute.cs
+++ b/src/Lucene.Net/Analysis/TokenAttributes/ITermToBytesRefAttribute.cs
@@ -1,4 +1,4 @@
-using Lucene.Net.Util;
+using Lucene.Net.Util;
 
 namespace Lucene.Net.Analysis.TokenAttributes
 {
@@ -39,7 +39,7 @@ namespace Lucene.Net.Analysis.TokenAttributes
     ///
     ///     if (IsInteresting(bytes))
     ///     {
-    ///       // because the bytes are reused by the attribute (like 
CharTermAttribute's char[] buffer),
+    ///       // because the bytes are reused by the attribute (like 
ICharTermAttribute's char[] buffer),
     ///       // you should make a copy if you need persistent access to the 
bytes, otherwise they will
     ///       // be rewritten across calls to IncrementToken()
     ///
diff --git a/src/Lucene.Net/Analysis/TokenAttributes/KeywordAttribute.cs 
b/src/Lucene.Net/Analysis/TokenAttributes/KeywordAttribute.cs
index 086ba1e38..31a41b054 100644
--- a/src/Lucene.Net/Analysis/TokenAttributes/KeywordAttribute.cs
+++ b/src/Lucene.Net/Analysis/TokenAttributes/KeywordAttribute.cs
@@ -1,3 +1,5 @@
+using Lucene.Net.Util;
+
 namespace Lucene.Net.Analysis.TokenAttributes
 {
     /*
@@ -17,9 +19,6 @@ namespace Lucene.Net.Analysis.TokenAttributes
      * limitations under the License.
      */
 
-    using Attribute = Lucene.Net.Util.Attribute;
-    using IAttribute = Lucene.Net.Util.IAttribute;
-
     /// <summary>
     /// Default implementation of <see cref="IKeywordAttribute"/>. </summary>
     public sealed class KeywordAttribute : Attribute, IKeywordAttribute
@@ -37,9 +36,9 @@ namespace Lucene.Net.Analysis.TokenAttributes
             keyword = false;
         }
 
-        public override void CopyTo(IAttribute target)
+        public override void CopyTo(IAttribute target) // LUCENENET specific - 
intentionally expanding target to use IAttribute rather than Attribute
         {
-            KeywordAttribute attr = (KeywordAttribute)target;
+            IKeywordAttribute attr = (IKeywordAttribute)target;
             attr.IsKeyword = keyword;
         }
 
diff --git a/src/Lucene.Net/Analysis/TokenAttributes/OffsetAttribute.cs 
b/src/Lucene.Net/Analysis/TokenAttributes/OffsetAttribute.cs
index 9d4eaa2ed..9646ed757 100644
--- a/src/Lucene.Net/Analysis/TokenAttributes/OffsetAttribute.cs
+++ b/src/Lucene.Net/Analysis/TokenAttributes/OffsetAttribute.cs
@@ -86,9 +86,9 @@ namespace Lucene.Net.Analysis.TokenAttributes
             return code;
         }
 
-        public override void CopyTo(IAttribute target)
+        public override void CopyTo(IAttribute target) // LUCENENET specific - 
intentionally expanding target to use IAttribute rather than Attribute
         {
-            OffsetAttribute t = (OffsetAttribute)target;
+            IOffsetAttribute t = (IOffsetAttribute)target;
             t.SetOffset(startOffset, endOffset);
         }
     }
diff --git a/src/Lucene.Net/Analysis/TokenAttributes/PayloadAttribute.cs 
b/src/Lucene.Net/Analysis/TokenAttributes/PayloadAttribute.cs
index 7ff3193cf..d367115cd 100644
--- a/src/Lucene.Net/Analysis/TokenAttributes/PayloadAttribute.cs
+++ b/src/Lucene.Net/Analysis/TokenAttributes/PayloadAttribute.cs
@@ -1,4 +1,6 @@
-namespace Lucene.Net.Analysis.TokenAttributes
+using Lucene.Net.Util;
+
+namespace Lucene.Net.Analysis.TokenAttributes
 {
     /*
      * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -17,10 +19,6 @@
      * limitations under the License.
      */
 
-    using Attribute = Lucene.Net.Util.Attribute;
-    using IAttribute = Lucene.Net.Util.IAttribute;
-    using BytesRef = Lucene.Net.Util.BytesRef;
-
     /// <summary>
     /// Default implementation of <see cref="IPayloadAttribute"/>. </summary>
     public class PayloadAttribute : Attribute, IPayloadAttribute // LUCENENET 
specific: Not implementing ICloneable per Microsoft's recommendation
@@ -88,9 +86,9 @@
             return (payload is null) ? 0 : payload.GetHashCode();
         }
 
-        public override void CopyTo(IAttribute target)
+        public override void CopyTo(IAttribute target) // LUCENENET specific - 
intentionally expanding target to use IAttribute rather than Attribute
         {
-            PayloadAttribute t = (PayloadAttribute)target;
+            IPayloadAttribute t = (IPayloadAttribute)target;
             t.Payload = (payload is null) ? null : (BytesRef)payload.Clone();
         }
     }
diff --git 
a/src/Lucene.Net/Analysis/TokenAttributes/PositionIncrementAttribute.cs 
b/src/Lucene.Net/Analysis/TokenAttributes/PositionIncrementAttribute.cs
index 952db5c37..6916c8a18 100644
--- a/src/Lucene.Net/Analysis/TokenAttributes/PositionIncrementAttribute.cs
+++ b/src/Lucene.Net/Analysis/TokenAttributes/PositionIncrementAttribute.cs
@@ -72,9 +72,9 @@ namespace Lucene.Net.Analysis.TokenAttributes
             return positionIncrement;
         }
 
-        public override void CopyTo(IAttribute target)
+        public override void CopyTo(IAttribute target) // LUCENENET specific - 
intentionally expanding target to use IAttribute rather than Attribute
         {
-            PositionIncrementAttribute t = (PositionIncrementAttribute)target;
+            IPositionIncrementAttribute t = 
(IPositionIncrementAttribute)target;
             t.PositionIncrement = positionIncrement;
         }
     }
diff --git a/src/Lucene.Net/Analysis/TokenAttributes/PositionLengthAttribute.cs 
b/src/Lucene.Net/Analysis/TokenAttributes/PositionLengthAttribute.cs
index 4ee38275c..3eff86c5a 100644
--- a/src/Lucene.Net/Analysis/TokenAttributes/PositionLengthAttribute.cs
+++ b/src/Lucene.Net/Analysis/TokenAttributes/PositionLengthAttribute.cs
@@ -72,9 +72,9 @@ namespace Lucene.Net.Analysis.TokenAttributes
             return positionLength;
         }
 
-        public override void CopyTo(IAttribute target)
+        public override void CopyTo(IAttribute target) // LUCENENET specific - 
intentionally expanding target to use IAttribute rather than Attribute
         {
-            PositionLengthAttribute t = (PositionLengthAttribute)target;
+            IPositionLengthAttribute t = (IPositionLengthAttribute)target;
             t.PositionLength = positionLength;
         }
     }
diff --git a/src/Lucene.Net/Analysis/TokenAttributes/TypeAttribute.cs 
b/src/Lucene.Net/Analysis/TokenAttributes/TypeAttribute.cs
index bd88dd700..b6dcbb87c 100644
--- a/src/Lucene.Net/Analysis/TokenAttributes/TypeAttribute.cs
+++ b/src/Lucene.Net/Analysis/TokenAttributes/TypeAttribute.cs
@@ -1,4 +1,6 @@
-using System;
+using Lucene.Net.Util;
+using System;
+using Attribute = Lucene.Net.Util.Attribute;
 
 namespace Lucene.Net.Analysis.TokenAttributes
 {
@@ -19,9 +21,6 @@ namespace Lucene.Net.Analysis.TokenAttributes
      * limitations under the License.
      */
 
-    using Attribute = Lucene.Net.Util.Attribute;
-    using IAttribute = Lucene.Net.Util.IAttribute;
-
     /// <summary>
     /// Default implementation of <see cref="ITypeAttribute"/>. </summary>
     public partial class TypeAttribute : Attribute, ITypeAttribute // 
LUCENENET specific: Not implementing ICloneable per Microsoft's recommendation
@@ -73,10 +72,10 @@ namespace Lucene.Net.Analysis.TokenAttributes
             return (type is null) ? 0 : type.GetHashCode();
         }
 
-        public override void CopyTo(IAttribute target)
+        public override void CopyTo(IAttribute target) // LUCENENET specific - 
intentionally expanding target to use IAttribute rather than Attribute
         {
-            TypeAttribute t = (TypeAttribute)target;
-            t.type = type;
+            ITypeAttribute t = (ITypeAttribute)target;
+            t.Type = type;
         }
     }
 }
\ No newline at end of file
diff --git a/src/Lucene.Net/Codecs/TermVectorsReader.cs 
b/src/Lucene.Net/Codecs/TermVectorsReader.cs
index 3a16f052f..927bc9142 100644
--- a/src/Lucene.Net/Codecs/TermVectorsReader.cs
+++ b/src/Lucene.Net/Codecs/TermVectorsReader.cs
@@ -21,7 +21,7 @@ namespace Lucene.Net.Codecs
 
     using DocsAndPositionsEnum = Lucene.Net.Index.DocsAndPositionsEnum; // 
javadocs
     using Fields = Lucene.Net.Index.Fields;
-    using OffsetAttribute = 
Lucene.Net.Analysis.TokenAttributes.OffsetAttribute; // javadocs
+    using IOffsetAttribute = 
Lucene.Net.Analysis.TokenAttributes.IOffsetAttribute; // javadocs
 
     /// <summary>
     /// Codec API for reading term vectors:
@@ -41,7 +41,7 @@ namespace Lucene.Net.Codecs
         /// <summary>
         /// Returns term vectors for this document, or <c>null</c> if
         /// term vectors were not indexed. If offsets are
-        /// available they are in an <see cref="OffsetAttribute"/>
+        /// available they are in an <see cref="IOffsetAttribute"/>
         /// available from the <see cref="DocsAndPositionsEnum"/>.
         /// </summary>
         public abstract Fields Get(int doc);
diff --git a/src/Lucene.Net/Search/BoostAttributeImpl.cs 
b/src/Lucene.Net/Search/BoostAttributeImpl.cs
index eb4a6d066..bfe7e622e 100644
--- a/src/Lucene.Net/Search/BoostAttributeImpl.cs
+++ b/src/Lucene.Net/Search/BoostAttributeImpl.cs
@@ -1,3 +1,5 @@
+using Lucene.Net.Util;
+
 namespace Lucene.Net.Search
 {
     /*
@@ -17,9 +19,6 @@ namespace Lucene.Net.Search
      * limitations under the License.
      */
 
-    using Attribute = Lucene.Net.Util.Attribute;
-    using IAttribute = Lucene.Net.Util.IAttribute;
-
     /// <summary>
     /// Implementation class for <see cref="IBoostAttribute"/>.
     /// <para/>
@@ -43,9 +42,9 @@ namespace Lucene.Net.Search
             boost = 1.0f;
         }
 
-        public override void CopyTo(IAttribute target)
+        public override void CopyTo(IAttribute target) // LUCENENET specific - 
intentionally expanding target to use IAttribute rather than Attribute
         {
-            ((BoostAttribute)target).Boost = boost;
+            ((IBoostAttribute)target).Boost = boost;
         }
     }
 }
\ No newline at end of file
diff --git a/src/Lucene.Net/Search/FuzzyTermsEnum.cs 
b/src/Lucene.Net/Search/FuzzyTermsEnum.cs
index 342c45765..88c7ea778 100644
--- a/src/Lucene.Net/Search/FuzzyTermsEnum.cs
+++ b/src/Lucene.Net/Search/FuzzyTermsEnum.cs
@@ -494,9 +494,9 @@ namespace Lucene.Net.Search
                 return 
automata.Equals(((LevenshteinAutomataAttribute)other).automata);
             }
 
-            public override void CopyTo(IAttribute target)
+            public override void CopyTo(IAttribute target) // LUCENENET 
specific - intentionally expanding target to use IAttribute rather than 
Attribute
             {
-                IList<CompiledAutomaton> targetAutomata = 
((LevenshteinAutomataAttribute)target).Automata;
+                IList<CompiledAutomaton> targetAutomata = 
((ILevenshteinAutomataAttribute)target).Automata;
                 targetAutomata.Clear();
                 targetAutomata.AddRange(automata);
             }
diff --git a/src/Lucene.Net/Search/MaxNonCompetitiveBoostAttributeImpl.cs 
b/src/Lucene.Net/Search/MaxNonCompetitiveBoostAttributeImpl.cs
index 4359769ab..6ee48c612 100644
--- a/src/Lucene.Net/Search/MaxNonCompetitiveBoostAttributeImpl.cs
+++ b/src/Lucene.Net/Search/MaxNonCompetitiveBoostAttributeImpl.cs
@@ -51,9 +51,9 @@ namespace Lucene.Net.Search
             competitiveTerm = null;
         }
 
-        public override void CopyTo(IAttribute target)
+        public override void CopyTo(IAttribute target) // LUCENENET specific - 
intentionally expanding target to use IAttribute rather than Attribute
         {
-            MaxNonCompetitiveBoostAttribute t = 
(MaxNonCompetitiveBoostAttribute)target;
+            IMaxNonCompetitiveBoostAttribute t = 
(IMaxNonCompetitiveBoostAttribute)target;
             t.MaxNonCompetitiveBoost = maxNonCompetitiveBoost;
             t.CompetitiveTerm = competitiveTerm;
         }
diff --git a/src/Lucene.Net/Util/Attribute.cs b/src/Lucene.Net/Util/Attribute.cs
index 782392f40..6c1372462 100644
--- a/src/Lucene.Net/Util/Attribute.cs
+++ b/src/Lucene.Net/Util/Attribute.cs
@@ -1,4 +1,4 @@
-namespace Lucene.Net.Util
+namespace Lucene.Net.Util
 {
     /*
      * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -20,6 +20,6 @@ namespace Lucene.Net.Util
     /// <summary> Base interface for attributes.</summary>
     public interface IAttribute
     {
-        void CopyTo(IAttribute target);
+        void CopyTo(IAttribute target); // LUCENENET specific - .NET doesn't 
recognize this method without a cast, so we define it here to ensure it is 
visible on all IAttribute interfaces
     }
 }
\ No newline at end of file
diff --git a/src/Lucene.Net/Util/AttributeImpl.cs 
b/src/Lucene.Net/Util/AttributeImpl.cs
index 33d513341..b2fe0d24e 100644
--- a/src/Lucene.Net/Util/AttributeImpl.cs
+++ b/src/Lucene.Net/Util/AttributeImpl.cs
@@ -195,7 +195,7 @@ namespace Lucene.Net.Util
         /// <paramref name="target"/> attribute. The <paramref name="target"/> 
implementation must support all the
         /// <see cref="IAttribute"/>s this implementation supports.
         /// </summary>
-        public abstract void CopyTo(IAttribute target);
+        public abstract void CopyTo(IAttribute target); // LUCENENET specific 
- intentionally expanding target to use IAttribute rather than Attribute
 
         /// <summary> Shallow clone. Subclasses must override this if they
         /// need to clone any members deeply,
diff --git a/src/Lucene.Net/Util/AttributeReflector.cs 
b/src/Lucene.Net/Util/AttributeReflector.cs
index 906188664..c2b17df70 100644
--- a/src/Lucene.Net/Util/AttributeReflector.cs
+++ b/src/Lucene.Net/Util/AttributeReflector.cs
@@ -1,4 +1,5 @@
-using System;
+using Lucene.Net.Analysis.TokenAttributes;
+using System;
 
 namespace Lucene.Net.Util
 {
@@ -33,8 +34,8 @@ namespace Lucene.Net.Util
         /// <summary>
         /// This method gets called for every property in an <see 
cref="Attribute"/>/<see cref="AttributeSource"/>
         /// passing the <see cref="Type"/> of the <see cref="IAttribute"/>, a 
<paramref name="key"/> and the actual <paramref name="value"/>.
-        /// E.g., an invocation of <see 
cref="Analysis.TokenAttributes.CharTermAttribute.ReflectWith(IAttributeReflector)"/>
-        /// would call this method once using <see 
cref="T:typeof(Analysis.TokenAttributes.ICharTermAttribute)"/>
+        /// E.g., an invocation of <see 
cref="CharTermAttribute.ReflectWith(IAttributeReflector)"/>
+        /// would call this method once using <c>typeof(ICharTermAttribute)</c>
         /// as attribute type, <c>"term"</c> as <paramref name="key"/> and the 
actual <paramref name="value"/> as a <see cref="string"/>.
         /// </summary>
         void Reflect(Type type, string key, object value);


Reply via email to