lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [10/50] [abbrv] lucenenet git commit: This reverts commit 1a8c4a116f8870479e85737bfecb8fe673e8347b (SWEEP: Lucene.Net.Core: Marked most (stateful) classes serializable)
Date Sat, 09 Sep 2017 00:31:28 GMT
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/FilteredQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/FilteredQuery.cs b/src/Lucene.Net/Search/FilteredQuery.cs
index ebae4de..3ab7fde 100644
--- a/src/Lucene.Net/Search/FilteredQuery.cs
+++ b/src/Lucene.Net/Search/FilteredQuery.cs
@@ -37,9 +37,6 @@ namespace Lucene.Net.Search
     /// <para/>
     /// @since   1.4 </summary>
     /// <seealso cref="CachingWrapperFilter"/>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class FilteredQuery : Query
     {
         private readonly Query query;
@@ -89,9 +86,6 @@ namespace Lucene.Net.Search
             return new WeightAnonymousInnerClassHelper(this, weight);
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class WeightAnonymousInnerClassHelper : Weight
         {
             private readonly FilteredQuery outerInstance;
@@ -187,9 +181,6 @@ namespace Lucene.Net.Search
         /// than document scoring or if the filter has a linear running time to compute
         /// the next matching doc like exact geo distances.
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private sealed class QueryFirstScorer : Scorer
         {
             private readonly Scorer scorer;
@@ -255,9 +246,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class QueryFirstBulkScorer : BulkScorer
         {
             private readonly Scorer scorer;
@@ -305,9 +293,6 @@ namespace Lucene.Net.Search
         /// jumping past the target document. When both land on the same document, it's
         /// collected.
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class LeapFrogScorer : Scorer
         {
             private readonly DocIdSetIterator secondary;
@@ -390,9 +375,6 @@ namespace Lucene.Net.Search
         }
 
         // TODO once we have way to figure out if we use RA or LeapFrog we can remove this scorer
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private sealed class PrimaryAdvancedLeapFrogScorer : LeapFrogScorer
         {
             private readonly int firstFilteredDoc;
@@ -576,9 +558,6 @@ namespace Lucene.Net.Search
 
         /// <summary>
         /// Abstract class that defines how the filter (<see cref="DocIdSet"/>) applied during document collection. </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public abstract class FilterStrategy
         {
             /// <summary>
@@ -626,9 +605,6 @@ namespace Lucene.Net.Search
         /// <code>true</code>. Otherwise this strategy falls back to a "zig-zag join" (
         /// <see cref="FilteredQuery.LEAP_FROG_FILTER_FIRST_STRATEGY"/>) strategy .
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public class RandomAccessFilterStrategy : FilterStrategy
         {
             public override Scorer FilteredScorer(AtomicReaderContext context, Weight weight, DocIdSet docIdSet)
@@ -684,9 +660,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private sealed class LeapFrogFilterStrategy : FilterStrategy
         {
             private readonly bool scorerFirst;
@@ -735,9 +708,6 @@ namespace Lucene.Net.Search
         /// matching doc like exact geo distances.
         /// </para>
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private sealed class QueryFirstFilterStrategy : FilterStrategy
         {
             public override Scorer FilteredScorer(AtomicReaderContext context, Weight weight, DocIdSet docIdSet)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/FuzzyQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/FuzzyQuery.cs b/src/Lucene.Net/Search/FuzzyQuery.cs
index fa11a18..5fd6af5 100644
--- a/src/Lucene.Net/Search/FuzzyQuery.cs
+++ b/src/Lucene.Net/Search/FuzzyQuery.cs
@@ -53,9 +53,6 @@ namespace Lucene.Net.Search
     /// not match an indexed term "ab", and <see cref="FuzzyQuery"/> on term "a" with maxEdits=2 will not
     /// match an indexed term "abc".
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class FuzzyQuery : MultiTermQuery
     {
         public const int DefaultMaxEdits = LevenshteinAutomata.MAXIMUM_SUPPORTED_DISTANCE;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/FuzzyTermsEnum.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/FuzzyTermsEnum.cs b/src/Lucene.Net/Search/FuzzyTermsEnum.cs
index e29aa59..f0bff72 100644
--- a/src/Lucene.Net/Search/FuzzyTermsEnum.cs
+++ b/src/Lucene.Net/Search/FuzzyTermsEnum.cs
@@ -52,9 +52,6 @@ namespace Lucene.Net.Search
     /// <see cref="Comparer"/>.  Each term in the enumeration is
     /// greater than all that precede it.</para>
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class FuzzyTermsEnum : TermsEnum
     {
         private void InitializeInstanceFields()
@@ -368,9 +365,6 @@ namespace Lucene.Net.Search
         /// as enumeration is logarithmic to the number of terms (instead of linear)
         /// and comparison is linear to length of the term (rather than quadratic)
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class AutomatonFuzzyTermsEnum : FilteredTermsEnum
         {
             internal virtual void InitializeInstanceFields()
@@ -491,9 +485,6 @@ namespace Lucene.Net.Search
         /// <para/>
         /// @lucene.internal
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public sealed class LevenshteinAutomataAttribute : Attribute, ILevenshteinAutomataAttribute
         {
             // LUCENENET NOTE: Must use EquatableList for Equals and GetHashCode()

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/HitQueue.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/HitQueue.cs b/src/Lucene.Net/Search/HitQueue.cs
index 23c67bf..44d481a 100644
--- a/src/Lucene.Net/Search/HitQueue.cs
+++ b/src/Lucene.Net/Search/HitQueue.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search
 {
     /*
@@ -21,9 +19,6 @@ namespace Lucene.Net.Search
 
     using Lucene.Net.Util;
 
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     internal sealed class HitQueue : PriorityQueue<ScoreDoc>
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/IndexSearcher.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/IndexSearcher.cs b/src/Lucene.Net/Search/IndexSearcher.cs
index b775f72..66e73a2 100644
--- a/src/Lucene.Net/Search/IndexSearcher.cs
+++ b/src/Lucene.Net/Search/IndexSearcher.cs
@@ -66,9 +66,6 @@ namespace Lucene.Net.Search
     /// synchronize on the <see cref="IndexSearcher"/> instance;
     /// use your own (non-Lucene) objects instead.</p>
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class IndexSearcher
     {
         internal readonly IndexReader reader; // package private for testing!
@@ -747,9 +744,6 @@ namespace Lucene.Net.Search
         /// <summary>
         /// A thread subclass for searching a single searchable
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private sealed class SearcherCallableNoSort : ICallable<TopDocs>
         {
             private readonly ReentrantLock @lock;
@@ -799,9 +793,6 @@ namespace Lucene.Net.Search
         /// <summary>
         /// A thread subclass for searching a single searchable
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private sealed class SearcherCallableWithSort : ICallable<TopFieldDocs>
         {
             private readonly ReentrantLock @lock;
@@ -868,9 +859,6 @@ namespace Lucene.Net.Search
         /// iterable interface to the completed <see cref="ICallable{V}"/> instances.
         /// </summary>
         /// <typeparam name="T">the type of the <see cref="ICallable{V}"/> return value</typeparam>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private sealed class ExecutionHelper<T> : IEnumerator<T>, IEnumerable<T>
         {
             private readonly ICompletionService<T> service;
@@ -967,9 +955,6 @@ namespace Lucene.Net.Search
         /// <para/>
         /// @lucene.experimental
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public class LeafSlice
         {
             internal AtomicReaderContext[] Leaves { get; private set; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/LiveFieldValues.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/LiveFieldValues.cs b/src/Lucene.Net/Search/LiveFieldValues.cs
index 3cfa3f7..6f2ab6f 100644
--- a/src/Lucene.Net/Search/LiveFieldValues.cs
+++ b/src/Lucene.Net/Search/LiveFieldValues.cs
@@ -33,9 +33,7 @@ namespace Lucene.Net.Search
     /// the same time by two threads, because in this case you
     /// cannot in general know which thread "won".
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
+
     public abstract class LiveFieldValues<S, T> : ReferenceManager.IRefreshListener, IDisposable
         where S : class
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/MatchAllDocsQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/MatchAllDocsQuery.cs b/src/Lucene.Net/Search/MatchAllDocsQuery.cs
index 8c7bdcd..baf8a79 100644
--- a/src/Lucene.Net/Search/MatchAllDocsQuery.cs
+++ b/src/Lucene.Net/Search/MatchAllDocsQuery.cs
@@ -1,5 +1,4 @@
 using Lucene.Net.Support;
-using System;
 using System.Collections.Generic;
 using System.Text;
 
@@ -31,14 +30,8 @@ namespace Lucene.Net.Search
     /// <summary>
     /// A query that matches all documents.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class MatchAllDocsQuery : Query
     {
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class MatchAllScorer : Scorer
         {
             private readonly MatchAllDocsQuery outerInstance;
@@ -98,9 +91,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class MatchAllDocsWeight : Weight
         {
             private readonly MatchAllDocsQuery outerInstance;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/MinShouldMatchSumScorer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/MinShouldMatchSumScorer.cs b/src/Lucene.Net/Search/MinShouldMatchSumScorer.cs
index c2b2760..3d97895 100644
--- a/src/Lucene.Net/Search/MinShouldMatchSumScorer.cs
+++ b/src/Lucene.Net/Search/MinShouldMatchSumScorer.cs
@@ -33,9 +33,6 @@ namespace Lucene.Net.Search
     /// prune the number of candidates, it is hence a mixture between a pure <see cref="DisjunctionScorer"/>
     /// and a <see cref="ConjunctionScorer"/>.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     internal class MinShouldMatchSumScorer : Scorer
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/MultiCollector.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/MultiCollector.cs b/src/Lucene.Net/Search/MultiCollector.cs
index 00bbe2e..437ebbf 100644
--- a/src/Lucene.Net/Search/MultiCollector.cs
+++ b/src/Lucene.Net/Search/MultiCollector.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search
 {
     /*
@@ -27,9 +25,6 @@ namespace Lucene.Net.Search
     /// list of collectors and wraps them with <see cref="MultiCollector"/>, while
     /// filtering out the <c>null</c> ones.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class MultiCollector : ICollector
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/MultiPhraseQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/MultiPhraseQuery.cs b/src/Lucene.Net/Search/MultiPhraseQuery.cs
index ea93931..0a68b64 100644
--- a/src/Lucene.Net/Search/MultiPhraseQuery.cs
+++ b/src/Lucene.Net/Search/MultiPhraseQuery.cs
@@ -67,9 +67,6 @@ namespace Lucene.Net.Search
     /// as the method to use to initialize. If there are multiple parameters, each parameter set
     /// must be surrounded by curly braces.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class MultiPhraseQuery : Query, IEnumerable<Term[]> // LUCENENET specific - implemented IEnumerable<Term[]>, which allows for use of collection initializer. See: https://stackoverflow.com/a/9195144
     {
         private string field;
@@ -182,9 +179,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class MultiPhraseWeight : Weight
         {
             private readonly MultiPhraseQuery outerInstance;
@@ -545,14 +539,8 @@ namespace Lucene.Net.Search
     /// </summary>
 
     // TODO: if ever we allow subclassing of the *PhraseScorer
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     internal class UnionDocsAndPositionsEnum : DocsAndPositionsEnum
     {
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private sealed class DocsQueue : Util.PriorityQueue<DocsAndPositionsEnum>
         {
             internal DocsQueue(ICollection<DocsAndPositionsEnum> docsEnums)
@@ -578,9 +566,6 @@ namespace Lucene.Net.Search
         /// <summary>
         /// NOTE: This was IntQueue in Lucene
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private sealed class Int32Queue
         {
             public Int32Queue()

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/MultiTermQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/MultiTermQuery.cs b/src/Lucene.Net/Search/MultiTermQuery.cs
index 6c264ca..0d2c20f 100644
--- a/src/Lucene.Net/Search/MultiTermQuery.cs
+++ b/src/Lucene.Net/Search/MultiTermQuery.cs
@@ -60,9 +60,6 @@ namespace Lucene.Net.Search
     /// <see cref="MultiTermQuery"/>s using 
     /// <see cref="CONSTANT_SCORE_AUTO_REWRITE_DEFAULT"/> by default.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public abstract class MultiTermQuery : Query
     {
         protected internal readonly string m_field;
@@ -70,9 +67,6 @@ namespace Lucene.Net.Search
 
         /// <summary>
         /// Abstract class that defines how the query is rewritten. </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public abstract class RewriteMethod
         {
             public abstract Query Rewrite(IndexReader reader, MultiTermQuery query);
@@ -101,9 +95,6 @@ namespace Lucene.Net.Search
         /// <seealso cref="MultiTermRewriteMethod"/>
         public static readonly RewriteMethod CONSTANT_SCORE_FILTER_REWRITE = new RewriteMethodAnonymousInnerClassHelper();
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class RewriteMethodAnonymousInnerClassHelper : RewriteMethod
         {
             public RewriteMethodAnonymousInnerClassHelper()
@@ -158,9 +149,6 @@ namespace Lucene.Net.Search
         /// <see cref="FuzzyQuery"/>.
         /// </summary>
         /// <seealso cref="MultiTermRewriteMethod"/>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public sealed class TopTermsScoringBooleanQueryRewrite : TopTermsRewrite<BooleanQuery>
         {
             /// <summary>
@@ -205,9 +193,6 @@ namespace Lucene.Net.Search
         /// the boolean max clause count.
         /// </summary>
         /// <seealso cref="MultiTermRewriteMethod"/>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public sealed class TopTermsBoostOnlyBooleanQueryRewrite : TopTermsRewrite<BooleanQuery>
         {
             /// <summary>
@@ -254,9 +239,6 @@ namespace Lucene.Net.Search
 //        /// Otherwise, <see cref="CONSTANT_SCORE_FILTER_REWRITE"/> is
 //        /// used.
 //        /// </summary>
-//#if FEATURE_SERIALIZABLE
-//        [Serializable]
-//#endif
 //        public class ConstantScoreAutoRewrite : Lucene.Net.Search.ConstantScoreAutoRewrite
 //        {
 //        }
@@ -275,9 +257,6 @@ namespace Lucene.Net.Search
         /// </summary>
         public static readonly RewriteMethod CONSTANT_SCORE_AUTO_REWRITE_DEFAULT = new ConstantScoreAutoRewriteAnonymousInnerClassHelper();
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class ConstantScoreAutoRewriteAnonymousInnerClassHelper : ConstantScoreAutoRewrite
         {
             public ConstantScoreAutoRewriteAnonymousInnerClassHelper()

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/MultiTermQueryWrapperFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/MultiTermQueryWrapperFilter.cs b/src/Lucene.Net/Search/MultiTermQueryWrapperFilter.cs
index d172657..e5637a3 100644
--- a/src/Lucene.Net/Search/MultiTermQueryWrapperFilter.cs
+++ b/src/Lucene.Net/Search/MultiTermQueryWrapperFilter.cs
@@ -1,5 +1,4 @@
 using Lucene.Net.Index;
-using System;
 using System.Diagnostics;
 
 namespace Lucene.Net.Search
@@ -44,9 +43,6 @@ namespace Lucene.Net.Search
     /// <see cref="MultiTermQuery.CONSTANT_SCORE_FILTER_REWRITE"/>;
     /// this is why it is not abstract.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class MultiTermQueryWrapperFilter<Q> : Filter where Q : MultiTermQuery
     {
         protected readonly Q m_query;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/NGramPhraseQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/NGramPhraseQuery.cs b/src/Lucene.Net/Search/NGramPhraseQuery.cs
index 7ad97e8..eb36681 100644
--- a/src/Lucene.Net/Search/NGramPhraseQuery.cs
+++ b/src/Lucene.Net/Search/NGramPhraseQuery.cs
@@ -1,5 +1,4 @@
 using Lucene.Net.Support;
-using System;
 
 namespace Lucene.Net.Search
 {
@@ -44,9 +43,6 @@ namespace Lucene.Net.Search
     /// as the method to use to initialize. If there are multiple parameters, each parameter set
     /// must be surrounded by curly braces.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class NGramPhraseQuery : PhraseQuery
     {
         private readonly int n;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/NumericRangeFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/NumericRangeFilter.cs b/src/Lucene.Net/Search/NumericRangeFilter.cs
index f42c87d..22d33d2 100644
--- a/src/Lucene.Net/Search/NumericRangeFilter.cs
+++ b/src/Lucene.Net/Search/NumericRangeFilter.cs
@@ -40,9 +40,6 @@ namespace Lucene.Net.Search
     /// <para/>
     /// @since 2.9
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public sealed class NumericRangeFilter<T> : MultiTermQueryWrapperFilter<NumericRangeQuery<T>>
         where T : struct, IComparable<T>
     // real numbers in C# are structs and IComparable with themselves, best constraint we have

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/NumericRangeQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/NumericRangeQuery.cs b/src/Lucene.Net/Search/NumericRangeQuery.cs
index 344bc4d..9b9b283 100644
--- a/src/Lucene.Net/Search/NumericRangeQuery.cs
+++ b/src/Lucene.Net/Search/NumericRangeQuery.cs
@@ -162,9 +162,6 @@ namespace Lucene.Net.Search
     ///
     /// @since 2.9
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public sealed class NumericRangeQuery<T> : MultiTermQuery
         where T : struct, IComparable<T> // best equiv constraint for java's number class
     {
@@ -320,9 +317,6 @@ namespace Lucene.Net.Search
         /// <see cref="NumericUtils.SplitInt32Range(NumericUtils.Int32RangeBuilder, int, int, int)"/> generates the sub-ranges. For
         /// <see cref="MultiTermQuery"/> ordering is not relevant.
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private sealed class NumericRangeTermsEnum : FilteredTermsEnum
         {
             private readonly NumericRangeQuery<T> outerInstance;
@@ -440,9 +434,6 @@ namespace Lucene.Net.Search
                 termComp = Comparer;
             }
 
-#if FEATURE_SERIALIZABLE
-            [Serializable]
-#endif
             private class Int64RangeBuilderAnonymousInnerClassHelper : NumericUtils.Int64RangeBuilder
             {
                 private readonly NumericRangeTermsEnum outerInstance;
@@ -459,9 +450,6 @@ namespace Lucene.Net.Search
                 }
             }
 
-#if FEATURE_SERIALIZABLE
-            [Serializable]
-#endif
             private class Int32RangeBuilderAnonymousInnerClassHelper : NumericUtils.Int32RangeBuilder
             {
                 private readonly NumericRangeTermsEnum outerInstance;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Payloads/AveragePayloadFunction.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Payloads/AveragePayloadFunction.cs b/src/Lucene.Net/Search/Payloads/AveragePayloadFunction.cs
index 88f7af8..8dbe274 100644
--- a/src/Lucene.Net/Search/Payloads/AveragePayloadFunction.cs
+++ b/src/Lucene.Net/Search/Payloads/AveragePayloadFunction.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search.Payloads
 {
     /*
@@ -24,9 +22,6 @@ namespace Lucene.Net.Search.Payloads
     /// <para/>
     /// Is thread safe and completely reusable.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class AveragePayloadFunction : PayloadFunction
     {
         public override float CurrentScore(int docId, string field, int start, int end, int numPayloadsSeen, float currentScore, float currentPayloadScore)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Payloads/MaxPayloadFunction.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Payloads/MaxPayloadFunction.cs b/src/Lucene.Net/Search/Payloads/MaxPayloadFunction.cs
index 4adfa98..8b1826a 100644
--- a/src/Lucene.Net/Search/Payloads/MaxPayloadFunction.cs
+++ b/src/Lucene.Net/Search/Payloads/MaxPayloadFunction.cs
@@ -24,9 +24,6 @@ namespace Lucene.Net.Search.Payloads
     /// <para/>
     /// Is thread safe and completely reusable.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class MaxPayloadFunction : PayloadFunction
     {
         public override float CurrentScore(int docId, string field, int start, int end, int numPayloadsSeen, float currentScore, float currentPayloadScore)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Payloads/MinPayloadFunction.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Payloads/MinPayloadFunction.cs b/src/Lucene.Net/Search/Payloads/MinPayloadFunction.cs
index 88c04a7..32a70cb 100644
--- a/src/Lucene.Net/Search/Payloads/MinPayloadFunction.cs
+++ b/src/Lucene.Net/Search/Payloads/MinPayloadFunction.cs
@@ -22,9 +22,6 @@ namespace Lucene.Net.Search.Payloads
     /// <summary>
     /// Calculates the minimum payload seen
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class MinPayloadFunction : PayloadFunction
     {
         public override float CurrentScore(int docId, string field, int start, int end, int numPayloadsSeen, float currentScore, float currentPayloadScore)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Payloads/PayloadFunction.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Payloads/PayloadFunction.cs b/src/Lucene.Net/Search/Payloads/PayloadFunction.cs
index 7bba938..21bd43e 100644
--- a/src/Lucene.Net/Search/Payloads/PayloadFunction.cs
+++ b/src/Lucene.Net/Search/Payloads/PayloadFunction.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search.Payloads
 {
     /*
@@ -27,9 +25,6 @@ namespace Lucene.Net.Search.Payloads
     /// change
     /// </summary>
     /// <seealso cref="Lucene.Net.Search.Payloads.PayloadTermQuery"/>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public abstract class PayloadFunction
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Payloads/PayloadNearQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Payloads/PayloadNearQuery.cs b/src/Lucene.Net/Search/Payloads/PayloadNearQuery.cs
index b1ba7b6..60fcba0 100644
--- a/src/Lucene.Net/Search/Payloads/PayloadNearQuery.cs
+++ b/src/Lucene.Net/Search/Payloads/PayloadNearQuery.cs
@@ -47,9 +47,6 @@ namespace Lucene.Net.Search.Payloads
     /// Payload scores are aggregated using a pluggable <see cref="PayloadFunction"/>.
     /// </summary>
     /// <seealso cref="Lucene.Net.Search.Similarities.Similarity.SimScorer.ComputePayloadFactor(int, int, int, BytesRef)"/>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class PayloadNearQuery : SpanNearQuery
     {
         protected string m_fieldName;
@@ -161,9 +158,6 @@ namespace Lucene.Net.Search.Payloads
             return true;
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public class PayloadNearSpanWeight : SpanWeight
         {
             private readonly PayloadNearQuery outerInstance;
@@ -211,9 +205,6 @@ namespace Lucene.Net.Search.Payloads
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public class PayloadNearSpanScorer : SpanScorer
         {
             private readonly PayloadNearQuery outerInstance;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Payloads/PayloadSpanUtil.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Payloads/PayloadSpanUtil.cs b/src/Lucene.Net/Search/Payloads/PayloadSpanUtil.cs
index 8f2673f..db74e74 100644
--- a/src/Lucene.Net/Search/Payloads/PayloadSpanUtil.cs
+++ b/src/Lucene.Net/Search/Payloads/PayloadSpanUtil.cs
@@ -1,4 +1,3 @@
-using System;
 using System.Collections.Generic;
 using System.Linq;
 
@@ -38,9 +37,6 @@ namespace Lucene.Net.Search.Payloads
     /// <para/>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class PayloadSpanUtil
     {
         private IndexReaderContext context;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Payloads/PayloadTermQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Payloads/PayloadTermQuery.cs b/src/Lucene.Net/Search/Payloads/PayloadTermQuery.cs
index bc93123..e923100 100644
--- a/src/Lucene.Net/Search/Payloads/PayloadTermQuery.cs
+++ b/src/Lucene.Net/Search/Payloads/PayloadTermQuery.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search.Payloads
 {
     /*
@@ -43,9 +41,6 @@ namespace Lucene.Net.Search.Payloads
     /// <para/>
     /// Payload scores are aggregated using a pluggable <see cref="PayloadFunction"/>. </summary>
     /// <seealso cref="Lucene.Net.Search.Similarities.Similarity.SimScorer.ComputePayloadFactor(int, int, int, BytesRef)"/>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class PayloadTermQuery : SpanTermQuery
     {
         protected PayloadFunction m_function;
@@ -68,9 +63,6 @@ namespace Lucene.Net.Search.Payloads
             return new PayloadTermWeight(this, this, searcher);
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         protected class PayloadTermWeight : SpanWeight
         {
             private readonly PayloadTermQuery outerInstance;
@@ -86,9 +78,6 @@ namespace Lucene.Net.Search.Payloads
                 return new PayloadTermSpanScorer(this, (TermSpans)m_query.GetSpans(context, acceptDocs, m_termContexts), this, m_similarity.GetSimScorer(m_stats, context));
             }
 
-#if FEATURE_SERIALIZABLE
-            [Serializable]
-#endif
             protected class PayloadTermSpanScorer : SpanScorer
             {
                 private readonly PayloadTermQuery.PayloadTermWeight outerInstance;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/PhrasePositions.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/PhrasePositions.cs b/src/Lucene.Net/Search/PhrasePositions.cs
index dc9619a..d90d4b4 100644
--- a/src/Lucene.Net/Search/PhrasePositions.cs
+++ b/src/Lucene.Net/Search/PhrasePositions.cs
@@ -1,5 +1,4 @@
 using Lucene.Net.Index;
-using System;
 
 namespace Lucene.Net.Search
 {
@@ -23,9 +22,6 @@ namespace Lucene.Net.Search
     /// <summary>
     /// Position of a term in a document that takes into account the term offset within the phrase.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     internal sealed class PhrasePositions
     {
         internal int doc; // current doc

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/PhraseQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/PhraseQuery.cs b/src/Lucene.Net/Search/PhraseQuery.cs
index 043cd36..b56a886 100644
--- a/src/Lucene.Net/Search/PhraseQuery.cs
+++ b/src/Lucene.Net/Search/PhraseQuery.cs
@@ -63,9 +63,6 @@ namespace Lucene.Net.Search
     /// as the method to use to initialize. If there are multiple parameters, each parameter set
     /// must be surrounded by curly braces.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class PhraseQuery : Query, IEnumerable<Term> // LUCENENET specific - implemented IEnumerable<Term>, which allows for use of collection initializer. See: https://stackoverflow.com/a/9195144
     {
         private string field;
@@ -192,9 +189,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         internal class PostingsAndFreq : IComparable<PostingsAndFreq>
         {
             internal readonly DocsAndPositionsEnum postings;
@@ -302,9 +296,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class PhraseWeight : Weight
         {
             private readonly PhraseQuery outerInstance;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/PhraseQueue.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/PhraseQueue.cs b/src/Lucene.Net/Search/PhraseQueue.cs
index 0f8aa00..abec407 100644
--- a/src/Lucene.Net/Search/PhraseQueue.cs
+++ b/src/Lucene.Net/Search/PhraseQueue.cs
@@ -1,5 +1,4 @@
 using Lucene.Net.Util;
-using System;
 
 namespace Lucene.Net.Search
 {
@@ -20,9 +19,6 @@ namespace Lucene.Net.Search
      * limitations under the License.
      */
 
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     internal sealed class PhraseQueue : PriorityQueue<PhrasePositions>
     {
         internal PhraseQueue(int size)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/PositiveScoresOnlyCollector.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/PositiveScoresOnlyCollector.cs b/src/Lucene.Net/Search/PositiveScoresOnlyCollector.cs
index 8f5c289..fff5e72 100644
--- a/src/Lucene.Net/Search/PositiveScoresOnlyCollector.cs
+++ b/src/Lucene.Net/Search/PositiveScoresOnlyCollector.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search
 {
     /*
@@ -26,9 +24,6 @@ namespace Lucene.Net.Search
     /// <see cref="ICollector"/> and makes sure only documents with
     /// scores &gt; 0 are collected.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class PositiveScoresOnlyCollector : ICollector
     {
         private readonly ICollector c;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/PrefixFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/PrefixFilter.cs b/src/Lucene.Net/Search/PrefixFilter.cs
index 7f39e69..98c32c5 100644
--- a/src/Lucene.Net/Search/PrefixFilter.cs
+++ b/src/Lucene.Net/Search/PrefixFilter.cs
@@ -1,4 +1,3 @@
-using System;
 using System.Text;
 
 namespace Lucene.Net.Search
@@ -26,9 +25,6 @@ namespace Lucene.Net.Search
     /// A <see cref="Filter"/> that restricts search results to values that have a matching prefix in a given
     /// field.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class PrefixFilter : MultiTermQueryWrapperFilter<PrefixQuery>
     {
         public PrefixFilter(Term prefix)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/PrefixQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/PrefixQuery.cs b/src/Lucene.Net/Search/PrefixQuery.cs
index 6db8c34..950cca2 100644
--- a/src/Lucene.Net/Search/PrefixQuery.cs
+++ b/src/Lucene.Net/Search/PrefixQuery.cs
@@ -34,9 +34,6 @@ namespace Lucene.Net.Search
     /// <see cref="MultiTermQuery.CONSTANT_SCORE_AUTO_REWRITE_DEFAULT"/>
     /// rewrite method.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class PrefixQuery : MultiTermQuery
     {
         private readonly Term _prefix;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/PrefixTermsEnum.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/PrefixTermsEnum.cs b/src/Lucene.Net/Search/PrefixTermsEnum.cs
index 12888b0..8053957 100644
--- a/src/Lucene.Net/Search/PrefixTermsEnum.cs
+++ b/src/Lucene.Net/Search/PrefixTermsEnum.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search
 {
     /*
@@ -31,9 +29,6 @@ namespace Lucene.Net.Search
     /// <see cref="TermsEnum.Comparer"/>.  Each term in the enumeration is
     /// greater than all that precede it.</para>
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class PrefixTermsEnum : FilteredTermsEnum
     {
         private readonly BytesRef prefixRef;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/QueryRescorer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/QueryRescorer.cs b/src/Lucene.Net/Search/QueryRescorer.cs
index d434881..0d64d19 100644
--- a/src/Lucene.Net/Search/QueryRescorer.cs
+++ b/src/Lucene.Net/Search/QueryRescorer.cs
@@ -29,9 +29,6 @@ namespace Lucene.Net.Search
     /// <para/>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public abstract class QueryRescorer : Rescorer
     {
         private readonly Query query;
@@ -126,9 +123,6 @@ namespace Lucene.Net.Search
             return new TopDocs(firstPassTopDocs.TotalHits, hits, hits[0].Score);
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class ComparerAnonymousInnerClassHelper : IComparer<ScoreDoc>
         {
             private readonly QueryRescorer outerInstance;
@@ -144,9 +138,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class ComparerAnonymousInnerClassHelper2 : IComparer<ScoreDoc>
         {
             private readonly QueryRescorer outerInstance;
@@ -222,9 +213,6 @@ namespace Lucene.Net.Search
             return new QueryRescorerAnonymousInnerClassHelper(query, weight).Rescore(searcher, topDocs, topN);
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class QueryRescorerAnonymousInnerClassHelper : QueryRescorer
         {
             private double weight;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/QueryWrapperFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/QueryWrapperFilter.cs b/src/Lucene.Net/Search/QueryWrapperFilter.cs
index 727291f..80390ca 100644
--- a/src/Lucene.Net/Search/QueryWrapperFilter.cs
+++ b/src/Lucene.Net/Search/QueryWrapperFilter.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search
 {
     /*
@@ -31,9 +29,6 @@ namespace Lucene.Net.Search
     /// <c>CachingWrapperFilter(QueryWrapperFilter)</c> that matches, e.g., only documents modified
     /// within the last week.  This would only need to be reconstructed once per day.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class QueryWrapperFilter : Filter
     {
         private readonly Query query;
@@ -69,9 +64,6 @@ namespace Lucene.Net.Search
             return new DocIdSetAnonymousInnerClassHelper(this, acceptDocs, privateContext, weight);
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class DocIdSetAnonymousInnerClassHelper : DocIdSet
         {
             private readonly QueryWrapperFilter outerInstance;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/ReferenceManager.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/ReferenceManager.cs b/src/Lucene.Net/Search/ReferenceManager.cs
index 0d58f11..25b8705 100644
--- a/src/Lucene.Net/Search/ReferenceManager.cs
+++ b/src/Lucene.Net/Search/ReferenceManager.cs
@@ -35,9 +35,6 @@ namespace Lucene.Net.Search
     /// </summary>
     /// <typeparam name="G">The concrete type that will be <see cref="Acquire()"/>d and
     ///          <see cref="Release(G)"/>d.</typeparam>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public abstract class ReferenceManager<G> : IDisposable
         where G : class //Make G nullable
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/RegexpQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/RegexpQuery.cs b/src/Lucene.Net/Search/RegexpQuery.cs
index 7981730..237301d 100644
--- a/src/Lucene.Net/Search/RegexpQuery.cs
+++ b/src/Lucene.Net/Search/RegexpQuery.cs
@@ -49,9 +49,6 @@ namespace Lucene.Net.Search
     /// @lucene.experimental
     /// </summary>
     /// <seealso cref="RegExp"/>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class RegexpQuery : AutomatonQuery
     {
         /// <summary>
@@ -59,9 +56,6 @@ namespace Lucene.Net.Search
         /// </summary>
         private static readonly IAutomatonProvider defaultProvider = new AutomatonProviderAnonymousInnerClassHelper();
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class AutomatonProviderAnonymousInnerClassHelper : IAutomatonProvider
         {
             public Automaton GetAutomaton(string name)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/ReqExclScorer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/ReqExclScorer.cs b/src/Lucene.Net/Search/ReqExclScorer.cs
index dac790c..e3ec90b 100644
--- a/src/Lucene.Net/Search/ReqExclScorer.cs
+++ b/src/Lucene.Net/Search/ReqExclScorer.cs
@@ -1,4 +1,3 @@
-using System;
 using System.Collections.Generic;
 
 namespace Lucene.Net.Search
@@ -27,9 +26,6 @@ namespace Lucene.Net.Search
     /// This <see cref="Scorer"/> implements <see cref="DocIdSetIterator.Advance(int)"/>,
     /// and it uses the SkipTo() on the given scorers.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     internal class ReqExclScorer : Scorer
     {
         private Scorer reqScorer;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/ReqOptSumScorer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/ReqOptSumScorer.cs b/src/Lucene.Net/Search/ReqOptSumScorer.cs
index af31188..aa662a2 100644
--- a/src/Lucene.Net/Search/ReqOptSumScorer.cs
+++ b/src/Lucene.Net/Search/ReqOptSumScorer.cs
@@ -1,4 +1,3 @@
-using System;
 using System.Collections.Generic;
 using System.Diagnostics;
 
@@ -27,9 +26,6 @@ namespace Lucene.Net.Search
     /// <para/>
     /// This <see cref="Scorer"/> implements <see cref="DocIdSetIterator.Advance(int)"/>.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     internal class ReqOptSumScorer : Scorer
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Rescorer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Rescorer.cs b/src/Lucene.Net/Search/Rescorer.cs
index 72841fb..a602ae7 100644
--- a/src/Lucene.Net/Search/Rescorer.cs
+++ b/src/Lucene.Net/Search/Rescorer.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search
 {
     /*
@@ -34,9 +32,7 @@ namespace Lucene.Net.Search
     /// <para/>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
+
     public abstract class Rescorer
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/ScoreCachingWrappingScorer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/ScoreCachingWrappingScorer.cs b/src/Lucene.Net/Search/ScoreCachingWrappingScorer.cs
index d643e50..1c4f894 100644
--- a/src/Lucene.Net/Search/ScoreCachingWrappingScorer.cs
+++ b/src/Lucene.Net/Search/ScoreCachingWrappingScorer.cs
@@ -1,4 +1,3 @@
-using System;
 using System.Collections.Generic;
 
 namespace Lucene.Net.Search
@@ -32,9 +31,6 @@ namespace Lucene.Net.Search
     /// several places, however all they have in hand is a <see cref="Scorer"/> object, and
     /// might end up computing the score of a document more than once.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class ScoreCachingWrappingScorer : Scorer
     {
         private readonly Scorer scorer;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/ScoreDoc.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/ScoreDoc.cs b/src/Lucene.Net/Search/ScoreDoc.cs
index 2cfc1d7..ebe8d8b 100644
--- a/src/Lucene.Net/Search/ScoreDoc.cs
+++ b/src/Lucene.Net/Search/ScoreDoc.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search
 {
     /*
@@ -21,9 +19,6 @@ namespace Lucene.Net.Search
 
     /// <summary>
     /// Holds one hit in <see cref="TopDocs"/>. </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class ScoreDoc
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Scorer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Scorer.cs b/src/Lucene.Net/Search/Scorer.cs
index c8ad66b..8cf46d3 100644
--- a/src/Lucene.Net/Search/Scorer.cs
+++ b/src/Lucene.Net/Search/Scorer.cs
@@ -1,4 +1,3 @@
-using System;
 using System.Collections.Generic;
 
 namespace Lucene.Net.Search
@@ -41,9 +40,6 @@ namespace Lucene.Net.Search
     /// with these scores.
     /// </para>
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public abstract class Scorer : DocsEnum
     {
         /// <summary>
@@ -96,9 +92,6 @@ namespace Lucene.Net.Search
         /// <para/>
         /// @lucene.experimental
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public class ChildScorer
         {
             /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/ScoringRewrite.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/ScoringRewrite.cs b/src/Lucene.Net/Search/ScoringRewrite.cs
index 4f67ba8..b928086 100644
--- a/src/Lucene.Net/Search/ScoringRewrite.cs
+++ b/src/Lucene.Net/Search/ScoringRewrite.cs
@@ -38,9 +38,6 @@ namespace Lucene.Net.Search
     /// <para/>
     /// @lucene.internal - Only public to be accessible by spans package.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public abstract class ScoringRewrite<Q> : TermCollectingRewrite<Q> where Q : Query
     {
         /// <summary>
@@ -59,9 +56,6 @@ namespace Lucene.Net.Search
         ///  <seealso cref="MultiTermQuery.MultiTermRewriteMethod"/>
         public static readonly ScoringRewrite<BooleanQuery> SCORING_BOOLEAN_QUERY_REWRITE = new ScoringRewriteAnonymousInnerClassHelper();
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class ScoringRewriteAnonymousInnerClassHelper : ScoringRewrite<BooleanQuery>
         {
             public ScoringRewriteAnonymousInnerClassHelper()
@@ -102,9 +96,6 @@ namespace Lucene.Net.Search
         /// <seealso cref="MultiTermQuery.MultiTermRewriteMethod"/>
         public static readonly RewriteMethod CONSTANT_SCORE_BOOLEAN_QUERY_REWRITE = new RewriteMethodAnonymousInnerClassHelper();
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class RewriteMethodAnonymousInnerClassHelper : RewriteMethod
         {
             public RewriteMethodAnonymousInnerClassHelper()
@@ -150,9 +141,6 @@ namespace Lucene.Net.Search
             return result;
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         internal sealed class ParallelArraysTermCollector : TermCollector
         {
             internal void InitializeInstanceFields()
@@ -206,9 +194,6 @@ namespace Lucene.Net.Search
 
         /// <summary>
         /// Special implementation of <see cref="BytesRefHash.BytesStartArray"/> that keeps parallel arrays for boost and docFreq </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         internal sealed class TermFreqBoostByteStart : BytesRefHash.DirectBytesStartArray
         {
             internal float[] boost;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/SearcherFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/SearcherFactory.cs b/src/Lucene.Net/Search/SearcherFactory.cs
index 6ddb386..89e0704 100644
--- a/src/Lucene.Net/Search/SearcherFactory.cs
+++ b/src/Lucene.Net/Search/SearcherFactory.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search
 {
     /*
@@ -44,9 +42,6 @@ namespace Lucene.Net.Search
     /// </list>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class SearcherFactory
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/SearcherLifetimeManager.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/SearcherLifetimeManager.cs b/src/Lucene.Net/Search/SearcherLifetimeManager.cs
index 7c51a58..062b673 100644
--- a/src/Lucene.Net/Search/SearcherLifetimeManager.cs
+++ b/src/Lucene.Net/Search/SearcherLifetimeManager.cs
@@ -99,16 +99,11 @@ namespace Lucene.Net.Search
     /// window.  Still you should budget plenty of heap in the
     /// runtime to have a good safety margin.</para>
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
+
     public class SearcherLifetimeManager : IDisposable
     {
         internal const double NANOS_PER_SEC = 1000000000.0;
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private sealed class SearcherTracker : IComparable<SearcherTracker>, IDisposable
         {
             public IndexSearcher Searcher { get; private set; }
@@ -240,9 +235,6 @@ namespace Lucene.Net.Search
         /// more than the specified seconds, than the newest
         /// searcher.
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public sealed class PruneByAge : IPruner
         {
             private readonly double maxAgeSec;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/SearcherManager.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/SearcherManager.cs b/src/Lucene.Net/Search/SearcherManager.cs
index b86743d..b6a7b90 100644
--- a/src/Lucene.Net/Search/SearcherManager.cs
+++ b/src/Lucene.Net/Search/SearcherManager.cs
@@ -58,9 +58,6 @@ namespace Lucene.Net.Search
     /// @lucene.experimental
     /// </summary>
     /// <seealso cref="SearcherFactory"/>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public sealed class SearcherManager : ReferenceManager<IndexSearcher>
     {
         private readonly SearcherFactory searcherFactory;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/AfterEffect.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/AfterEffect.cs b/src/Lucene.Net/Search/Similarities/AfterEffect.cs
index 560da03..3ce318a 100644
--- a/src/Lucene.Net/Search/Similarities/AfterEffect.cs
+++ b/src/Lucene.Net/Search/Similarities/AfterEffect.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search.Similarities
 {
     /*
@@ -29,9 +27,6 @@ namespace Lucene.Net.Search.Similarities
     /// @lucene.experimental 
     /// </summary>
     /// <seealso cref="DFRSimilarity"/>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public abstract class AfterEffect
     {
         /// <summary>
@@ -52,9 +47,6 @@ namespace Lucene.Net.Search.Similarities
 
         /// <summary>
         /// Implementation used when there is no aftereffect. </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public sealed class NoAfterEffect : AfterEffect
         {
             /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/AfterEffectB.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/AfterEffectB.cs b/src/Lucene.Net/Search/Similarities/AfterEffectB.cs
index e50aa01..980b9bd 100644
--- a/src/Lucene.Net/Search/Similarities/AfterEffectB.cs
+++ b/src/Lucene.Net/Search/Similarities/AfterEffectB.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search.Similarities
 {
     /*
@@ -24,9 +22,6 @@ namespace Lucene.Net.Search.Similarities
     /// <para/>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class AfterEffectB : AfterEffect
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/AfterEffectL.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/AfterEffectL.cs b/src/Lucene.Net/Search/Similarities/AfterEffectL.cs
index 80244b8..7db1e35 100644
--- a/src/Lucene.Net/Search/Similarities/AfterEffectL.cs
+++ b/src/Lucene.Net/Search/Similarities/AfterEffectL.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search.Similarities
 {
     /*
@@ -24,9 +22,6 @@ namespace Lucene.Net.Search.Similarities
     /// <para/>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class AfterEffectL : AfterEffect
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/BM25Similarity.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/BM25Similarity.cs b/src/Lucene.Net/Search/Similarities/BM25Similarity.cs
index 8f920e0..6b29f59 100644
--- a/src/Lucene.Net/Search/Similarities/BM25Similarity.cs
+++ b/src/Lucene.Net/Search/Similarities/BM25Similarity.cs
@@ -33,9 +33,6 @@ namespace Lucene.Net.Search.Similarities
     /// <para/>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class BM25Similarity : Similarity
     {
         private readonly float k1;
@@ -245,9 +242,6 @@ namespace Lucene.Net.Search.Similarities
             return new BM25DocScorer(this, bm25stats, context.AtomicReader.GetNormValues(bm25stats.Field));
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class BM25DocScorer : SimScorer
         {
             private readonly BM25Similarity outerInstance;
@@ -291,9 +285,6 @@ namespace Lucene.Net.Search.Similarities
 
         /// <summary>
         /// Collection statistics for the BM25 model. </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class BM25Stats : SimWeight
         {
             /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/BasicModel.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/BasicModel.cs b/src/Lucene.Net/Search/Similarities/BasicModel.cs
index 28365de..0d2396d 100644
--- a/src/Lucene.Net/Search/Similarities/BasicModel.cs
+++ b/src/Lucene.Net/Search/Similarities/BasicModel.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search.Similarities
 {
     /*
@@ -28,9 +26,6 @@ namespace Lucene.Net.Search.Similarities
     /// @lucene.experimental
     /// </summary>
     /// <seealso cref="DFRSimilarity"/>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public abstract class BasicModel
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/BasicModelBE.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/BasicModelBE.cs b/src/Lucene.Net/Search/Similarities/BasicModelBE.cs
index b0da29a..a1f7a2e 100644
--- a/src/Lucene.Net/Search/Similarities/BasicModelBE.cs
+++ b/src/Lucene.Net/Search/Similarities/BasicModelBE.cs
@@ -31,9 +31,6 @@ namespace Lucene.Net.Search.Similarities
     /// geometric approximation (<see cref="BasicModelG"/>) instead, which provides the same relevance
     /// but with less practical problems.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class BasicModelBE : BasicModel
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/BasicModelD.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/BasicModelD.cs b/src/Lucene.Net/Search/Similarities/BasicModelD.cs
index fc5f4d7..10c520f 100644
--- a/src/Lucene.Net/Search/Similarities/BasicModelD.cs
+++ b/src/Lucene.Net/Search/Similarities/BasicModelD.cs
@@ -32,9 +32,6 @@ namespace Lucene.Net.Search.Similarities
     /// <para/>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class BasicModelD : BasicModel
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/BasicModelG.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/BasicModelG.cs b/src/Lucene.Net/Search/Similarities/BasicModelG.cs
index d95b2ec..b171e1b 100644
--- a/src/Lucene.Net/Search/Similarities/BasicModelG.cs
+++ b/src/Lucene.Net/Search/Similarities/BasicModelG.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search.Similarities
 {
     /*
@@ -26,9 +24,6 @@ namespace Lucene.Net.Search.Similarities
     /// <para/>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class BasicModelG : BasicModel
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/BasicModelIF.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/BasicModelIF.cs b/src/Lucene.Net/Search/Similarities/BasicModelIF.cs
index 3bf3a8e..4817a5a 100644
--- a/src/Lucene.Net/Search/Similarities/BasicModelIF.cs
+++ b/src/Lucene.Net/Search/Similarities/BasicModelIF.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search.Similarities
 {
     /*
@@ -24,9 +22,6 @@ namespace Lucene.Net.Search.Similarities
     /// <para/>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class BasicModelIF : BasicModel
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/BasicModelIn.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/BasicModelIn.cs b/src/Lucene.Net/Search/Similarities/BasicModelIn.cs
index fac653a..13461bd 100644
--- a/src/Lucene.Net/Search/Similarities/BasicModelIn.cs
+++ b/src/Lucene.Net/Search/Similarities/BasicModelIn.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search.Similarities
 {
     /*
@@ -24,9 +22,6 @@ namespace Lucene.Net.Search.Similarities
     /// <para/>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class BasicModelIn : BasicModel
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/BasicModelIne.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/BasicModelIne.cs b/src/Lucene.Net/Search/Similarities/BasicModelIne.cs
index 25047b7..4c36f33 100644
--- a/src/Lucene.Net/Search/Similarities/BasicModelIne.cs
+++ b/src/Lucene.Net/Search/Similarities/BasicModelIne.cs
@@ -25,9 +25,6 @@ namespace Lucene.Net.Search.Similarities
     /// <para/>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class BasicModelIne : BasicModel
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/BasicModelP.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/BasicModelP.cs b/src/Lucene.Net/Search/Similarities/BasicModelP.cs
index c42cfd3..fcafa38 100644
--- a/src/Lucene.Net/Search/Similarities/BasicModelP.cs
+++ b/src/Lucene.Net/Search/Similarities/BasicModelP.cs
@@ -28,9 +28,6 @@ namespace Lucene.Net.Search.Similarities
     /// (e.g. stopwords), this model may give poor performance, such as
     /// abnormally high scores for low tf values.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class BasicModelP : BasicModel
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/BasicStats.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/BasicStats.cs b/src/Lucene.Net/Search/Similarities/BasicStats.cs
index e16fdec..298fabc 100644
--- a/src/Lucene.Net/Search/Similarities/BasicStats.cs
+++ b/src/Lucene.Net/Search/Similarities/BasicStats.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search.Similarities
 {
     /*
@@ -24,9 +22,6 @@ namespace Lucene.Net.Search.Similarities
     /// <para/>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class BasicStats : Similarity.SimWeight
     {
         private readonly string field;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/DFRSimilarity.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/DFRSimilarity.cs b/src/Lucene.Net/Search/Similarities/DFRSimilarity.cs
index be52875..016b0a4 100644
--- a/src/Lucene.Net/Search/Similarities/DFRSimilarity.cs
+++ b/src/Lucene.Net/Search/Similarities/DFRSimilarity.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search.Similarities
 {
     /*
@@ -85,9 +83,6 @@ namespace Lucene.Net.Search.Similarities
     /// <seealso cref="Similarities.BasicModel"/>
     /// <seealso cref="Similarities.AfterEffect"/>
     /// <seealso cref="Similarities.Normalization"/>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class DFRSimilarity : SimilarityBase
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/DefaultSimilarity.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/DefaultSimilarity.cs b/src/Lucene.Net/Search/Similarities/DefaultSimilarity.cs
index a0b297f..4b7b693 100644
--- a/src/Lucene.Net/Search/Similarities/DefaultSimilarity.cs
+++ b/src/Lucene.Net/Search/Similarities/DefaultSimilarity.cs
@@ -44,9 +44,6 @@ namespace Lucene.Net.Search.Similarities
     /// Last, note that search time is too late to modify this <i>norm</i> part of
     /// scoring, e.g. by using a different <see cref="Similarity"/> for search.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class DefaultSimilarity : TFIDFSimilarity
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/Distribution.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/Distribution.cs b/src/Lucene.Net/Search/Similarities/Distribution.cs
index ee92b13..ab55bb8 100644
--- a/src/Lucene.Net/Search/Similarities/Distribution.cs
+++ b/src/Lucene.Net/Search/Similarities/Distribution.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search.Similarities
 {
     /*
@@ -26,9 +24,6 @@ namespace Lucene.Net.Search.Similarities
     /// @lucene.experimental
     /// </summary>
     /// <seealso cref="IBSimilarity"/>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public abstract class Distribution
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/DistributionLL.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/DistributionLL.cs b/src/Lucene.Net/Search/Similarities/DistributionLL.cs
index ed8ddea..1acc43b 100644
--- a/src/Lucene.Net/Search/Similarities/DistributionLL.cs
+++ b/src/Lucene.Net/Search/Similarities/DistributionLL.cs
@@ -26,9 +26,6 @@ namespace Lucene.Net.Search.Similarities
     /// preference to a specific base.</para>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class DistributionLL : Distribution
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/DistributionSPL.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/DistributionSPL.cs b/src/Lucene.Net/Search/Similarities/DistributionSPL.cs
index ade1b05..d694120 100644
--- a/src/Lucene.Net/Search/Similarities/DistributionSPL.cs
+++ b/src/Lucene.Net/Search/Similarities/DistributionSPL.cs
@@ -27,9 +27,6 @@ namespace Lucene.Net.Search.Similarities
     /// preference to a specific base.</para>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class DistributionSPL : Distribution
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/IBSimilarity.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/IBSimilarity.cs b/src/Lucene.Net/Search/Similarities/IBSimilarity.cs
index 19223ee..2923723 100644
--- a/src/Lucene.Net/Search/Similarities/IBSimilarity.cs
+++ b/src/Lucene.Net/Search/Similarities/IBSimilarity.cs
@@ -1,5 +1,4 @@
 using Lucene.Net.Support;
-using System;
 
 namespace Lucene.Net.Search.Similarities
 {
@@ -81,9 +80,6 @@ namespace Lucene.Net.Search.Similarities
     /// </summary>
     /// <seealso cref="DFRSimilarity"/>
     [ExceptionToClassNameConvention]
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class IBSimilarity : SimilarityBase
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/LMDirichletSimilarity.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/LMDirichletSimilarity.cs b/src/Lucene.Net/Search/Similarities/LMDirichletSimilarity.cs
index 322f77b..5192fbe 100644
--- a/src/Lucene.Net/Search/Similarities/LMDirichletSimilarity.cs
+++ b/src/Lucene.Net/Search/Similarities/LMDirichletSimilarity.cs
@@ -36,9 +36,6 @@ namespace Lucene.Net.Search.Similarities
     ///
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class LMDirichletSimilarity : LMSimilarity
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/LMJelinekMercerSimilarity.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/LMJelinekMercerSimilarity.cs b/src/Lucene.Net/Search/Similarities/LMJelinekMercerSimilarity.cs
index 108f0d0..e1ba50f 100644
--- a/src/Lucene.Net/Search/Similarities/LMJelinekMercerSimilarity.cs
+++ b/src/Lucene.Net/Search/Similarities/LMJelinekMercerSimilarity.cs
@@ -33,9 +33,6 @@ namespace Lucene.Net.Search.Similarities
     ///
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class LMJelinekMercerSimilarity : LMSimilarity
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/LMSimilarity.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/LMSimilarity.cs b/src/Lucene.Net/Search/Similarities/LMSimilarity.cs
index 3be8cec..36c399e 100644
--- a/src/Lucene.Net/Search/Similarities/LMSimilarity.cs
+++ b/src/Lucene.Net/Search/Similarities/LMSimilarity.cs
@@ -1,5 +1,4 @@
 using System.Globalization;
-using System;
 
 namespace Lucene.Net.Search.Similarities
 {
@@ -35,9 +34,6 @@ namespace Lucene.Net.Search.Similarities
     /// <para/>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public abstract class LMSimilarity : SimilarityBase
     {
         /// <summary>
@@ -107,9 +103,6 @@ namespace Lucene.Net.Search.Similarities
 
         /// <summary>
         /// Stores the collection distribution of the current term. </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public class LMStats : BasicStats
         {
             /// <summary>
@@ -160,9 +153,6 @@ namespace Lucene.Net.Search.Similarities
         /// Models <c>p(w|C)</c> as the number of occurrences of the term in the
         /// collection, divided by the total number of tokens <c>+ 1</c>.
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public class DefaultCollectionModel : ICollectionModel
         {
             /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/Lambda.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/Lambda.cs b/src/Lucene.Net/Search/Similarities/Lambda.cs
index 12d1976..f82b1ef 100644
--- a/src/Lucene.Net/Search/Similarities/Lambda.cs
+++ b/src/Lucene.Net/Search/Similarities/Lambda.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search.Similarities
 {
     /*
@@ -26,9 +24,6 @@ namespace Lucene.Net.Search.Similarities
     /// @lucene.experimental
     /// </summary>
     /// <seealso cref="IBSimilarity"/> 
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public abstract class Lambda
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/LambdaDF.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/LambdaDF.cs b/src/Lucene.Net/Search/Similarities/LambdaDF.cs
index 49404f6..d1678b0 100644
--- a/src/Lucene.Net/Search/Similarities/LambdaDF.cs
+++ b/src/Lucene.Net/Search/Similarities/LambdaDF.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search.Similarities
 {
     /*
@@ -24,9 +22,6 @@ namespace Lucene.Net.Search.Similarities
     /// <para/>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class LambdaDF : Lambda
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/LambdaTTF.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/LambdaTTF.cs b/src/Lucene.Net/Search/Similarities/LambdaTTF.cs
index f65705b..a87884a 100644
--- a/src/Lucene.Net/Search/Similarities/LambdaTTF.cs
+++ b/src/Lucene.Net/Search/Similarities/LambdaTTF.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search.Similarities
 {
     /*
@@ -24,9 +22,6 @@ namespace Lucene.Net.Search.Similarities
     /// <para/>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class LambdaTTF : Lambda
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/MultiSimilarity.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/MultiSimilarity.cs b/src/Lucene.Net/Search/Similarities/MultiSimilarity.cs
index 49fb5d9..2704feb 100644
--- a/src/Lucene.Net/Search/Similarities/MultiSimilarity.cs
+++ b/src/Lucene.Net/Search/Similarities/MultiSimilarity.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search.Similarities
 {
     /*
@@ -30,9 +28,6 @@ namespace Lucene.Net.Search.Similarities
     /// <para/>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class MultiSimilarity : Similarity
     {
         /// <summary>
@@ -73,9 +68,6 @@ namespace Lucene.Net.Search.Similarities
             return new MultiSimScorer(subScorers);
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         internal class MultiSimScorer : SimScorer
         {
             private readonly SimScorer[] subScorers;
@@ -116,9 +108,6 @@ namespace Lucene.Net.Search.Similarities
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         internal class MultiStats : SimWeight
         {
             internal readonly SimWeight[] subStats;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/Normalization.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/Normalization.cs b/src/Lucene.Net/Search/Similarities/Normalization.cs
index c80158e..3328f9e 100644
--- a/src/Lucene.Net/Search/Similarities/Normalization.cs
+++ b/src/Lucene.Net/Search/Similarities/Normalization.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search.Similarities
 {
     /*
@@ -26,9 +24,6 @@ namespace Lucene.Net.Search.Similarities
     /// @lucene.experimental
     /// </summary>
     /// <seealso cref="DFRSimilarity"/>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public abstract class Normalization
     {
         /// <summary>
@@ -64,9 +59,6 @@ namespace Lucene.Net.Search.Similarities
 
         /// <summary>
         /// Implementation used when there is no normalization. </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public sealed class NoNormalization : Normalization
         {
             /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/NormalizationH1.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/NormalizationH1.cs b/src/Lucene.Net/Search/Similarities/NormalizationH1.cs
index 6a0a160..f4ba5ec 100644
--- a/src/Lucene.Net/Search/Similarities/NormalizationH1.cs
+++ b/src/Lucene.Net/Search/Similarities/NormalizationH1.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search.Similarities
 {
     /*
@@ -29,9 +27,6 @@ namespace Lucene.Net.Search.Similarities
     /// The default value for the <c>c</c> parameter is <c>1</c>.</para>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class NormalizationH1 : Normalization
     {
         private readonly float c;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/NormalizationH2.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/NormalizationH2.cs b/src/Lucene.Net/Search/Similarities/NormalizationH2.cs
index 2a43ec5..a546edd 100644
--- a/src/Lucene.Net/Search/Similarities/NormalizationH2.cs
+++ b/src/Lucene.Net/Search/Similarities/NormalizationH2.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search.Similarities
 {
     /*
@@ -29,9 +27,6 @@ namespace Lucene.Net.Search.Similarities
     /// The default value for the <c>c</c> parameter is <c>1</c>.</para>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class NormalizationH2 : Normalization
     {
         private readonly float c;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/NormalizationH3.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/NormalizationH3.cs b/src/Lucene.Net/Search/Similarities/NormalizationH3.cs
index 82d8f40..6afa558 100644
--- a/src/Lucene.Net/Search/Similarities/NormalizationH3.cs
+++ b/src/Lucene.Net/Search/Similarities/NormalizationH3.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search.Similarities
 {
     /*
@@ -24,9 +22,6 @@ namespace Lucene.Net.Search.Similarities
     /// <para/>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class NormalizationH3 : Normalization
     {
         private readonly float mu;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/NormalizationZ.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/NormalizationZ.cs b/src/Lucene.Net/Search/Similarities/NormalizationZ.cs
index 4eef520..582a92d 100644
--- a/src/Lucene.Net/Search/Similarities/NormalizationZ.cs
+++ b/src/Lucene.Net/Search/Similarities/NormalizationZ.cs
@@ -24,9 +24,6 @@ namespace Lucene.Net.Search.Similarities
     /// <para/>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class NormalizationZ : Normalization
     {
         internal readonly float z;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/PerFieldSimilarityWrapper.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/PerFieldSimilarityWrapper.cs b/src/Lucene.Net/Search/Similarities/PerFieldSimilarityWrapper.cs
index 27d327b..9e35e26 100644
--- a/src/Lucene.Net/Search/Similarities/PerFieldSimilarityWrapper.cs
+++ b/src/Lucene.Net/Search/Similarities/PerFieldSimilarityWrapper.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search.Similarities
 {
     /*
@@ -30,9 +28,6 @@ namespace Lucene.Net.Search.Similarities
     /// <para/>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public abstract class PerFieldSimilarityWrapper : Similarity
     {
         /// <summary>
@@ -67,9 +62,6 @@ namespace Lucene.Net.Search.Similarities
         /// </summary>
         public abstract Similarity Get(string name);
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         internal class PerFieldSimWeight : SimWeight
         {
             internal Similarity @delegate;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/Similarity.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/Similarity.cs b/src/Lucene.Net/Search/Similarities/Similarity.cs
index 44cd6e0..6d3308b 100644
--- a/src/Lucene.Net/Search/Similarities/Similarity.cs
+++ b/src/Lucene.Net/Search/Similarities/Similarity.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search.Similarities
 {
     /*
@@ -96,9 +94,6 @@ namespace Lucene.Net.Search.Similarities
     /// </summary>
     /// <seealso cref="Lucene.Net.Index.IndexWriterConfig.Similarity"/>
     /// <seealso cref="IndexSearcher.Similarity"/>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public abstract class Similarity
     {
         /// <summary>
@@ -181,9 +176,6 @@ namespace Lucene.Net.Search.Similarities
         /// within-document frequency adjusted for "sloppiness" by
         /// <see cref="SimScorer.ComputeSlopFactor(int)"/>.
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public abstract class SimScorer
         {
             /// <summary>
@@ -228,9 +220,6 @@ namespace Lucene.Net.Search.Similarities
         /// subclass <see cref="SimWeight"/> and define the statistics they require in the
         /// subclass. Examples include idf, average field length, etc.
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public abstract class SimWeight
         {
             /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/SimilarityBase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/SimilarityBase.cs b/src/Lucene.Net/Search/Similarities/SimilarityBase.cs
index 68ba97a..98a3db6 100644
--- a/src/Lucene.Net/Search/Similarities/SimilarityBase.cs
+++ b/src/Lucene.Net/Search/Similarities/SimilarityBase.cs
@@ -41,9 +41,6 @@ namespace Lucene.Net.Search.Similarities
     /// <para/>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public abstract class SimilarityBase : Similarity
     {
         /// <summary>
@@ -294,9 +291,6 @@ namespace Lucene.Net.Search.Similarities
         /// <see cref="SimilarityBase.Explain(BasicStats, int, Explanation, float)"/>,
         /// respectively.
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class BasicSimScorer : SimScorer
         {
             private readonly SimilarityBase outerInstance;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Similarities/TFIDFSimilarity.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Similarities/TFIDFSimilarity.cs b/src/Lucene.Net/Search/Similarities/TFIDFSimilarity.cs
index ec8a0b8..f5315c0 100644
--- a/src/Lucene.Net/Search/Similarities/TFIDFSimilarity.cs
+++ b/src/Lucene.Net/Search/Similarities/TFIDFSimilarity.cs
@@ -1,5 +1,4 @@
 using Lucene.Net.Support;
-using System;
 
 namespace Lucene.Net.Search.Similarities
 {
@@ -477,9 +476,6 @@ namespace Lucene.Net.Search.Similarities
     /// </summary>
     /// <seealso cref="Lucene.Net.Index.IndexWriterConfig.Similarity"/>
     /// <seealso cref="IndexSearcher.Similarity"/>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public abstract class TFIDFSimilarity : Similarity
     {
         /// <summary>
@@ -672,9 +668,6 @@ namespace Lucene.Net.Search.Similarities
             return new TFIDFSimScorer(this, idfstats, context.AtomicReader.GetNormValues(idfstats.Field));
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private sealed class TFIDFSimScorer : SimScorer
         {
             private readonly TFIDFSimilarity outerInstance;
@@ -719,9 +712,6 @@ namespace Lucene.Net.Search.Similarities
         /// to this model is idf.
         /// </summary>
         [ExceptionToClassNameConvention]
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class IDFStats : SimWeight
         {
             internal string Field { get; private set; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/SloppyPhraseScorer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/SloppyPhraseScorer.cs b/src/Lucene.Net/Search/SloppyPhraseScorer.cs
index 7dcde13..564064d 100644
--- a/src/Lucene.Net/Search/SloppyPhraseScorer.cs
+++ b/src/Lucene.Net/Search/SloppyPhraseScorer.cs
@@ -27,9 +27,6 @@ namespace Lucene.Net.Search
     using Similarity = Lucene.Net.Search.Similarities.Similarity;
     using Term = Lucene.Net.Index.Term;
 
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     internal sealed class SloppyPhraseScorer : Scorer
     {
         private PhrasePositions min, max;
@@ -450,9 +447,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class ComparerAnonymousInnerClassHelper : IComparer<PhrasePositions>
         {
             private readonly SloppyPhraseScorer outerInstance;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Sort.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Sort.cs b/src/Lucene.Net/Search/Sort.cs
index 369f4bd..c149fea 100644
--- a/src/Lucene.Net/Search/Sort.cs
+++ b/src/Lucene.Net/Search/Sort.cs
@@ -1,5 +1,4 @@
 using Lucene.Net.Support;
-using System;
 using System.Text;
 
 namespace Lucene.Net.Search
@@ -97,9 +96,6 @@ namespace Lucene.Net.Search
     /// <para/>
     /// @since   lucene 1.4
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class Sort
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/SortField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/SortField.cs b/src/Lucene.Net/Search/SortField.cs
index c82423a..95130bd 100644
--- a/src/Lucene.Net/Search/SortField.cs
+++ b/src/Lucene.Net/Search/SortField.cs
@@ -33,9 +33,6 @@ namespace Lucene.Net.Search
     /// <para/>
     /// @since   lucene 1.4 </summary>
     /// <seealso cref="Sort"/>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class SortField
     {
         // LUCENENET NOTE: de-nested the Type enum and renamed to SortFieldType to avoid potential naming collisions with System.Type
@@ -174,9 +171,6 @@ namespace Lucene.Net.Search
         /// </summary>
         public static readonly object STRING_FIRST = new ObjectAnonymousInnerClassHelper();
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class ObjectAnonymousInnerClassHelper : object
         {
             public ObjectAnonymousInnerClassHelper()
@@ -195,9 +189,6 @@ namespace Lucene.Net.Search
         /// </summary>
         public static readonly object STRING_LAST = new ObjectAnonymousInnerClassHelper2();
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class ObjectAnonymousInnerClassHelper2 : object
         {
             public ObjectAnonymousInnerClassHelper2()

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/SortRescorer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/SortRescorer.cs b/src/Lucene.Net/Search/SortRescorer.cs
index 810f2ee..0329978 100644
--- a/src/Lucene.Net/Search/SortRescorer.cs
+++ b/src/Lucene.Net/Search/SortRescorer.cs
@@ -27,9 +27,7 @@ namespace Lucene.Net.Search
     /// A <see cref="Rescorer"/> that re-sorts according to a provided
     /// Sort.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
+
     public class SortRescorer : Rescorer
     {
         private readonly Sort sort;
@@ -90,9 +88,6 @@ namespace Lucene.Net.Search
             return collector.GetTopDocs();
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class ComparerAnonymousInnerClassHelper : IComparer<ScoreDoc>
         {
             private readonly SortRescorer outerInstance;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Spans/FieldMaskingSpanQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Spans/FieldMaskingSpanQuery.cs b/src/Lucene.Net/Search/Spans/FieldMaskingSpanQuery.cs
index feb70ae..be40aba 100644
--- a/src/Lucene.Net/Search/Spans/FieldMaskingSpanQuery.cs
+++ b/src/Lucene.Net/Search/Spans/FieldMaskingSpanQuery.cs
@@ -72,9 +72,6 @@ namespace Lucene.Net.Search.Spans
     /// but with the term statistics of the real field. This may lead to exceptions,
     /// poor performance, and unexpected scoring behavior.</para>
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class FieldMaskingSpanQuery : SpanQuery
     {
         private SpanQuery maskedQuery;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Spans/NearSpansOrdered.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Spans/NearSpansOrdered.cs b/src/Lucene.Net/Search/Spans/NearSpansOrdered.cs
index 9c606cb..489dd49 100644
--- a/src/Lucene.Net/Search/Spans/NearSpansOrdered.cs
+++ b/src/Lucene.Net/Search/Spans/NearSpansOrdered.cs
@@ -55,9 +55,6 @@ namespace Lucene.Net.Search.Spans
     /// Expert:
     /// Only public for subclassing.  Most implementations should not need this class
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class NearSpansOrdered : Spans
     {
         private readonly int allowedSlop;
@@ -83,9 +80,6 @@ namespace Lucene.Net.Search.Spans
         // perform better since it has a lower overhead than TimSorter for small arrays
         private readonly InPlaceMergeSorter sorter;
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class InPlaceMergeSorterAnonymousInnerClassHelper : InPlaceMergeSorter
         {
             private readonly NearSpansOrdered outerInstance;


Mime
View raw message