lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [11/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:29 GMT
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Index/TaskMergeScheduler.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/TaskMergeScheduler.cs b/src/Lucene.Net/Index/TaskMergeScheduler.cs
index 72cfc74..48733f4 100644
--- a/src/Lucene.Net/Index/TaskMergeScheduler.cs
+++ b/src/Lucene.Net/Index/TaskMergeScheduler.cs
@@ -38,9 +38,6 @@ namespace Lucene.Net.Index
     ///  
     /// LUCENENET specific
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class TaskMergeScheduler : MergeScheduler, IConcurrentMergeScheduler
     {
         public const string COMPONENT_NAME = "CMS";

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Index/TermState.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/TermState.cs b/src/Lucene.Net/Index/TermState.cs
index 5ecff88..3648fb4 100644
--- a/src/Lucene.Net/Index/TermState.cs
+++ b/src/Lucene.Net/Index/TermState.cs
@@ -27,9 +27,6 @@ namespace Lucene.Net.Index
     /// </summary>
     /// <seealso cref="TermsEnum.SeekExact(Lucene.Net.Util.BytesRef, TermState)"/>
     /// <seealso cref="TermsEnum.GetTermState()"/>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public abstract class TermState
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Index/TermVectorsConsumer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/TermVectorsConsumer.cs b/src/Lucene.Net/Index/TermVectorsConsumer.cs
index 4179cca..6d9de2d 100644
--- a/src/Lucene.Net/Index/TermVectorsConsumer.cs
+++ b/src/Lucene.Net/Index/TermVectorsConsumer.cs
@@ -30,9 +30,6 @@ namespace Lucene.Net.Index
     using RamUsageEstimator = Lucene.Net.Util.RamUsageEstimator;
     using TermVectorsWriter = Lucene.Net.Codecs.TermVectorsWriter;
 
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     internal sealed class TermVectorsConsumer : TermsHashConsumer
     {
         internal TermVectorsWriter writer;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Index/TermVectorsConsumerPerField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/TermVectorsConsumerPerField.cs b/src/Lucene.Net/Index/TermVectorsConsumerPerField.cs
index 68a036a..d27bed2 100644
--- a/src/Lucene.Net/Index/TermVectorsConsumerPerField.cs
+++ b/src/Lucene.Net/Index/TermVectorsConsumerPerField.cs
@@ -29,9 +29,6 @@ namespace Lucene.Net.Index
     using RamUsageEstimator = Lucene.Net.Util.RamUsageEstimator;
     using TermVectorsWriter = Lucene.Net.Codecs.TermVectorsWriter;
 
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     internal sealed class TermVectorsConsumerPerField : TermsHashConsumerPerField
     {
         internal readonly TermsHashPerField termsHashPerField;
@@ -331,9 +328,6 @@ namespace Lucene.Net.Index
             return new TermVectorsPostingsArray(size);
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         internal sealed class TermVectorsPostingsArray : ParallelPostingsArray
         {
             public TermVectorsPostingsArray(int size)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Index/Terms.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/Terms.cs b/src/Lucene.Net/Index/Terms.cs
index 288d09c..ee3b3fe 100644
--- a/src/Lucene.Net/Index/Terms.cs
+++ b/src/Lucene.Net/Index/Terms.cs
@@ -1,4 +1,3 @@
-using System;
 using System.Collections.Generic;
 
 namespace Lucene.Net.Index
@@ -28,9 +27,7 @@ namespace Lucene.Net.Index
     /// <para/>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
+
     public abstract class Terms
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Index/TermsEnum.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/TermsEnum.cs b/src/Lucene.Net/Index/TermsEnum.cs
index 61b6fc1..efe3f18 100644
--- a/src/Lucene.Net/Index/TermsEnum.cs
+++ b/src/Lucene.Net/Index/TermsEnum.cs
@@ -43,9 +43,6 @@ namespace Lucene.Net.Index
     /// <para/>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public abstract class TermsEnum : IBytesRefIterator
     {
         public abstract IComparer<BytesRef> Comparer { get; } // LUCENENET specific - must supply implementation for the interface

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Index/TermsHash.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/TermsHash.cs b/src/Lucene.Net/Index/TermsHash.cs
index d0a856c..2d3b93b 100644
--- a/src/Lucene.Net/Index/TermsHash.cs
+++ b/src/Lucene.Net/Index/TermsHash.cs
@@ -1,4 +1,3 @@
-using System;
 using System.Collections.Generic;
 
 namespace Lucene.Net.Index
@@ -34,9 +33,6 @@ namespace Lucene.Net.Index
     /// <see cref="TermVectorsConsumer"/>, write their own byte streams
     /// under each term.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     internal sealed class TermsHash : InvertedDocConsumer
     {
         internal readonly TermsHashConsumer consumer;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Index/TermsHashConsumer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/TermsHashConsumer.cs b/src/Lucene.Net/Index/TermsHashConsumer.cs
index cfecc98..946123d 100644
--- a/src/Lucene.Net/Index/TermsHashConsumer.cs
+++ b/src/Lucene.Net/Index/TermsHashConsumer.cs
@@ -1,4 +1,3 @@
-using System;
 using System.Collections.Generic;
 
 namespace Lucene.Net.Index
@@ -19,9 +18,7 @@ namespace Lucene.Net.Index
      * See the License for the specific language governing permissions and
      * limitations under the License.
      */
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
+
     internal abstract class TermsHashConsumer
     {
         public abstract void Flush(IDictionary<string, TermsHashConsumerPerField> fieldsToFlush, SegmentWriteState state);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Index/TermsHashConsumerPerField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/TermsHashConsumerPerField.cs b/src/Lucene.Net/Index/TermsHashConsumerPerField.cs
index f5972df..8174af3 100644
--- a/src/Lucene.Net/Index/TermsHashConsumerPerField.cs
+++ b/src/Lucene.Net/Index/TermsHashConsumerPerField.cs
@@ -1,5 +1,4 @@
 using Lucene.Net.Support;
-using System;
 
 namespace Lucene.Net.Index
 {
@@ -26,9 +25,6 @@ namespace Lucene.Net.Index
     /// table and provides an API for writing bytes into
     /// multiple streams for each unique <see cref="Analysis.Token"/>.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     internal abstract class TermsHashConsumerPerField
     {
         internal abstract bool Start(IIndexableField[] fields, int count);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Index/TermsHashPerField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/TermsHashPerField.cs b/src/Lucene.Net/Index/TermsHashPerField.cs
index 1769e38..49f572c 100644
--- a/src/Lucene.Net/Index/TermsHashPerField.cs
+++ b/src/Lucene.Net/Index/TermsHashPerField.cs
@@ -28,9 +28,6 @@ namespace Lucene.Net.Index
     using Counter = Lucene.Net.Util.Counter;
     using Int32BlockPool = Lucene.Net.Util.Int32BlockPool;
 
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     internal sealed class TermsHashPerField : InvertedDocConsumerPerField
     {
         private const int HASH_INIT_SIZE = 4;
@@ -338,9 +335,6 @@ namespace Lucene.Net.Index
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private sealed class PostingsBytesStartArray : BytesRefHash.BytesStartArray
         {
             private readonly TermsHashPerField perField;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Index/ThreadAffinityDocumentsWriterThreadPool.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/ThreadAffinityDocumentsWriterThreadPool.cs b/src/Lucene.Net/Index/ThreadAffinityDocumentsWriterThreadPool.cs
index 34b49ba..b7cfb6c 100644
--- a/src/Lucene.Net/Index/ThreadAffinityDocumentsWriterThreadPool.cs
+++ b/src/Lucene.Net/Index/ThreadAffinityDocumentsWriterThreadPool.cs
@@ -1,4 +1,3 @@
-using System;
 using System.Collections.Concurrent;
 using System.Collections.Generic;
 using System.Diagnostics;
@@ -35,9 +34,6 @@ namespace Lucene.Net.Index
     /// <see cref="ThreadAffinityDocumentsWriterThreadPool"/> tries to find the currently
     /// minimal contended <seea cref="ThreadState"/>.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     internal class ThreadAffinityDocumentsWriterThreadPool : DocumentsWriterPerThreadPool
     {
         private IDictionary<Thread, ThreadState> threadBindings = new ConcurrentDictionary<Thread, ThreadState>();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Index/TieredMergePolicy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/TieredMergePolicy.cs b/src/Lucene.Net/Index/TieredMergePolicy.cs
index 1fa5a72..fee0301 100644
--- a/src/Lucene.Net/Index/TieredMergePolicy.cs
+++ b/src/Lucene.Net/Index/TieredMergePolicy.cs
@@ -66,9 +66,7 @@ namespace Lucene.Net.Index
     //     merge is already running (under CMS) and then bias
     //     ourselves towards picking smaller merges if so (or,
     //     maybe CMS should do so)
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
+
     public class TieredMergePolicy : MergePolicy
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Index/TrackingIndexWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/TrackingIndexWriter.cs b/src/Lucene.Net/Index/TrackingIndexWriter.cs
index 8d02cf7..0edc941 100644
--- a/src/Lucene.Net/Index/TrackingIndexWriter.cs
+++ b/src/Lucene.Net/Index/TrackingIndexWriter.cs
@@ -1,5 +1,4 @@
 using Lucene.Net.Support;
-using System;
 using System.Collections.Generic;
 
 namespace Lucene.Net.Index
@@ -38,9 +37,7 @@ namespace Lucene.Net.Index
     /// <para/>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
+
     public class TrackingIndexWriter
     {
         private readonly IndexWriter writer;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Index/TwoPhaseCommitTool.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/TwoPhaseCommitTool.cs b/src/Lucene.Net/Index/TwoPhaseCommitTool.cs
index 06f0e76..5739c2b 100644
--- a/src/Lucene.Net/Index/TwoPhaseCommitTool.cs
+++ b/src/Lucene.Net/Index/TwoPhaseCommitTool.cs
@@ -28,9 +28,6 @@ namespace Lucene.Net.Index
     /// @lucene.experimental
     /// </summary>
     /// <seealso cref="ITwoPhaseCommit"/>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public sealed class TwoPhaseCommitTool
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Index/TwoStoredFieldsConsumers.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/TwoStoredFieldsConsumers.cs b/src/Lucene.Net/Index/TwoStoredFieldsConsumers.cs
index 7be6a56..e1fb40a 100644
--- a/src/Lucene.Net/Index/TwoStoredFieldsConsumers.cs
+++ b/src/Lucene.Net/Index/TwoStoredFieldsConsumers.cs
@@ -21,9 +21,6 @@ namespace Lucene.Net.Index
 
     /// <summary>
     /// Just switches between two <see cref="DocFieldConsumer"/>s. </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     internal class TwoStoredFieldsConsumers : StoredFieldsConsumer
     {
         private readonly StoredFieldsConsumer first;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Index/UpgradeIndexMergePolicy.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Index/UpgradeIndexMergePolicy.cs b/src/Lucene.Net/Index/UpgradeIndexMergePolicy.cs
index 7ec2912..b75fffa 100644
--- a/src/Lucene.Net/Index/UpgradeIndexMergePolicy.cs
+++ b/src/Lucene.Net/Index/UpgradeIndexMergePolicy.cs
@@ -48,9 +48,6 @@ namespace Lucene.Net.Index
     /// @lucene.experimental
     /// </summary>
     /// <seealso cref="IndexUpgrader"/>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class UpgradeIndexMergePolicy : MergePolicy
     {
         /// <summary>

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

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/BitsFilteredDocIdSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/BitsFilteredDocIdSet.cs b/src/Lucene.Net/Search/BitsFilteredDocIdSet.cs
index 9fedb4f..b31790f 100644
--- a/src/Lucene.Net/Search/BitsFilteredDocIdSet.cs
+++ b/src/Lucene.Net/Search/BitsFilteredDocIdSet.cs
@@ -29,9 +29,6 @@ namespace Lucene.Net.Search
     /// </summary>
     /// <seealso cref="DocIdSet"/>
     /// <seealso cref="Lucene.Net.Search.Filter"/>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public sealed class BitsFilteredDocIdSet : FilteredDocIdSet
     {
         private readonly IBits acceptDocs;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/BooleanQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/BooleanQuery.cs b/src/Lucene.Net/Search/BooleanQuery.cs
index bbf0699..fd5e3cc 100644
--- a/src/Lucene.Net/Search/BooleanQuery.cs
+++ b/src/Lucene.Net/Search/BooleanQuery.cs
@@ -245,9 +245,6 @@ namespace Lucene.Net.Search
         /// <para/>
         /// @lucene.experimental
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public class BooleanWeight : Weight
         {
             private readonly BooleanQuery outerInstance;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/BooleanScorer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/BooleanScorer.cs b/src/Lucene.Net/Search/BooleanScorer.cs
index 44a6986..dbc6774 100644
--- a/src/Lucene.Net/Search/BooleanScorer.cs
+++ b/src/Lucene.Net/Search/BooleanScorer.cs
@@ -1,4 +1,3 @@
-using System;
 using System.Collections.Generic;
 using System.Text;
 
@@ -58,9 +57,6 @@ namespace Lucene.Net.Search
     /// conjunction can reduce the number of priority queue
     /// updates for the optional terms.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     internal sealed class BooleanScorer : BulkScorer
     {
         private sealed class BooleanScorerCollector : ICollector

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/BooleanScorer2.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/BooleanScorer2.cs b/src/Lucene.Net/Search/BooleanScorer2.cs
index b7e56de..4984677 100644
--- a/src/Lucene.Net/Search/BooleanScorer2.cs
+++ b/src/Lucene.Net/Search/BooleanScorer2.cs
@@ -1,4 +1,3 @@
-using System;
 using System.Collections.Generic;
 using System.Linq;
 
@@ -32,18 +31,12 @@ namespace Lucene.Net.Search
     /// <para/>Implements SkipTo(), and has no limitations on the numbers of added scorers.
     /// <para/>Uses <see cref="ConjunctionScorer"/>, <see cref="DisjunctionScorer"/>, <see cref="ReqOptSumScorer"/> and <see cref="ReqExclScorer"/>.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     internal class BooleanScorer2 : Scorer
     {
         private readonly IList<Scorer> requiredScorers;
         private readonly IList<Scorer> optionalScorers;
         private readonly IList<Scorer> prohibitedScorers;
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class Coordinator
         {
             private readonly BooleanScorer2 outerInstance;
@@ -118,9 +111,6 @@ namespace Lucene.Net.Search
 
         /// <summary>
         /// Count a scorer as a single match. </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class SingleMatchScorer : Scorer
         {
             private readonly BooleanScorer2 outerInstance;
@@ -194,9 +184,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class MinShouldMatchSumScorerAnonymousInnerClassHelper : MinShouldMatchSumScorer
         {
             private readonly BooleanScorer2 outerInstance;
@@ -214,9 +201,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class DisjunctionSumScorerAnonymousInnerClassHelper : DisjunctionSumScorer
         {
             private readonly BooleanScorer2 outerInstance;
@@ -241,9 +225,6 @@ namespace Lucene.Net.Search
             return new ConjunctionScorerAnonymousInnerClassHelper(this, m_weight, requiredScorers.ToArray(), requiredNrMatchers);
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class ConjunctionScorerAnonymousInnerClassHelper : ConjunctionScorer
         {
             private readonly BooleanScorer2 outerInstance;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/BoostAttributeImpl.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/BoostAttributeImpl.cs b/src/Lucene.Net/Search/BoostAttributeImpl.cs
index 6a8be3e..c6c0359 100644
--- a/src/Lucene.Net/Search/BoostAttributeImpl.cs
+++ b/src/Lucene.Net/Search/BoostAttributeImpl.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search
 {
     /*
@@ -27,9 +25,6 @@ namespace Lucene.Net.Search
     /// <para/>
     /// @lucene.internal
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public sealed class BoostAttribute : Attribute, IBoostAttribute
     {
         private float boost = 1.0f;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/BulkScorer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/BulkScorer.cs b/src/Lucene.Net/Search/BulkScorer.cs
index 3649ccc..5714036 100644
--- a/src/Lucene.Net/Search/BulkScorer.cs
+++ b/src/Lucene.Net/Search/BulkScorer.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search
 {
     /*
@@ -27,9 +25,7 @@ namespace Lucene.Net.Search
     /// Otherwise, a default implementation is wrapped around
     /// the <see cref="Scorer"/> returned by <see cref="Weight.GetScorer(Index.AtomicReaderContext, Util.IBits)"/>.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
+
     public abstract class BulkScorer
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/CachingCollector.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/CachingCollector.cs b/src/Lucene.Net/Search/CachingCollector.cs
index 043d3be..5684a7f 100644
--- a/src/Lucene.Net/Search/CachingCollector.cs
+++ b/src/Lucene.Net/Search/CachingCollector.cs
@@ -46,9 +46,6 @@ namespace Lucene.Net.Search
     ///
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public abstract class CachingCollector : ICollector
     {
         // Max out at 512K arrays
@@ -61,9 +58,6 @@ namespace Lucene.Net.Search
         /// </summary>
         private static readonly int[] EMPTY_INT32_ARRAY = new int[0];
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class SegStart
         {
             public AtomicReaderContext ReaderContext { get; private set; }
@@ -76,9 +70,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private sealed class CachedScorer : Scorer
         {
             // NOTE: these members are package-private b/c that way accessing them from
@@ -128,9 +119,6 @@ namespace Lucene.Net.Search
         /// <summary>
         /// A <see cref="CachingCollector"/> which caches scores
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private sealed class ScoreCachingCollector : CachingCollector
         {
             private readonly CachedScorer cachedScorer;
@@ -264,9 +252,6 @@ namespace Lucene.Net.Search
         /// <summary>
         /// A <see cref="CachingCollector"/> which does not cache scores
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private sealed class NoScoreCachingCollector : CachingCollector
         {
             internal NoScoreCachingCollector(ICollector other, double maxRAMMB)
@@ -398,9 +383,6 @@ namespace Lucene.Net.Search
             return Create(other, cacheScores, maxRAMMB);
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class CollectorAnonymousInnerClassHelper : ICollector
         {
             private bool acceptDocsOutOfOrder;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/CachingWrapperFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/CachingWrapperFilter.cs b/src/Lucene.Net/Search/CachingWrapperFilter.cs
index a35526e..8e23d4c 100644
--- a/src/Lucene.Net/Search/CachingWrapperFilter.cs
+++ b/src/Lucene.Net/Search/CachingWrapperFilter.cs
@@ -1,5 +1,4 @@
 using Lucene.Net.Support;
-using System;
 using System.Collections.Generic;
 using System.Diagnostics;
 using System.Linq;
@@ -34,9 +33,6 @@ namespace Lucene.Net.Search
     /// filters to simply filter, and then wrap with this class
     /// to add caching.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class CachingWrapperFilter : Filter
     {
         private readonly Filter _filter;
@@ -159,9 +155,6 @@ namespace Lucene.Net.Search
         /// An empty <see cref="DocIdSet"/> instance </summary>
         protected static readonly DocIdSet EMPTY_DOCIDSET = new DocIdSetAnonymousInnerClassHelper();
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class DocIdSetAnonymousInnerClassHelper : DocIdSet
         {
             public override DocIdSetIterator GetIterator()

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/CollectionStatistics.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/CollectionStatistics.cs b/src/Lucene.Net/Search/CollectionStatistics.cs
index c65ae88..0c06ec2 100644
--- a/src/Lucene.Net/Search/CollectionStatistics.cs
+++ b/src/Lucene.Net/Search/CollectionStatistics.cs
@@ -1,4 +1,3 @@
-using System;
 using System.Diagnostics;
 
 namespace Lucene.Net.Search
@@ -25,9 +24,6 @@ namespace Lucene.Net.Search
     /// <para/>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class CollectionStatistics
     {
         private readonly string field;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/ComplexExplanation.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/ComplexExplanation.cs b/src/Lucene.Net/Search/ComplexExplanation.cs
index ae8be43..1af2a42 100644
--- a/src/Lucene.Net/Search/ComplexExplanation.cs
+++ b/src/Lucene.Net/Search/ComplexExplanation.cs
@@ -23,9 +23,6 @@ namespace Lucene.Net.Search
     /// Expert: Describes the score computation for document and query, and
     /// can distinguish a match independent of a positive value.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class ComplexExplanation : Explanation
     {
         private bool? match;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/ConjunctionScorer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/ConjunctionScorer.cs b/src/Lucene.Net/Search/ConjunctionScorer.cs
index 0a6e215..ad32d22 100644
--- a/src/Lucene.Net/Search/ConjunctionScorer.cs
+++ b/src/Lucene.Net/Search/ConjunctionScorer.cs
@@ -1,4 +1,3 @@
-using System;
 using System.Collections.Generic;
 
 namespace Lucene.Net.Search
@@ -24,9 +23,6 @@ namespace Lucene.Net.Search
 
     /// <summary>
     /// Scorer for conjunctions, sets of queries, all of which are required. </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     internal class ConjunctionScorer : Scorer
     {
         protected int m_lastDoc = -1;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/ConstantScoreAutoRewrite.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/ConstantScoreAutoRewrite.cs b/src/Lucene.Net/Search/ConstantScoreAutoRewrite.cs
index 16155d9..929160b 100644
--- a/src/Lucene.Net/Search/ConstantScoreAutoRewrite.cs
+++ b/src/Lucene.Net/Search/ConstantScoreAutoRewrite.cs
@@ -31,7 +31,6 @@ namespace Lucene.Net.Search
     using TermsEnum = Lucene.Net.Index.TermsEnum;
     using TermState = Lucene.Net.Index.TermState;
 
-
     /// <summary>
     /// A rewrite method that tries to pick the best
     /// constant-score rewrite method based on term and
@@ -44,9 +43,6 @@ namespace Lucene.Net.Search
     // LUCENENET specific: made this class public. In Lucene there was a derived class 
     // with the same name that was nested within MultiTermQuery, but in .NET it is 
     // more intuitive if our classes are not nested.
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class ConstantScoreAutoRewrite : TermCollectingRewrite<BooleanQuery>
     {
         /// <summary>
@@ -149,9 +145,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         internal sealed class CutOffTermCollector : TermCollector
         {
             private void InitializeInstanceFields()
@@ -241,9 +234,6 @@ namespace Lucene.Net.Search
 
         /// <summary>
         /// Special implementation of <see cref="BytesRefHash.BytesStartArray"/> that keeps parallel arrays for <see cref="TermContext"/> </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         internal sealed class TermStateByteStart : BytesRefHash.DirectBytesStartArray
         {
             internal TermContext[] termState;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/ConstantScoreQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/ConstantScoreQuery.cs b/src/Lucene.Net/Search/ConstantScoreQuery.cs
index 88a36b8..b57908b 100644
--- a/src/Lucene.Net/Search/ConstantScoreQuery.cs
+++ b/src/Lucene.Net/Search/ConstantScoreQuery.cs
@@ -34,9 +34,6 @@ namespace Lucene.Net.Search
     /// query boost for every document that matches the filter or query.
     /// For queries it therefore simply strips of all scores and returns a constant one.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class ConstantScoreQuery : Query
     {
         protected readonly Filter m_filter;
@@ -134,9 +131,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         protected class ConstantWeight : Weight
         {
             private readonly ConstantScoreQuery outerInstance;
@@ -262,9 +256,6 @@ namespace Lucene.Net.Search
         /// scorer (e.g. <see cref="BooleanScorer"/>) we can use that
         /// top-level scorer.
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         protected class ConstantBulkScorer : BulkScorer
         {
             private readonly ConstantScoreQuery outerInstance;
@@ -291,9 +282,6 @@ namespace Lucene.Net.Search
                 return new CollectorAnonymousInnerClassHelper(this, collector);
             }
 
-#if FEATURE_SERIALIZABLE
-            [Serializable]
-#endif
             private class CollectorAnonymousInnerClassHelper : ICollector
             {
                 private readonly ConstantBulkScorer outerInstance;
@@ -330,9 +318,6 @@ namespace Lucene.Net.Search
         }
 
         // LUCENENET NOTE: Marked internal for testing
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         protected internal class ConstantScorer : Scorer
         {
             private readonly ConstantScoreQuery outerInstance;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/ControlledRealTimeReopenThread.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/ControlledRealTimeReopenThread.cs b/src/Lucene.Net/Search/ControlledRealTimeReopenThread.cs
index 0d0ad02..a238bd7 100644
--- a/src/Lucene.Net/Search/ControlledRealTimeReopenThread.cs
+++ b/src/Lucene.Net/Search/ControlledRealTimeReopenThread.cs
@@ -39,9 +39,6 @@ namespace Lucene.Net.Search
     /// <para/>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class ControlledRealTimeReopenThread<T> : ThreadClass, IDisposable
          where T : class
     {
@@ -85,9 +82,6 @@ namespace Lucene.Net.Search
             manager.AddListener(new HandleRefresh(this));
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class HandleRefresh : ReferenceManager.IRefreshListener
         {
             private readonly ControlledRealTimeReopenThread<T> outerInstance;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/DisjunctionMaxQuery.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/DisjunctionMaxQuery.cs b/src/Lucene.Net/Search/DisjunctionMaxQuery.cs
index 24161e0..375138c 100644
--- a/src/Lucene.Net/Search/DisjunctionMaxQuery.cs
+++ b/src/Lucene.Net/Search/DisjunctionMaxQuery.cs
@@ -55,9 +55,6 @@ namespace Lucene.Net.Search
     /// };
     /// </code>
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class DisjunctionMaxQuery : Query, IEnumerable<Query>
     {
         /// <summary>
@@ -145,9 +142,6 @@ namespace Lucene.Net.Search
         /// <para>NOTE: this API and implementation is subject to
         /// change suddenly in the next release.</para>
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         protected class DisjunctionMaxWeight : Weight
         {
             private readonly DisjunctionMaxQuery outerInstance;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/DisjunctionMaxScorer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/DisjunctionMaxScorer.cs b/src/Lucene.Net/Search/DisjunctionMaxScorer.cs
index 45bddea..67b93ca 100644
--- a/src/Lucene.Net/Search/DisjunctionMaxScorer.cs
+++ b/src/Lucene.Net/Search/DisjunctionMaxScorer.cs
@@ -25,9 +25,6 @@ namespace Lucene.Net.Search
     /// by the subquery scorers that generate that document, plus <see cref="tieBreakerMultiplier"/> times the sum of the scores
     /// for the other subqueries that generate the document.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     internal class DisjunctionMaxScorer : DisjunctionScorer
     {
         /// <summary>Multiplier applied to non-maximum-scoring subqueries for a document as they are summed into the result.</summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/DisjunctionScorer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/DisjunctionScorer.cs b/src/Lucene.Net/Search/DisjunctionScorer.cs
index d35e073..b5b020e 100644
--- a/src/Lucene.Net/Search/DisjunctionScorer.cs
+++ b/src/Lucene.Net/Search/DisjunctionScorer.cs
@@ -1,4 +1,3 @@
-using System;
 using System.Collections.Generic;
 using System.Diagnostics;
 
@@ -25,9 +24,6 @@ namespace Lucene.Net.Search
     /// Base class for <see cref="Scorer"/>s that score disjunctions.
     /// Currently this just provides helper methods to manage the heap.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     internal abstract class DisjunctionScorer : Scorer
     {
         protected readonly Scorer[] m_subScorers;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/DisjunctionSumScorer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/DisjunctionSumScorer.cs b/src/Lucene.Net/Search/DisjunctionSumScorer.cs
index e7ece8e..8029e26 100644
--- a/src/Lucene.Net/Search/DisjunctionSumScorer.cs
+++ b/src/Lucene.Net/Search/DisjunctionSumScorer.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search
 {
     /*
@@ -23,9 +21,6 @@ namespace Lucene.Net.Search
     /// A <see cref="Scorer"/> for OR like queries, counterpart of <see cref="ConjunctionScorer"/>.
     /// This <see cref="Scorer"/> implements <see cref="DocIdSetIterator.Advance(int)"/> and uses Advance() on the given <see cref="Scorer"/>s.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     internal class DisjunctionSumScorer : DisjunctionScorer
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/DocIdSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/DocIdSet.cs b/src/Lucene.Net/Search/DocIdSet.cs
index 1de4b61..7386f11 100644
--- a/src/Lucene.Net/Search/DocIdSet.cs
+++ b/src/Lucene.Net/Search/DocIdSet.cs
@@ -25,9 +25,6 @@ namespace Lucene.Net.Search
     /// A <see cref="DocIdSet"/> contains a set of doc ids. Implementing classes must
     /// only implement <see cref="GetIterator()"/> to provide access to the set.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public abstract class DocIdSet
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/DocIdSetIterator.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/DocIdSetIterator.cs b/src/Lucene.Net/Search/DocIdSetIterator.cs
index ca91594..7e4ebef 100644
--- a/src/Lucene.Net/Search/DocIdSetIterator.cs
+++ b/src/Lucene.Net/Search/DocIdSetIterator.cs
@@ -1,4 +1,3 @@
-using System;
 using System.Diagnostics;
 
 namespace Lucene.Net.Search
@@ -27,9 +26,6 @@ namespace Lucene.Net.Search
     /// a sentinel object. Implementations of this class are expected to consider
     /// <see cref="int.MaxValue"/> as an invalid value.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public abstract class DocIdSetIterator
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/DocTermOrdsRangeFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/DocTermOrdsRangeFilter.cs b/src/Lucene.Net/Search/DocTermOrdsRangeFilter.cs
index b2830d3..5201452 100644
--- a/src/Lucene.Net/Search/DocTermOrdsRangeFilter.cs
+++ b/src/Lucene.Net/Search/DocTermOrdsRangeFilter.cs
@@ -33,9 +33,7 @@ namespace Lucene.Net.Search
     ///    using a <see cref="TermRangeQuery"/> with <see cref="DocTermOrdsRewriteMethod"/>: it will only do
     ///    two ordinal to term lookups.</para>
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
+
     public abstract class DocTermOrdsRangeFilter : Filter
     {
         internal readonly string field;
@@ -67,9 +65,6 @@ namespace Lucene.Net.Search
             return new DocTermOrdsRangeFilterAnonymousInnerClassHelper(field, lowerVal, upperVal, includeLower, includeUpper);
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class DocTermOrdsRangeFilterAnonymousInnerClassHelper : DocTermOrdsRangeFilter
         {
             public DocTermOrdsRangeFilterAnonymousInnerClassHelper(string field, BytesRef lowerVal, BytesRef upperVal, bool includeLower, bool includeUpper)
@@ -133,9 +128,6 @@ namespace Lucene.Net.Search
                 return new FieldCacheDocIdSetAnonymousInnerClassHelper(this, context.AtomicReader.MaxDoc, acceptDocs, docTermOrds, inclusiveLowerPoint, inclusiveUpperPoint);
             }
 
-#if FEATURE_SERIALIZABLE
-            [Serializable]
-#endif
             private class FieldCacheDocIdSetAnonymousInnerClassHelper : FieldCacheDocIdSet
             {
                 private readonly DocTermOrdsRangeFilterAnonymousInnerClassHelper outerInstance;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/DocTermOrdsRewriteMethod.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/DocTermOrdsRewriteMethod.cs b/src/Lucene.Net/Search/DocTermOrdsRewriteMethod.cs
index 77ddffa..bf10df4 100644
--- a/src/Lucene.Net/Search/DocTermOrdsRewriteMethod.cs
+++ b/src/Lucene.Net/Search/DocTermOrdsRewriteMethod.cs
@@ -1,4 +1,3 @@
-using System;
 using System.Collections.Generic;
 using System.Diagnostics;
 
@@ -37,9 +36,6 @@ namespace Lucene.Net.Search
     /// </para>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public sealed class DocTermOrdsRewriteMethod : MultiTermQuery.RewriteMethod
     {
         public override Query Rewrite(IndexReader reader, MultiTermQuery query)
@@ -49,9 +45,6 @@ namespace Lucene.Net.Search
             return result;
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         internal class MultiTermQueryDocTermOrdsWrapperFilter : Filter
         {
             protected readonly MultiTermQuery m_query;
@@ -130,9 +123,6 @@ namespace Lucene.Net.Search
                 return new FieldCacheDocIdSetAnonymousInnerClassHelper(this, context.Reader.MaxDoc, acceptDocs, docTermOrds, termSet);
             }
 
-#if FEATURE_SERIALIZABLE
-            [Serializable]
-#endif
             private class TermsAnonymousInnerClassHelper : Terms
             {
                 private readonly MultiTermQueryDocTermOrdsWrapperFilter outerInstance;
@@ -208,9 +198,6 @@ namespace Lucene.Net.Search
                 }
             }
 
-#if FEATURE_SERIALIZABLE
-            [Serializable]
-#endif
             private class FieldCacheDocIdSetAnonymousInnerClassHelper : FieldCacheDocIdSet
             {
                 private readonly MultiTermQueryDocTermOrdsWrapperFilter outerInstance;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/ExactPhraseScorer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/ExactPhraseScorer.cs b/src/Lucene.Net/Search/ExactPhraseScorer.cs
index 973bbea..a91d68b 100644
--- a/src/Lucene.Net/Search/ExactPhraseScorer.cs
+++ b/src/Lucene.Net/Search/ExactPhraseScorer.cs
@@ -1,4 +1,3 @@
-using System;   
 using System.Diagnostics;
 
 namespace Lucene.Net.Search
@@ -24,9 +23,6 @@ namespace Lucene.Net.Search
     using Lucene.Net.Support;
     using Similarity = Lucene.Net.Search.Similarities.Similarity;
 
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     internal sealed class ExactPhraseScorer : Scorer
     {
         private readonly int endMinus1;
@@ -40,9 +36,6 @@ namespace Lucene.Net.Search
         internal bool noDocs;
         private readonly long cost;
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private sealed class ChunkState
         {
             internal DocsAndPositionsEnum PosEnum { get; private set; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Explanation.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Explanation.cs b/src/Lucene.Net/Search/Explanation.cs
index f2c2de1..933a119 100644
--- a/src/Lucene.Net/Search/Explanation.cs
+++ b/src/Lucene.Net/Search/Explanation.cs
@@ -1,4 +1,3 @@
-using System;
 using System.Collections.Generic;
 using System.Text;
 
@@ -23,9 +22,6 @@ namespace Lucene.Net.Search
 
     /// <summary>
     /// Expert: Describes the score computation for document and query. </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class Explanation
     {
         private float val; // the value of this node

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/FakeScorer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/FakeScorer.cs b/src/Lucene.Net/Search/FakeScorer.cs
index c2e87aa..31e6bba 100644
--- a/src/Lucene.Net/Search/FakeScorer.cs
+++ b/src/Lucene.Net/Search/FakeScorer.cs
@@ -1,4 +1,3 @@
-using System;
 using System.Collections.Generic;
 
 namespace Lucene.Net.Search
@@ -24,9 +23,6 @@ namespace Lucene.Net.Search
     /// Used by <see cref="BulkScorer"/>s that need to pass a
     /// <see cref="Scorer"/> to <see cref="ICollector.SetScorer(Scorer)"/>.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     internal sealed class FakeScorer : Scorer
     {
         internal float score;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/FieldCache.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/FieldCache.cs b/src/Lucene.Net/Search/FieldCache.cs
index 0aa0729..36f4896 100644
--- a/src/Lucene.Net/Search/FieldCache.cs
+++ b/src/Lucene.Net/Search/FieldCache.cs
@@ -358,17 +358,11 @@ namespace Lucene.Net.Search
         TextWriter InfoStream { set; get; }
     }
 
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public static class FieldCache 
     {
         /// <summary>
         /// Field values as 8-bit signed bytes
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public abstract class Bytes
         {
             /// <summary>
@@ -381,9 +375,6 @@ namespace Lucene.Net.Search
             /// </summary>
             public static readonly Bytes EMPTY = new EmptyBytes();
 
-#if FEATURE_SERIALIZABLE
-            [Serializable]
-#endif
             private sealed class EmptyBytes : Bytes
             {
                 public override byte Get(int docID)
@@ -398,9 +389,6 @@ namespace Lucene.Net.Search
         /// <para/>
         /// NOTE: This was Shorts in Lucene
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public abstract class Int16s
         {
             /// <summary>
@@ -413,9 +401,6 @@ namespace Lucene.Net.Search
             /// </summary>
             public static readonly Int16s EMPTY = new EmptyInt16s();
 
-#if FEATURE_SERIALIZABLE
-            [Serializable]
-#endif
             private sealed class EmptyInt16s : Int16s
             {
                 public override short Get(int docID)
@@ -430,9 +415,6 @@ namespace Lucene.Net.Search
         /// <para/>
         /// NOTE: This was Ints in Lucene
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public abstract class Int32s
         {
             /// <summary>
@@ -445,9 +427,6 @@ namespace Lucene.Net.Search
             /// </summary>
             public static readonly Int32s EMPTY = new EmptyInt32s();
 
-#if FEATURE_SERIALIZABLE
-            [Serializable]
-#endif
             private sealed class EmptyInt32s : Int32s
             {
                 public override int Get(int docID)
@@ -462,9 +441,6 @@ namespace Lucene.Net.Search
         /// <para/>
         /// NOTE: This was Longs in Lucene
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public abstract class Int64s
         {
             /// <summary>
@@ -477,9 +453,6 @@ namespace Lucene.Net.Search
             /// </summary>
             public static readonly Int64s EMPTY = new EmptyInt64s();
 
-#if FEATURE_SERIALIZABLE
-            [Serializable]
-#endif
             private sealed class EmptyInt64s : Int64s
             {
                 public override long Get(int docID)
@@ -494,9 +467,6 @@ namespace Lucene.Net.Search
         /// <para/>
         /// NOTE: This was Floats in Lucene
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public abstract class Singles
         {
             /// <summary>
@@ -509,9 +479,6 @@ namespace Lucene.Net.Search
             /// </summary>
             public static readonly Singles EMPTY = new EmptySingles();
 
-#if FEATURE_SERIALIZABLE
-            [Serializable]
-#endif
             private sealed class EmptySingles : Singles
             {
                 public override float Get(int docID)
@@ -524,9 +491,6 @@ namespace Lucene.Net.Search
         /// <summary>
         /// Field values as 64-bit doubles
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public abstract class Doubles
         {
             /// <summary>
@@ -540,9 +504,6 @@ namespace Lucene.Net.Search
             /// </summary>
             public static readonly Doubles EMPTY = new EmptyDoubles();
 
-#if FEATURE_SERIALIZABLE
-            [Serializable]
-#endif
             private sealed class EmptyDoubles : Doubles
             {
                 public override double Get(int docID)
@@ -555,9 +516,6 @@ namespace Lucene.Net.Search
         /// <summary>
         /// Placeholder indicating creation of this cache is currently in-progress.
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public sealed class CreationPlaceholder
         {
             internal object Value { get; set; }
@@ -682,9 +640,6 @@ namespace Lucene.Net.Search
         public static readonly IByteParser DEFAULT_BYTE_PARSER = new ByteParser();
 
         [Obsolete]
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private sealed class ByteParser : IByteParser
         {
             public byte ParseByte(BytesRef term)
@@ -717,9 +672,6 @@ namespace Lucene.Net.Search
         public static readonly IInt16Parser DEFAULT_INT16_PARSER = new Int16Parser();
 
         [Obsolete]
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private sealed class Int16Parser : IInt16Parser
         {
             /// <summary>
@@ -755,9 +707,6 @@ namespace Lucene.Net.Search
         public static readonly IInt32Parser DEFAULT_INT32_PARSER = new Int32Parser();
 
         [Obsolete]
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private sealed class Int32Parser : IInt32Parser
         {
             /// <summary>
@@ -793,9 +742,6 @@ namespace Lucene.Net.Search
         public static readonly ISingleParser DEFAULT_SINGLE_PARSER = new SingleParser();
 
         [Obsolete]
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private sealed class SingleParser : ISingleParser
         {
             /// <summary>
@@ -838,9 +784,6 @@ namespace Lucene.Net.Search
         public static readonly IInt64Parser DEFAULT_INT64_PARSER = new Int64Parser();
 
         [Obsolete]
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private sealed class Int64Parser : IInt64Parser
         {
             /// <summary>
@@ -874,9 +817,6 @@ namespace Lucene.Net.Search
         public static readonly IDoubleParser DEFAULT_DOUBLE_PARSER = new DoubleParser();
 
         [Obsolete]
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private sealed class DoubleParser : IDoubleParser
         {
             public double ParseDouble(BytesRef term)
@@ -918,9 +858,6 @@ namespace Lucene.Net.Search
         /// </summary>
         public static readonly IInt32Parser NUMERIC_UTILS_INT32_PARSER = new NumericUtilsInt32Parser();
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private sealed class NumericUtilsInt32Parser : IInt32Parser
         {
             /// <summary>
@@ -950,9 +887,6 @@ namespace Lucene.Net.Search
         /// </summary>
         public static readonly ISingleParser NUMERIC_UTILS_SINGLE_PARSER = new NumericUtilsSingleParser();
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private sealed class NumericUtilsSingleParser : ISingleParser
         {
             /// <summary>
@@ -982,9 +916,6 @@ namespace Lucene.Net.Search
         /// </summary>
         public static readonly IInt64Parser NUMERIC_UTILS_INT64_PARSER = new NumericUtilsInt64Parser();
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private sealed class NumericUtilsInt64Parser : IInt64Parser
         {
             /// <summary>
@@ -1012,9 +943,6 @@ namespace Lucene.Net.Search
         /// </summary>
         public static readonly IDoubleParser NUMERIC_UTILS_DOUBLE_PARSER = new NumericUtilsDoubleParser();
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private sealed class NumericUtilsDoubleParser : IDoubleParser
         {
             public double ParseDouble(BytesRef term)
@@ -1040,9 +968,6 @@ namespace Lucene.Net.Search
         /// <para/>
         /// @lucene.experimental
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public sealed class CacheEntry
         {
             private readonly object readerKey;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/FieldCacheDocIdSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/FieldCacheDocIdSet.cs b/src/Lucene.Net/Search/FieldCacheDocIdSet.cs
index 4fd7a90..7561164 100644
--- a/src/Lucene.Net/Search/FieldCacheDocIdSet.cs
+++ b/src/Lucene.Net/Search/FieldCacheDocIdSet.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search
 {
     /*
@@ -33,9 +31,6 @@ namespace Lucene.Net.Search
     /// <para/>
     /// @lucene.internal
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public abstract class FieldCacheDocIdSet : DocIdSet
     {
         protected readonly int m_maxDoc;
@@ -69,9 +64,6 @@ namespace Lucene.Net.Search
             get { return (m_acceptDocs == null) ? (IBits)new BitsAnonymousInnerClassHelper(this) : new BitsAnonymousInnerClassHelper2(this); }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class BitsAnonymousInnerClassHelper : IBits
         {
             private readonly FieldCacheDocIdSet outerInstance;
@@ -92,9 +84,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class BitsAnonymousInnerClassHelper2 : IBits
         {
             private readonly FieldCacheDocIdSet outerInstance;
@@ -135,9 +124,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class DocIdSetIteratorAnonymousInnerClassHelper : DocIdSetIterator
         {
             private readonly FieldCacheDocIdSet outerInstance;
@@ -186,9 +172,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class FilteredDocIdSetIteratorAnonymousInnerClassHelper : FilteredDocIdSetIterator
         {
             private readonly FieldCacheDocIdSet outerInstance;
@@ -205,9 +188,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class DocIdSetIteratorAnonymousInnerClassHelper2 : DocIdSetIterator
         {
             private readonly FieldCacheDocIdSet outerInstance;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/FieldCacheImpl.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/FieldCacheImpl.cs b/src/Lucene.Net/Search/FieldCacheImpl.cs
index 5cd00b8..3d9ebac 100644
--- a/src/Lucene.Net/Search/FieldCacheImpl.cs
+++ b/src/Lucene.Net/Search/FieldCacheImpl.cs
@@ -54,9 +54,6 @@ namespace Lucene.Net.Search
     /// <para/>
     /// @since   lucene 1.4
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     internal class FieldCacheImpl : IFieldCache
     {
         private IDictionary<Type, Cache> caches;
@@ -141,9 +138,6 @@ namespace Lucene.Net.Search
         // per-segment fieldcaches don't purge until the shared core closes.
         internal readonly SegmentReader.ICoreDisposedListener purgeCore;
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class CoreClosedListenerAnonymousInnerClassHelper : SegmentReader.ICoreDisposedListener
         {
             private FieldCacheImpl outerInstance;
@@ -162,9 +156,6 @@ namespace Lucene.Net.Search
         // composite/SlowMultiReaderWrapper fieldcaches don't purge until composite reader is closed.
         internal readonly IndexReader.IReaderClosedListener purgeReader;
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class ReaderClosedListenerAnonymousInnerClassHelper : IndexReader.IReaderClosedListener
         {
             private FieldCacheImpl outerInstance;
@@ -206,9 +197,6 @@ namespace Lucene.Net.Search
 
         /// <summary>
         /// Expert: Internal cache. </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         internal abstract class Cache
         {
             internal Cache(FieldCacheImpl wrapper)
@@ -346,9 +334,6 @@ namespace Lucene.Net.Search
 
         /// <summary>
         /// Expert: Every composite-key in the internal cache is of this type. </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         internal class CacheKey
         {
             internal readonly string field; // which Field 
@@ -395,9 +380,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private abstract class Uninvert
         {
             internal IBits docsWithField; // LUCENENET NOTE: Changed from public to internal, since FieldCacheImpl is internal anyway
@@ -539,9 +521,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class FieldCache_BytesAnonymousInnerClassHelper : FieldCache.Bytes
         {
             private readonly FieldCacheImpl outerInstance;
@@ -560,9 +539,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         internal class BytesFromArray : FieldCache.Bytes
         {
             private readonly sbyte[] values;
@@ -578,9 +554,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         internal sealed class ByteCache : Cache
         {
             internal ByteCache(FieldCacheImpl wrapper)
@@ -619,9 +592,6 @@ namespace Lucene.Net.Search
                 return new BytesFromArray(values);
             }
 
-#if FEATURE_SERIALIZABLE
-            [Serializable]
-#endif
             private class UninvertAnonymousInnerClassHelper : Uninvert
             {
                 private readonly sbyte[] values;
@@ -720,9 +690,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class FieldCache_Int16sAnonymousInnerClassHelper : FieldCache.Int16s
         {
             private readonly FieldCacheImpl outerInstance;
@@ -744,9 +711,6 @@ namespace Lucene.Net.Search
         /// <summary>
         /// NOTE: This was ShortsFromArray in Lucene
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         internal class Int16sFromArray : FieldCache.Int16s
         {
             private readonly short[] values;
@@ -765,9 +729,6 @@ namespace Lucene.Net.Search
         /// <summary>
         /// NOTE: This was ShortCache in Lucene
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         internal sealed class Int16Cache : Cache
         {
             internal Int16Cache(FieldCacheImpl wrapper)
@@ -802,9 +763,6 @@ namespace Lucene.Net.Search
                 return new Int16sFromArray(values);
             }
 
-#if FEATURE_SERIALIZABLE
-            [Serializable]
-#endif
             private class UninvertAnonymousInnerClassHelper : Uninvert
             {
                 private readonly Int16Cache outerInstance;
@@ -905,9 +863,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class FieldCache_Int32sAnonymousInnerClassHelper : FieldCache.Int32s
         {
             private readonly FieldCacheImpl outerInstance;
@@ -929,9 +884,6 @@ namespace Lucene.Net.Search
         /// <summary>
         /// NOTE: This was IntsFromArray in Lucene
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         internal class Int32sFromArray : FieldCache.Int32s
         {
             private readonly PackedInt32s.Reader values;
@@ -951,9 +903,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class HoldsOneThing<T>
         {
             private T it;
@@ -969,9 +918,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class GrowableWriterAndMinValue
         {
             internal GrowableWriterAndMinValue(GrowableWriter array, long minValue)
@@ -987,9 +933,6 @@ namespace Lucene.Net.Search
         /// <summary>
         /// NOTE: This was IntCache in Lucene
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         internal sealed class Int32Cache : Cache
         {
             internal Int32Cache(FieldCacheImpl wrapper)
@@ -1037,9 +980,6 @@ namespace Lucene.Net.Search
                 return new Int32sFromArray(values.Writer.Mutable, (int)values.MinValue);
             }
 
-#if FEATURE_SERIALIZABLE
-            [Serializable]
-#endif
             private class UninvertAnonymousInnerClassHelper : Uninvert
             {
                 private readonly Int32Cache outerInstance;
@@ -1121,9 +1061,6 @@ namespace Lucene.Net.Search
             return (IBits)caches[typeof(DocsWithFieldCache)].Get(reader, new CacheKey(field, null), false);
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         internal sealed class DocsWithFieldCache : Cache
         {
             internal DocsWithFieldCache(FieldCacheImpl wrapper)
@@ -1230,9 +1167,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class FieldCache_SinglesAnonymousInnerClassHelper : FieldCache.Singles
         {
             private readonly FieldCacheImpl outerInstance;
@@ -1254,9 +1188,6 @@ namespace Lucene.Net.Search
         /// <summary>
         /// NOTE: This was FloatsFromArray in Lucene
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         internal class SinglesFromArray : FieldCache.Singles
         {
             private readonly float[] values;
@@ -1275,9 +1206,6 @@ namespace Lucene.Net.Search
         /// <summary>
         /// NOTE: This was FloatCache in Lucene
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         internal sealed class SingleCache : Cache
         {
             internal SingleCache(FieldCacheImpl wrapper)
@@ -1326,9 +1254,6 @@ namespace Lucene.Net.Search
                 return new SinglesFromArray(values);
             }
 
-#if FEATURE_SERIALIZABLE
-            [Serializable]
-#endif
             private class UninvertAnonymousInnerClassHelper : Uninvert
             {
                 private readonly SingleCache outerInstance;
@@ -1413,9 +1338,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class FieldCache_Int64sAnonymousInnerClassHelper : FieldCache.Int64s
         {
             private readonly FieldCacheImpl outerInstance;
@@ -1437,9 +1359,6 @@ namespace Lucene.Net.Search
         /// <summary>
         /// NOTE: This was LongsFromArray in Lucene
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         internal class Int64sFromArray : FieldCache.Int64s
         {
             private readonly PackedInt32s.Reader values;
@@ -1460,9 +1379,6 @@ namespace Lucene.Net.Search
         /// <summary>
         /// NOTE: This was LongCache in Lucene
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         internal sealed class Int64Cache : Cache
         {
             internal Int64Cache(FieldCacheImpl wrapper)
@@ -1510,9 +1426,6 @@ namespace Lucene.Net.Search
                 return new Int64sFromArray(values.Writer.Mutable, values.MinValue);
             }
 
-#if FEATURE_SERIALIZABLE
-            [Serializable]
-#endif
             private class UninvertAnonymousInnerClassHelper : Uninvert
             {
                 private readonly Int64Cache outerInstance;
@@ -1608,9 +1521,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class FieldCache_DoublesAnonymousInnerClassHelper : FieldCache.Doubles
         {
             private readonly FieldCacheImpl outerInstance;
@@ -1629,9 +1539,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         internal class DoublesFromArray : FieldCache.Doubles
         {
             private readonly double[] values;
@@ -1647,9 +1554,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         internal sealed class DoubleCache : Cache
         {
             internal DoubleCache(FieldCacheImpl wrapper)
@@ -1697,9 +1601,6 @@ namespace Lucene.Net.Search
                 return new DoublesFromArray(values);
             }
 
-#if FEATURE_SERIALIZABLE
-            [Serializable]
-#endif
             private class UninvertAnonymousInnerClassHelper : Uninvert
             {
                 private readonly DoubleCache outerInstance;
@@ -1745,9 +1646,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public class SortedDocValuesImpl : SortedDocValues
         {
             private readonly PagedBytes.Reader bytes;
@@ -1824,9 +1722,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         internal class SortedDocValuesCache : Cache
         {
             internal SortedDocValuesCache(FieldCacheImpl wrapper)
@@ -1931,9 +1826,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class BinaryDocValuesImpl : BinaryDocValues
         {
             private readonly PagedBytes.Reader bytes;
@@ -2000,9 +1892,6 @@ namespace Lucene.Net.Search
             return (BinaryDocValues)caches[typeof(BinaryDocValues)].Get(reader, new CacheKey(field, acceptableOverheadRatio), setDocsWithField);
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         internal sealed class BinaryDocValuesCache : Cache
         {
             internal BinaryDocValuesCache(FieldCacheImpl wrapper)
@@ -2100,9 +1989,6 @@ namespace Lucene.Net.Search
                 return new BinaryDocValuesImpl(bytes.Freeze(true), offsetReader);
             }
 
-#if FEATURE_SERIALIZABLE
-            [Serializable]
-#endif
             private class BitsAnonymousInnerClassHelper : IBits
             {
                 private readonly BinaryDocValuesCache outerInstance;
@@ -2163,9 +2049,6 @@ namespace Lucene.Net.Search
             return dto.GetIterator(reader);
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         internal sealed class DocTermOrdsCache : Cache
         {
             internal DocTermOrdsCache(FieldCacheImpl wrapper)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/FieldCacheRangeFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/FieldCacheRangeFilter.cs b/src/Lucene.Net/Search/FieldCacheRangeFilter.cs
index 2e95daf..d077829 100644
--- a/src/Lucene.Net/Search/FieldCacheRangeFilter.cs
+++ b/src/Lucene.Net/Search/FieldCacheRangeFilter.cs
@@ -57,9 +57,7 @@ namespace Lucene.Net.Search
     /// <para/>This class does not have an constructor, use one of the static factory methods available,
     /// that create a correct instance for different data types supported by <see cref="IFieldCache"/>.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
+
     public static class FieldCacheRangeFilter
     {
 #if FEATURE_SERIALIZABLE
@@ -67,9 +65,6 @@ namespace Lucene.Net.Search
 #endif
         private class AnonymousStringFieldCacheRangeFilter : FieldCacheRangeFilter<string>
         {
-#if FEATURE_SERIALIZABLE
-            [Serializable]
-#endif
             private class AnonymousClassFieldCacheDocIdSet : FieldCacheDocIdSet
             {
                 private SortedDocValues fcsi;
@@ -158,9 +153,6 @@ namespace Lucene.Net.Search
 #endif
         private class AnonymousBytesRefFieldCacheRangeFilter : FieldCacheRangeFilter<BytesRef>
         {
-#if FEATURE_SERIALIZABLE
-            [Serializable]
-#endif
             private class AnonymousClassFieldCacheDocIdSet : FieldCacheDocIdSet
             {
                 private SortedDocValues fcsi;
@@ -248,9 +240,6 @@ namespace Lucene.Net.Search
 #endif
         private class AnonymousSbyteFieldCacheRangeFilter : FieldCacheRangeFilter<sbyte?>
         {
-#if FEATURE_SERIALIZABLE
-            [Serializable]
-#endif
             private class AnonymousClassFieldCacheDocIdSet : FieldCacheDocIdSet
             {
                 private FieldCache.Bytes values;
@@ -320,9 +309,6 @@ namespace Lucene.Net.Search
 #endif
         private class AnonymousInt16FieldCacheRangeFilter : FieldCacheRangeFilter<short?>
         {
-#if FEATURE_SERIALIZABLE
-            [Serializable]
-#endif
             private class AnonymousClassFieldCacheDocIdSet : FieldCacheDocIdSet
             {
                 private FieldCache.Int16s values;
@@ -393,9 +379,6 @@ namespace Lucene.Net.Search
 #endif
         private class AnonymousInt32FieldCacheRangeFilter : FieldCacheRangeFilter<int?>
         {
-#if FEATURE_SERIALIZABLE
-            [Serializable]
-#endif
             private class AnonymousClassFieldCacheDocIdSet : FieldCacheDocIdSet
             {
                 private FieldCache.Int32s values;
@@ -463,9 +446,6 @@ namespace Lucene.Net.Search
 #endif
         private class AnonymousInt64FieldCacheRangeFilter : FieldCacheRangeFilter<long?>
         {
-#if FEATURE_SERIALIZABLE
-            [Serializable]
-#endif
             private class AnonymousClassFieldCacheDocIdSet : FieldCacheDocIdSet
             {
                 private FieldCache.Int64s values;
@@ -533,9 +513,6 @@ namespace Lucene.Net.Search
 #endif
         private class AnonymousSingleFieldCacheRangeFilter : FieldCacheRangeFilter<float?>
         {
-#if FEATURE_SERIALIZABLE
-            [Serializable]
-#endif
             private class AnonymousClassFieldCacheDocIdSet : FieldCacheDocIdSet
             {
                 private FieldCache.Singles values;
@@ -608,9 +585,6 @@ namespace Lucene.Net.Search
 #endif
         private class AnonymousDoubleFieldCacheRangeFilter : FieldCacheRangeFilter<double?>
         {
-#if FEATURE_SERIALIZABLE
-            [Serializable]
-#endif
             private class AnonymousClassFieldCacheDocIdSet : FieldCacheDocIdSet
             {
                 private FieldCache.Doubles values;
@@ -840,9 +814,6 @@ namespace Lucene.Net.Search
         }
     }
 
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public abstract class FieldCacheRangeFilter<T> : Filter
     {
         internal readonly string field;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/FieldCacheRewriteMethod.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/FieldCacheRewriteMethod.cs b/src/Lucene.Net/Search/FieldCacheRewriteMethod.cs
index e51248b..519cdc4 100644
--- a/src/Lucene.Net/Search/FieldCacheRewriteMethod.cs
+++ b/src/Lucene.Net/Search/FieldCacheRewriteMethod.cs
@@ -1,4 +1,3 @@
-using System;
 using System.Collections.Generic;
 using System.Diagnostics;
 
@@ -37,9 +36,6 @@ namespace Lucene.Net.Search
     /// <para/>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public sealed class FieldCacheRewriteMethod : MultiTermQuery.RewriteMethod
     {
         public override Query Rewrite(IndexReader reader, MultiTermQuery query)
@@ -49,9 +45,6 @@ namespace Lucene.Net.Search
             return result;
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         internal class MultiTermQueryFieldCacheWrapperFilter : Filter
         {
             protected internal readonly MultiTermQuery m_query;
@@ -134,9 +127,6 @@ namespace Lucene.Net.Search
                 return new FieldCacheDocIdSetAnonymousInnerClassHelper(this, context.Reader.MaxDoc, acceptDocs, fcsi, termSet);
             }
 
-#if FEATURE_SERIALIZABLE
-            [Serializable]
-#endif
             private class TermsAnonymousInnerClassHelper : Terms
             {
                 private readonly MultiTermQueryFieldCacheWrapperFilter outerInstance;
@@ -212,9 +202,6 @@ namespace Lucene.Net.Search
                 }
             }
 
-#if FEATURE_SERIALIZABLE
-            [Serializable]
-#endif
             private class FieldCacheDocIdSetAnonymousInnerClassHelper : FieldCacheDocIdSet
             {
                 private readonly MultiTermQueryFieldCacheWrapperFilter outerInstance;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/FieldCacheTermsFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/FieldCacheTermsFilter.cs b/src/Lucene.Net/Search/FieldCacheTermsFilter.cs
index 9998866..298d111 100644
--- a/src/Lucene.Net/Search/FieldCacheTermsFilter.cs
+++ b/src/Lucene.Net/Search/FieldCacheTermsFilter.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search
 {
     /*
@@ -94,9 +92,7 @@ namespace Lucene.Net.Search
     ///
     /// Which filter is best is very application dependent.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
+
     public class FieldCacheTermsFilter : Filter
     {
         private string field;
@@ -141,9 +137,6 @@ namespace Lucene.Net.Search
             return new FieldCacheDocIdSetAnonymousInnerClassHelper(this, context.Reader.MaxDoc, acceptDocs, fcsi, bits);
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class FieldCacheDocIdSetAnonymousInnerClassHelper : FieldCacheDocIdSet
         {
             private readonly FieldCacheTermsFilter outerInstance;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/FieldComparator.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/FieldComparator.cs b/src/Lucene.Net/Search/FieldComparator.cs
index 1ff68b3..d3ba96f 100644
--- a/src/Lucene.Net/Search/FieldComparator.cs
+++ b/src/Lucene.Net/Search/FieldComparator.cs
@@ -89,9 +89,6 @@ namespace Lucene.Net.Search
     /// <para/>
     /// @lucene.experimental
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public abstract class FieldComparer<T> : FieldComparer
     {
         /// <summary>
@@ -216,9 +213,6 @@ namespace Lucene.Net.Search
 
     // .NET Port: Using a non-generic class here so that we avoid having to use the
     // type parameter to access these nested types. Also moving non-generic methods here for casting without generics.
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public abstract class FieldComparer
     {
         public abstract int CompareValues(object first, object second);
@@ -332,9 +326,6 @@ namespace Lucene.Net.Search
         /// <summary>
         /// Base FieldComparer class for numeric types
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public abstract class NumericComparer<T> : FieldComparer<T>
             where T : struct
         {
@@ -372,9 +363,6 @@ namespace Lucene.Net.Search
         /// <see cref="IFieldCache.GetBytes(Index.AtomicReader, string, FieldCache.IByteParser, bool)"/> and sorts by ascending value
         /// </summary>
         [Obsolete, CLSCompliant(false)] // LUCENENET NOTE: marking non-CLS compliant because of sbyte - it is obsolete, anyway
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public sealed class ByteComparer : NumericComparer<sbyte>
         {
             private readonly sbyte[] values;
@@ -462,9 +450,6 @@ namespace Lucene.Net.Search
         /// Parses field's values as <see cref="double"/> (using 
         /// <see cref="IFieldCache.GetDoubles(Index.AtomicReader, string, FieldCache.IDoubleParser, bool)"/> and sorts by ascending value
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public sealed class DoubleComparer : NumericComparer<double>
         {
             private readonly double[] values;
@@ -566,9 +551,6 @@ namespace Lucene.Net.Search
         /// <para/>
         /// NOTE: This was FloatComparator in Lucene
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public sealed class SingleComparer : NumericComparer<float>
         {
             private readonly float[] values;
@@ -672,9 +654,6 @@ namespace Lucene.Net.Search
         /// NOTE: This was ShortComparator in Lucene
         /// </summary>
         [Obsolete]
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public sealed class Int16Comparer : NumericComparer<short>
         {
             private readonly short[] values;
@@ -765,9 +744,6 @@ namespace Lucene.Net.Search
         /// <para/>
         /// NOTE: This was IntComparator in Lucene
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public sealed class Int32Comparer : NumericComparer<int>
         {
             private readonly int[] values;
@@ -855,9 +831,6 @@ namespace Lucene.Net.Search
         /// <para/>
         /// NOTE: This was LongComparator in Lucene
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public sealed class Int64Comparer : NumericComparer<long>
         {
             private readonly long[] values;
@@ -952,9 +925,6 @@ namespace Lucene.Net.Search
         /// <see cref="IndexSearcher.Search(Query, int)"/> use when no <see cref="Sort"/> is
         /// specified).
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public sealed class RelevanceComparer : FieldComparer<float>
         {
             private readonly float[] scores;
@@ -1038,9 +1008,6 @@ namespace Lucene.Net.Search
 
         /// <summary>
         /// Sorts by ascending docID </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public sealed class DocComparer : FieldComparer<int?>
         {
             private readonly int[] docIDs;
@@ -1113,9 +1080,6 @@ namespace Lucene.Net.Search
         /// than <see cref="Lucene.Net.Search.FieldComparer.TermValComparer"/>.  For very small
         /// result sets it may be slower.
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public class TermOrdValComparer : FieldComparer<BytesRef>
         {
             /// <summary>
@@ -1457,9 +1421,6 @@ namespace Lucene.Net.Search
         /// very fast for very small results sets.
         /// </summary>
         // TODO: should we remove this?  who really uses it?
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public sealed class TermValComparer : FieldComparer<BytesRef>
         {
             // sentinels, just used internally in this comparer

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

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/FieldDoc.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/FieldDoc.cs b/src/Lucene.Net/Search/FieldDoc.cs
index 9b6b7e3..524ff14 100644
--- a/src/Lucene.Net/Search/FieldDoc.cs
+++ b/src/Lucene.Net/Search/FieldDoc.cs
@@ -1,5 +1,4 @@
 using Lucene.Net.Support;
-using System;
 using System.Diagnostics.CodeAnalysis;
 using System.Text;
 
@@ -40,9 +39,6 @@ namespace Lucene.Net.Search
     /// @since   lucene 1.4 </summary>
     /// <seealso cref="ScoreDoc"/>
     /// <seealso cref="TopFieldDocs"/>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class FieldDoc : ScoreDoc // LUCENENET TODO: Is it possible to make this class generic so we don't have to deal with boxing?
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/FieldValueFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/FieldValueFilter.cs b/src/Lucene.Net/Search/FieldValueFilter.cs
index 90abf55..9de1687 100644
--- a/src/Lucene.Net/Search/FieldValueFilter.cs
+++ b/src/Lucene.Net/Search/FieldValueFilter.cs
@@ -30,9 +30,6 @@ namespace Lucene.Net.Search
     /// given field. this <see cref="Filter"/> request <see cref="IBits"/> from the
     /// <see cref="IFieldCache"/> and build the bits if not present.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public class FieldValueFilter : Filter
     {
         private readonly string field;
@@ -106,9 +103,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class FieldCacheDocIdSetAnonymousInnerClassHelper : FieldCacheDocIdSet
         {
             private readonly FieldValueFilter outerInstance;
@@ -128,9 +122,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class FieldCacheDocIdSetAnonymousInnerClassHelper2 : FieldCacheDocIdSet
         {
             private readonly FieldValueFilter outerInstance;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/FieldValueHitQueue.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/FieldValueHitQueue.cs b/src/Lucene.Net/Search/FieldValueHitQueue.cs
index b0d29ac..ece6528 100644
--- a/src/Lucene.Net/Search/FieldValueHitQueue.cs
+++ b/src/Lucene.Net/Search/FieldValueHitQueue.cs
@@ -26,9 +26,6 @@ namespace Lucene.Net.Search
     public static class FieldValueHitQueue
     {
         // had to change from internal to public, due to public accessability of FieldValueHitQueue
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         public class Entry : ScoreDoc
         {
             public int Slot { get; set; } // LUCENENET NOTE: For some reason, this was not made readonly in the original
@@ -48,9 +45,6 @@ namespace Lucene.Net.Search
         /// <summary> An implementation of <see cref="FieldValueHitQueue" /> which is optimized in case
         /// there is just one comparer.
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         internal sealed class OneComparerFieldValueHitQueue<T> : FieldValueHitQueue<T>
             where T : FieldValueHitQueue.Entry
         {
@@ -94,9 +88,6 @@ namespace Lucene.Net.Search
         /// <summary> An implementation of <see cref="FieldValueHitQueue" /> which is optimized in case
         /// there is more than one comparer.
         /// </summary>
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         internal sealed class MultiComparersFieldValueHitQueue<T> : FieldValueHitQueue<T>
             where T : FieldValueHitQueue.Entry
         {
@@ -172,9 +163,6 @@ namespace Lucene.Net.Search
     /// @since 2.9 </summary>
     /// <seealso cref="IndexSearcher.Search(Query,Filter,int,Sort)"/>
     /// <seealso cref="FieldCache"/>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public abstract class FieldValueHitQueue<T> : Util.PriorityQueue<T>
         where T : FieldValueHitQueue.Entry
     {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/Filter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/Filter.cs b/src/Lucene.Net/Search/Filter.cs
index 3910edd..6bae4ca 100644
--- a/src/Lucene.Net/Search/Filter.cs
+++ b/src/Lucene.Net/Search/Filter.cs
@@ -27,9 +27,6 @@ namespace Lucene.Net.Search
     /// Abstract base class for restricting which documents may
     /// be returned during searching.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public abstract class Filter
     {
         /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/FilteredDocIdSet.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/FilteredDocIdSet.cs b/src/Lucene.Net/Search/FilteredDocIdSet.cs
index 53e1a98..db807e6 100644
--- a/src/Lucene.Net/Search/FilteredDocIdSet.cs
+++ b/src/Lucene.Net/Search/FilteredDocIdSet.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search
 {
     /*
@@ -38,9 +36,6 @@ namespace Lucene.Net.Search
     /// this may be a better way to filter than ChainedFilter.
     /// </summary>
     /// <seealso cref="DocIdSet"/>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public abstract class FilteredDocIdSet : DocIdSet
     {
         private readonly DocIdSet innerSet;
@@ -72,9 +67,6 @@ namespace Lucene.Net.Search
             }
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class BitsAnonymousInnerClassHelper : IBits
         {
             private readonly FilteredDocIdSet outerInstance;
@@ -118,9 +110,6 @@ namespace Lucene.Net.Search
             return new FilteredDocIdSetIteratorAnonymousInnerClassHelper(this, iterator);
         }
 
-#if FEATURE_SERIALIZABLE
-        [Serializable]
-#endif
         private class FilteredDocIdSetIteratorAnonymousInnerClassHelper : FilteredDocIdSetIterator
         {
             private readonly FilteredDocIdSet outerInstance;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/389daee7/src/Lucene.Net/Search/FilteredDocIdSetIterator.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net/Search/FilteredDocIdSetIterator.cs b/src/Lucene.Net/Search/FilteredDocIdSetIterator.cs
index eb2f2bf..8bc7d8a 100644
--- a/src/Lucene.Net/Search/FilteredDocIdSetIterator.cs
+++ b/src/Lucene.Net/Search/FilteredDocIdSetIterator.cs
@@ -1,5 +1,3 @@
-using System;
-
 namespace Lucene.Net.Search
 {
     /*
@@ -25,9 +23,6 @@ namespace Lucene.Net.Search
     /// mechanism on an underlying <see cref="DocIdSetIterator"/>.  See 
     /// <see cref="DocIdSetIterator"/>.
     /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
     public abstract class FilteredDocIdSetIterator : DocIdSetIterator
     {
         protected DocIdSetIterator m_innerIter;


Mime
View raw message