lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [30/62] [abbrv] [partial] lucenenet git commit: Renamed Lucene.Net.Core folder Lucene.Net because the dotnet.exe pack command doesn't allow creating a NuGet package with a different name than its folder. Working around it with the script was much more co
Date Tue, 04 Apr 2017 17:19:36 GMT
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a5dc68d0/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46Codec.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46Codec.cs b/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46Codec.cs
deleted file mode 100644
index 960138f..0000000
--- a/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46Codec.cs
+++ /dev/null
@@ -1,158 +0,0 @@
-namespace Lucene.Net.Codecs.Lucene46
-{
-    /*
-     * Licensed to the Apache Software Foundation (ASF) under one or more
-     * contributor license agreements.  See the NOTICE file distributed with
-     * this work for additional information regarding copyright ownership.
-     * The ASF licenses this file to You under the Apache License, Version 2.0
-     * (the "License"); you may not use this file except in compliance with
-     * the License.  You may obtain a copy of the License at
-     *
-     *     http://www.apache.org/licenses/LICENSE-2.0
-     *
-     * Unless required by applicable law or agreed to in writing, software
-     * distributed under the License is distributed on an "AS IS" BASIS,
-     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     * See the License for the specific language governing permissions and
-     * limitations under the License.
-     */
-
-    using Lucene40LiveDocsFormat = Lucene.Net.Codecs.Lucene40.Lucene40LiveDocsFormat;
-    using Lucene41StoredFieldsFormat = Lucene.Net.Codecs.Lucene41.Lucene41StoredFieldsFormat;
-    using Lucene42NormsFormat = Lucene.Net.Codecs.Lucene42.Lucene42NormsFormat;
-    using Lucene42TermVectorsFormat = Lucene.Net.Codecs.Lucene42.Lucene42TermVectorsFormat;
-    using PerFieldDocValuesFormat = Lucene.Net.Codecs.PerField.PerFieldDocValuesFormat;
-    using PerFieldPostingsFormat = Lucene.Net.Codecs.PerField.PerFieldPostingsFormat;
-
-    /// <summary>
-    /// Implements the Lucene 4.6 index format, with configurable per-field postings
-    /// and docvalues formats.
-    /// <p>
-    /// If you want to reuse functionality of this codec in another codec, extend
-    /// <seealso cref="FilterCodec"/>.
-    /// </summary>
-    /// <seealso cref= Lucene.Net.Codecs.Lucene46 package documentation for file format details.
-    /// @lucene.experimental </seealso>
-    // NOTE: if we make largish changes in a minor release, easier to just make Lucene46Codec or whatever
-    // if they are backwards compatible or smallish we can probably do the backwards in the postingsreader
-    // (it writes a minor version, etc).
-    [CodecName("Lucene46")]
-    public class Lucene46Codec : Codec
-    {
-        private readonly StoredFieldsFormat fieldsFormat = new Lucene41StoredFieldsFormat();
-        private readonly TermVectorsFormat vectorsFormat = new Lucene42TermVectorsFormat();
-        private readonly FieldInfosFormat fieldInfosFormat = new Lucene46FieldInfosFormat();
-        private readonly SegmentInfoFormat segmentInfosFormat = new Lucene46SegmentInfoFormat();
-        private readonly LiveDocsFormat liveDocsFormat = new Lucene40LiveDocsFormat();
-
-        private readonly PostingsFormat postingsFormat;
-
-        private class PerFieldPostingsFormatAnonymousInnerClassHelper : PerFieldPostingsFormat
-        {
-            private readonly Lucene46Codec outerInstance;
-
-            public PerFieldPostingsFormatAnonymousInnerClassHelper(Lucene46Codec outerInstance)
-            {
-                this.outerInstance = outerInstance;
-            }
-
-            public override PostingsFormat GetPostingsFormatForField(string field)
-            {
-                return outerInstance.GetPostingsFormatForField(field);
-            }
-        }
-
-        private readonly DocValuesFormat docValuesFormat;
-
-        private class PerFieldDocValuesFormatAnonymousInnerClassHelper : PerFieldDocValuesFormat
-        {
-            private readonly Lucene46Codec outerInstance;
-
-            public PerFieldDocValuesFormatAnonymousInnerClassHelper(Lucene46Codec outerInstance)
-            {
-                this.outerInstance = outerInstance;
-            }
-
-            public override DocValuesFormat GetDocValuesFormatForField(string field)
-            {
-                return outerInstance.GetDocValuesFormatForField(field);
-            }
-        }
-
-        /// <summary>
-        /// Sole constructor. </summary>
-        public Lucene46Codec()
-            : base()
-        {
-            postingsFormat = new PerFieldPostingsFormatAnonymousInnerClassHelper(this);
-            docValuesFormat = new PerFieldDocValuesFormatAnonymousInnerClassHelper(this);
-        }
-
-        public override sealed StoredFieldsFormat StoredFieldsFormat
-        {
-            get { return fieldsFormat; }
-        }
-
-        public override sealed TermVectorsFormat TermVectorsFormat
-        {
-            get { return vectorsFormat; }
-        }
-
-        public override sealed PostingsFormat PostingsFormat
-        {
-            get { return postingsFormat; }
-        }
-
-        public override sealed FieldInfosFormat FieldInfosFormat
-        {
-            get { return fieldInfosFormat; }
-        }
-
-        public override sealed SegmentInfoFormat SegmentInfoFormat
-        {
-            get { return segmentInfosFormat; }
-        }
-
-        public override sealed LiveDocsFormat LiveDocsFormat
-        {
-            get { return liveDocsFormat; }
-        }
-
-        /// <summary>
-        /// Returns the postings format that should be used for writing
-        ///  new segments of <code>field</code>.
-        ///
-        ///  The default implementation always returns "Lucene41"
-        /// </summary>
-        public virtual PostingsFormat GetPostingsFormatForField(string field)
-        {
-            return defaultFormat;
-        }
-
-        /// <summary>
-        /// Returns the docvalues format that should be used for writing
-        ///  new segments of <code>field</code>.
-        ///
-        ///  The default implementation always returns "Lucene45"
-        /// </summary>
-        public virtual DocValuesFormat GetDocValuesFormatForField(string field)
-        {
-            return defaultDVFormat;
-        }
-
-        public override sealed DocValuesFormat DocValuesFormat
-        {
-            get { return docValuesFormat; }
-        }
-
-        private readonly PostingsFormat defaultFormat = Codecs.PostingsFormat.ForName("Lucene41");
-        private readonly DocValuesFormat defaultDVFormat = Codecs.DocValuesFormat.ForName("Lucene45");
-
-        private readonly NormsFormat normsFormat = new Lucene42NormsFormat();
-
-        public override sealed NormsFormat NormsFormat
-        {
-            get { return normsFormat; }
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a5dc68d0/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46FieldInfosFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46FieldInfosFormat.cs b/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46FieldInfosFormat.cs
deleted file mode 100644
index 40c681c..0000000
--- a/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46FieldInfosFormat.cs
+++ /dev/null
@@ -1,131 +0,0 @@
-namespace Lucene.Net.Codecs.Lucene46
-{
-    /*
-     * Licensed to the Apache Software Foundation (ASF) under one or more
-     * contributor license agreements.  See the NOTICE file distributed with
-     * this work for additional information regarding copyright ownership.
-     * The ASF licenses this file to You under the Apache License, Version 2.0
-     * (the "License"); you may not use this file except in compliance with
-     * the License.  You may obtain a copy of the License at
-     *
-     *     http://www.apache.org/licenses/LICENSE-2.0
-     *
-     * Unless required by applicable law or agreed to in writing, software
-     * distributed under the License is distributed on an "AS IS" BASIS,
-     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     * See the License for the specific language governing permissions and
-     * limitations under the License.
-     */
-
-    /// <summary>
-    /// Lucene 4.6 Field Infos format.
-    /// <p>
-    /// <p>Field names are stored in the field info file, with suffix <tt>.fnm</tt>.</p>
-    /// <p>FieldInfos (.fnm) --&gt; Header,FieldsCount, &lt;FieldName,FieldNumber,
-    /// FieldBits,DocValuesBits,DocValuesGen,Attributes&gt; <sup>FieldsCount</sup>,Footer</p>
-    /// <p>Data types:
-    /// <ul>
-    ///   <li>Header --&gt; <seealso cref="CodecUtil#checkHeader CodecHeader"/></li>
-    ///   <li>FieldsCount --&gt; <seealso cref="DataOutput#writeVInt VInt"/></li>
-    ///   <li>FieldName --&gt; <seealso cref="DataOutput#writeString String"/></li>
-    ///   <li>FieldBits, DocValuesBits --&gt; <seealso cref="DataOutput#writeByte Byte"/></li>
-    ///   <li>FieldNumber --&gt; <seealso cref="DataOutput#writeInt VInt"/></li>
-    ///   <li>Attributes --&gt; <seealso cref="DataOutput#writeStringStringMap Map&lt;String,String&gt;"/></li>
-    ///   <li>DocValuesGen --&gt; <seealso cref="DataOutput#writeLong(long) Int64"/></li>
-    ///   <li>Footer --&gt; <seealso cref="CodecUtil#writeFooter CodecFooter"/></li>
-    /// </ul>
-    /// </p>
-    /// Field Descriptions:
-    /// <ul>
-    ///   <li>FieldsCount: the number of fields in this file.</li>
-    ///   <li>FieldName: name of the field as a UTF-8 String.</li>
-    ///   <li>FieldNumber: the field's number. Note that unlike previous versions of
-    ///       Lucene, the fields are not numbered implicitly by their order in the
-    ///       file, instead explicitly.</li>
-    ///   <li>FieldBits: a byte containing field options.
-    ///       <ul>
-    ///         <li>The low-order bit is one for indexed fields, and zero for non-indexed
-    ///             fields.</li>
-    ///         <li>The second lowest-order bit is one for fields that have term vectors
-    ///             stored, and zero for fields without term vectors.</li>
-    ///         <li>If the third lowest order-bit is set (0x4), offsets are stored into
-    ///             the postings list in addition to positions.</li>
-    ///         <li>Fourth bit is unused.</li>
-    ///         <li>If the fifth lowest-order bit is set (0x10), norms are omitted for the
-    ///             indexed field.</li>
-    ///         <li>If the sixth lowest-order bit is set (0x20), payloads are stored for the
-    ///             indexed field.</li>
-    ///         <li>If the seventh lowest-order bit is set (0x40), term frequencies and
-    ///             positions omitted for the indexed field.</li>
-    ///         <li>If the eighth lowest-order bit is set (0x80), positions are omitted for the
-    ///             indexed field.</li>
-    ///       </ul>
-    ///    </li>
-    ///    <li>DocValuesBits: a byte containing per-document value types. The type
-    ///        recorded as two four-bit integers, with the high-order bits representing
-    ///        <code>norms</code> options, and the low-order bits representing
-    ///        {@code DocValues} options. Each four-bit integer can be decoded as such:
-    ///        <ul>
-    ///          <li>0: no DocValues for this field.</li>
-    ///          <li>1: NumericDocValues. (<seealso cref="DocValuesType#NUMERIC"/>)</li>
-    ///          <li>2: BinaryDocValues. ({@code DocValuesType#BINARY})</li>
-    ///          <li>3: SortedDocValues. ({@code DocValuesType#SORTED})</li>
-    ///        </ul>
-    ///    </li>
-    ///    <li>DocValuesGen is the generation count of the field's DocValues. If this is -1,
-    ///        there are no DocValues updates to that field. Anything above zero means there
-    ///        are updates stored by <seealso cref="DocValuesFormat"/>.</li>
-    ///    <li>Attributes: a key-value map of codec-private attributes.</li>
-    /// </ul>
-    ///
-    /// @lucene.experimental
-    /// </summary>
-    public sealed class Lucene46FieldInfosFormat : FieldInfosFormat
-    {
-        private readonly FieldInfosReader reader = new Lucene46FieldInfosReader();
-        private readonly FieldInfosWriter writer = new Lucene46FieldInfosWriter();
-
-        /// <summary>
-        /// Sole constructor. </summary>
-        public Lucene46FieldInfosFormat()
-        {
-        }
-
-        public override FieldInfosReader FieldInfosReader
-        {
-            get
-            {
-                return reader;
-            }
-        }
-
-        public override FieldInfosWriter FieldInfosWriter
-        {
-            get
-            {
-                return writer;
-            }
-        }
-
-        /// <summary>
-        /// Extension of field infos </summary>
-        internal const string EXTENSION = "fnm";
-
-        // Codec header
-        internal const string CODEC_NAME = "Lucene46FieldInfos";
-
-        internal const int FORMAT_START = 0;
-        internal const int FORMAT_CHECKSUM = 1;
-        internal const int FORMAT_CURRENT = FORMAT_CHECKSUM;
-
-        // Field flags
-        internal const sbyte IS_INDEXED = 0x1;
-
-        internal const sbyte STORE_TERMVECTOR = 0x2;
-        internal const sbyte STORE_OFFSETS_IN_POSTINGS = 0x4;
-        internal const sbyte OMIT_NORMS = 0x10;
-        internal const sbyte STORE_PAYLOADS = 0x20;
-        internal const sbyte OMIT_TERM_FREQ_AND_POSITIONS = 0x40;
-        internal const sbyte OMIT_POSITIONS = -128;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a5dc68d0/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46FieldInfosReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46FieldInfosReader.cs b/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46FieldInfosReader.cs
deleted file mode 100644
index 0a3bacc..0000000
--- a/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46FieldInfosReader.cs
+++ /dev/null
@@ -1,157 +0,0 @@
-using Lucene.Net.Support;
-using System.Collections.Generic;
-
-namespace Lucene.Net.Codecs.Lucene46
-{
-    /*
-     * Licensed to the Apache Software Foundation (ASF) under one or more
-     * contributor license agreements.  See the NOTICE file distributed with
-     * this work for additional information regarding copyright ownership.
-     * The ASF licenses this file to You under the Apache License, Version 2.0
-     * (the "License"); you may not use this file except in compliance with
-     * the License.  You may obtain a copy of the License at
-     *
-     *     http://www.apache.org/licenses/LICENSE-2.0
-     *
-     * Unless required by applicable law or agreed to in writing, software
-     * distributed under the License is distributed on an "AS IS" BASIS,
-     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     * See the License for the specific language governing permissions and
-     * limitations under the License.
-     */
-
-    using ChecksumIndexInput = Lucene.Net.Store.ChecksumIndexInput;
-    using CorruptIndexException = Lucene.Net.Index.CorruptIndexException;
-    using DocValuesType = Lucene.Net.Index.DocValuesType;
-    using Directory = Lucene.Net.Store.Directory;
-    using FieldInfo = Lucene.Net.Index.FieldInfo;
-    using FieldInfos = Lucene.Net.Index.FieldInfos;
-    using IndexFileNames = Lucene.Net.Index.IndexFileNames;
-    using IndexInput = Lucene.Net.Store.IndexInput;
-    using IndexOptions = Lucene.Net.Index.IndexOptions;
-    using IOContext = Lucene.Net.Store.IOContext;
-    using IOUtils = Lucene.Net.Util.IOUtils;
-
-    /// <summary>
-    /// Lucene 4.6 FieldInfos reader.
-    ///
-    /// @lucene.experimental </summary>
-    /// <seealso cref= Lucene46FieldInfosFormat </seealso>
-    internal sealed class Lucene46FieldInfosReader : FieldInfosReader
-    {
-        /// <summary>
-        /// Sole constructor. </summary>
-        public Lucene46FieldInfosReader()
-        {
-        }
-
-        public override FieldInfos Read(Directory directory, string segmentName, string segmentSuffix, IOContext context)
-        {
-            string fileName = IndexFileNames.SegmentFileName(segmentName, segmentSuffix, Lucene46FieldInfosFormat.EXTENSION);
-            ChecksumIndexInput input = directory.OpenChecksumInput(fileName, context);
-
-            bool success = false;
-            try
-            {
-                int codecVersion = CodecUtil.CheckHeader(input, Lucene46FieldInfosFormat.CODEC_NAME, Lucene46FieldInfosFormat.FORMAT_START, Lucene46FieldInfosFormat.FORMAT_CURRENT);
-
-                int size = input.ReadVInt32(); //read in the size
-                FieldInfo[] infos = new FieldInfo[size];
-
-                for (int i = 0; i < size; i++)
-                {
-                    string name = input.ReadString();
-                    int fieldNumber = input.ReadVInt32();
-                    byte bits = input.ReadByte();
-                    bool isIndexed = (bits & Lucene46FieldInfosFormat.IS_INDEXED) != 0;
-                    bool storeTermVector = (bits & Lucene46FieldInfosFormat.STORE_TERMVECTOR) != 0;
-                    bool omitNorms = (bits & Lucene46FieldInfosFormat.OMIT_NORMS) != 0;
-                    bool storePayloads = (bits & Lucene46FieldInfosFormat.STORE_PAYLOADS) != 0;
-                    IndexOptions indexOptions;
-                    if (!isIndexed)
-                    {
-                        indexOptions = IndexOptions.NONE;
-                    }
-                    else if ((bits & Lucene46FieldInfosFormat.OMIT_TERM_FREQ_AND_POSITIONS) != 0)
-                    {
-                        indexOptions = IndexOptions.DOCS_ONLY;
-                    }
-                    else if ((bits & Lucene46FieldInfosFormat.OMIT_POSITIONS) != 0)
-                    {
-                        indexOptions = IndexOptions.DOCS_AND_FREQS;
-                    }
-                    else if ((bits & Lucene46FieldInfosFormat.STORE_OFFSETS_IN_POSTINGS) != 0)
-                    {
-                        indexOptions = IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS;
-                    }
-                    else
-                    {
-                        indexOptions = IndexOptions.DOCS_AND_FREQS_AND_POSITIONS;
-                    }
-
-                    // DV Types are packed in one byte
-                    byte val = input.ReadByte();
-                    DocValuesType docValuesType = GetDocValuesType(input, (sbyte)(val & 0x0F));
-                    DocValuesType normsType = GetDocValuesType(input, (sbyte)(((int)((uint)val >> 4)) & 0x0F));
-                    long dvGen = input.ReadInt64();
-                    IDictionary<string, string> attributes = input.ReadStringStringMap();
-                    infos[i] = new FieldInfo(name, isIndexed, fieldNumber, storeTermVector, omitNorms, storePayloads, indexOptions, docValuesType, normsType, Collections.UnmodifiableMap(attributes));
-                    infos[i].DocValuesGen = dvGen;
-                }
-
-                if (codecVersion >= Lucene46FieldInfosFormat.FORMAT_CHECKSUM)
-                {
-                    CodecUtil.CheckFooter(input);
-                }
-                else
-                {
-#pragma warning disable 612, 618
-                    CodecUtil.CheckEOF(input);
-#pragma warning restore 612, 618
-                }
-                FieldInfos fieldInfos = new FieldInfos(infos);
-                success = true;
-                return fieldInfos;
-            }
-            finally
-            {
-                if (success)
-                {
-                    input.Dispose();
-                }
-                else
-                {
-                    IOUtils.CloseWhileHandlingException(input);
-                }
-            }
-        }
-
-        private static DocValuesType GetDocValuesType(IndexInput input, sbyte b)
-        {
-            if (b == 0)
-            {
-                return DocValuesType.NONE;
-            }
-            else if (b == 1)
-            {
-                return DocValuesType.NUMERIC;
-            }
-            else if (b == 2)
-            {
-                return DocValuesType.BINARY;
-            }
-            else if (b == 3)
-            {
-                return DocValuesType.SORTED;
-            }
-            else if (b == 4)
-            {
-                return DocValuesType.SORTED_SET;
-            }
-            else
-            {
-                throw new CorruptIndexException("invalid docvalues byte: " + b + " (resource=" + input + ")");
-            }
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a5dc68d0/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46FieldInfosWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46FieldInfosWriter.cs b/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46FieldInfosWriter.cs
deleted file mode 100644
index b1732da..0000000
--- a/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46FieldInfosWriter.cs
+++ /dev/null
@@ -1,145 +0,0 @@
-using System;
-using System.Diagnostics;
-
-namespace Lucene.Net.Codecs.Lucene46
-{
-    /*
-     * Licensed to the Apache Software Foundation (ASF) under one or more
-     * contributor license agreements.  See the NOTICE file distributed with
-     * this work for additional information regarding copyright ownership.
-     * The ASF licenses this file to You under the Apache License, Version 2.0
-     * (the "License"); you may not use this file except in compliance with
-     * the License.  You may obtain a copy of the License at
-     *
-     *     http://www.apache.org/licenses/LICENSE-2.0
-     *
-     * Unless required by applicable law or agreed to in writing, software
-     * distributed under the License is distributed on an "AS IS" BASIS,
-     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     * See the License for the specific language governing permissions and
-     * limitations under the License.
-     */
-
-    using Directory = Lucene.Net.Store.Directory;
-    using DocValuesType = Lucene.Net.Index.DocValuesType;
-    using FieldInfo = Lucene.Net.Index.FieldInfo;
-    using FieldInfos = Lucene.Net.Index.FieldInfos;
-    using IndexFileNames = Lucene.Net.Index.IndexFileNames;
-    using IndexOptions = Lucene.Net.Index.IndexOptions;
-    using IndexOutput = Lucene.Net.Store.IndexOutput;
-    using IOContext = Lucene.Net.Store.IOContext;
-    using IOUtils = Lucene.Net.Util.IOUtils;
-
-    /// <summary>
-    /// Lucene 4.6 FieldInfos writer.
-    /// </summary>
-    /// <seealso cref= Lucene46FieldInfosFormat
-    /// @lucene.experimental </seealso>
-    internal sealed class Lucene46FieldInfosWriter : FieldInfosWriter
-    {
-        /// <summary>
-        /// Sole constructor. </summary>
-        public Lucene46FieldInfosWriter()
-        {
-        }
-
-        public override void Write(Directory directory, string segmentName, string segmentSuffix, FieldInfos infos, IOContext context)
-        {
-            string fileName = IndexFileNames.SegmentFileName(segmentName, segmentSuffix, Lucene46FieldInfosFormat.EXTENSION);
-            IndexOutput output = directory.CreateOutput(fileName, context);
-            bool success = false;
-            try
-            {
-                CodecUtil.WriteHeader(output, Lucene46FieldInfosFormat.CODEC_NAME, Lucene46FieldInfosFormat.FORMAT_CURRENT);
-                output.WriteVInt32(infos.Count);
-                foreach (FieldInfo fi in infos)
-                {
-                    IndexOptions indexOptions = fi.IndexOptions;
-                    sbyte bits = 0x0;
-                    if (fi.HasVectors)
-                    {
-                        bits |= Lucene46FieldInfosFormat.STORE_TERMVECTOR;
-                    }
-                    if (fi.OmitsNorms)
-                    {
-                        bits |= Lucene46FieldInfosFormat.OMIT_NORMS;
-                    }
-                    if (fi.HasPayloads)
-                    {
-                        bits |= Lucene46FieldInfosFormat.STORE_PAYLOADS;
-                    }
-                    if (fi.IsIndexed)
-                    {
-                        bits |= Lucene46FieldInfosFormat.IS_INDEXED;
-                        Debug.Assert(indexOptions.CompareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0 || !fi.HasPayloads);
-                        if (indexOptions == IndexOptions.DOCS_ONLY)
-                        {
-                            bits |= Lucene46FieldInfosFormat.OMIT_TERM_FREQ_AND_POSITIONS;
-                        }
-                        else if (indexOptions == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS)
-                        {
-                            bits |= Lucene46FieldInfosFormat.STORE_OFFSETS_IN_POSTINGS;
-                        }
-                        else if (indexOptions == IndexOptions.DOCS_AND_FREQS)
-                        {
-                            bits |= Lucene46FieldInfosFormat.OMIT_POSITIONS;
-                        }
-                    }
-                    output.WriteString(fi.Name);
-                    output.WriteVInt32(fi.Number);
-                    output.WriteByte((byte)bits);
-
-                    // pack the DV types in one byte
-                    var dv = DocValuesByte(fi.DocValuesType);
-                    var nrm = DocValuesByte(fi.NormType);
-                    Debug.Assert((dv & (~0xF)) == 0 && (nrm & (~0x0F)) == 0);
-                    var val = unchecked((sbyte)(0xff & ((nrm << 4) | dv)));
-                    output.WriteByte((byte)val);
-                    output.WriteInt64(fi.DocValuesGen);
-                    output.WriteStringStringMap(fi.Attributes);
-                }
-                CodecUtil.WriteFooter(output);
-                success = true;
-            }
-            finally
-            {
-                if (success)
-                {
-                    output.Dispose();
-                }
-                else
-                {
-                    IOUtils.CloseWhileHandlingException(output);
-                }
-            }
-        }
-
-        private static sbyte DocValuesByte(DocValuesType type)
-        {
-            if (type == DocValuesType.NONE)
-            {
-                return 0;
-            }
-            else if (type == DocValuesType.NUMERIC)
-            {
-                return 1;
-            }
-            else if (type == DocValuesType.BINARY)
-            {
-                return 2;
-            }
-            else if (type == DocValuesType.SORTED)
-            {
-                return 3;
-            }
-            else if (type == DocValuesType.SORTED_SET)
-            {
-                return 4;
-            }
-            else
-            {
-                throw new InvalidOperationException();
-            }
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a5dc68d0/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46SegmentInfoFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46SegmentInfoFormat.cs b/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46SegmentInfoFormat.cs
deleted file mode 100644
index f50fecc..0000000
--- a/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46SegmentInfoFormat.cs
+++ /dev/null
@@ -1,100 +0,0 @@
-namespace Lucene.Net.Codecs.Lucene46
-{
-    /*
-     * Licensed to the Apache Software Foundation (ASF) under one or more
-     * contributor license agreements.  See the NOTICE file distributed with
-     * this work for additional information regarding copyright ownership.
-     * The ASF licenses this file to You under the Apache License, Version 2.0
-     * (the "License"); you may not use this file except in compliance with
-     * the License.  You may obtain a copy of the License at
-     *
-     *     http://www.apache.org/licenses/LICENSE-2.0
-     *
-     * Unless required by applicable law or agreed to in writing, software
-     * distributed under the License is distributed on an "AS IS" BASIS,
-     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     * See the License for the specific language governing permissions and
-     * limitations under the License.
-     */
-
-    // javadocs
-    using SegmentInfo = Lucene.Net.Index.SegmentInfo; // javadocs
-
-    // javadocs
-    // javadocs
-
-    /// <summary>
-    /// Lucene 4.6 Segment info format.
-    /// <p>
-    /// Files:
-    /// <ul>
-    ///   <li><tt>.si</tt>: Header, SegVersion, SegSize, IsCompoundFile, Diagnostics, Files, Footer
-    /// </ul>
-    /// </p>
-    /// Data types:
-    /// <p>
-    /// <ul>
-    ///   <li>Header --&gt; <seealso cref="CodecUtil#writeHeader CodecHeader"/></li>
-    ///   <li>SegSize --&gt; <seealso cref="DataOutput#writeInt Int32"/></li>
-    ///   <li>SegVersion --&gt; <seealso cref="DataOutput#writeString String"/></li>
-    ///   <li>Files --&gt; <seealso cref="DataOutput#writeStringSet Set&lt;String&gt;"/></li>
-    ///   <li>Diagnostics --&gt; <seealso cref="DataOutput#writeStringStringMap Map&lt;String,String&gt;"/></li>
-    ///   <li>IsCompoundFile --&gt; <seealso cref="DataOutput#writeByte Int8"/></li>
-    ///   <li>Footer --&gt; <seealso cref="CodecUtil#writeFooter CodecFooter"/></li>
-    /// </ul>
-    /// </p>
-    /// Field Descriptions:
-    /// <p>
-    /// <ul>
-    ///   <li>SegVersion is the code version that created the segment.</li>
-    ///   <li>SegSize is the number of documents contained in the segment index.</li>
-    ///   <li>IsCompoundFile records whether the segment is written as a compound file or
-    ///       not. If this is -1, the segment is not a compound file. If it is 1, the segment
-    ///       is a compound file.</li>
-    ///   <li>The Diagnostics Map is privately written by <seealso cref="IndexWriter"/>, as a debugging aid,
-    ///       for each segment it creates. It includes metadata like the current Lucene
-    ///       version, OS, Java version, why the segment was created (merge, flush,
-    ///       addIndexes), etc.</li>
-    ///   <li>Files is a list of files referred to by this segment.</li>
-    /// </ul>
-    /// </p>
-    /// </summary>
-    /// <seealso cref= SegmentInfos
-    /// @lucene.experimental </seealso>
-    public class Lucene46SegmentInfoFormat : SegmentInfoFormat
-    {
-        private readonly SegmentInfoReader reader = new Lucene46SegmentInfoReader();
-        private readonly SegmentInfoWriter writer = new Lucene46SegmentInfoWriter();
-
-        /// <summary>
-        /// Sole constructor. </summary>
-        public Lucene46SegmentInfoFormat()
-        {
-        }
-
-        public override SegmentInfoReader SegmentInfoReader
-        {
-            get
-            {
-                return reader;
-            }
-        }
-
-        public override SegmentInfoWriter SegmentInfoWriter
-        {
-            get
-            {
-                return writer;
-            }
-        }
-
-        /// <summary>
-        /// File extension used to store <seealso cref="SegmentInfo"/>. </summary>
-        public readonly static string SI_EXTENSION = "si";
-
-        internal const string CODEC_NAME = "Lucene46SegmentInfo";
-        internal const int VERSION_START = 0;
-        internal const int VERSION_CHECKSUM = 1;
-        internal const int VERSION_CURRENT = VERSION_CHECKSUM;
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a5dc68d0/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46SegmentInfoReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46SegmentInfoReader.cs b/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46SegmentInfoReader.cs
deleted file mode 100644
index 6cb374e..0000000
--- a/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46SegmentInfoReader.cs
+++ /dev/null
@@ -1,92 +0,0 @@
-using System.Collections.Generic;
-
-namespace Lucene.Net.Codecs.Lucene46
-{
-    /*
-     * Licensed to the Apache Software Foundation (ASF) under one or more
-     * contributor license agreements.  See the NOTICE file distributed with
-     * this work for additional information regarding copyright ownership.
-     * The ASF licenses this file to You under the Apache License, Version 2.0
-     * (the "License"); you may not use this file except in compliance with
-     * the License.  You may obtain a copy of the License at
-     *
-     *     http://www.apache.org/licenses/LICENSE-2.0
-     *
-     * Unless required by applicable law or agreed to in writing, software
-     * distributed under the License is distributed on an "AS IS" BASIS,
-     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     * See the License for the specific language governing permissions and
-     * limitations under the License.
-     */
-
-    using ChecksumIndexInput = Lucene.Net.Store.ChecksumIndexInput;
-    using CorruptIndexException = Lucene.Net.Index.CorruptIndexException;
-    using Directory = Lucene.Net.Store.Directory;
-    using IndexFileNames = Lucene.Net.Index.IndexFileNames;
-    using IOContext = Lucene.Net.Store.IOContext;
-    using IOUtils = Lucene.Net.Util.IOUtils;
-    using SegmentInfo = Lucene.Net.Index.SegmentInfo;
-
-    /// <summary>
-    /// Lucene 4.6 implementation of <seealso cref="SegmentInfoReader"/>.
-    /// </summary>
-    /// <seealso cref= Lucene46SegmentInfoFormat
-    /// @lucene.experimental </seealso>
-    public class Lucene46SegmentInfoReader : SegmentInfoReader
-    {
-        /// <summary>
-        /// Sole constructor. </summary>
-        public Lucene46SegmentInfoReader()
-        {
-        }
-
-        public override SegmentInfo Read(Directory dir, string segment, IOContext context)
-        {
-            string fileName = IndexFileNames.SegmentFileName(segment, "", Lucene46SegmentInfoFormat.SI_EXTENSION);
-            ChecksumIndexInput input = dir.OpenChecksumInput(fileName, context);
-            bool success = false;
-            try
-            {
-                int codecVersion = CodecUtil.CheckHeader(input, Lucene46SegmentInfoFormat.CODEC_NAME, Lucene46SegmentInfoFormat.VERSION_START, Lucene46SegmentInfoFormat.VERSION_CURRENT);
-                string version = input.ReadString();
-                int docCount = input.ReadInt32();
-                if (docCount < 0)
-                {
-                    throw new CorruptIndexException("invalid docCount: " + docCount + " (resource=" + input + ")");
-                }
-                bool isCompoundFile = input.ReadByte() == SegmentInfo.YES;
-                IDictionary<string, string> diagnostics = input.ReadStringStringMap();
-                ISet<string> files = input.ReadStringSet();
-
-                if (codecVersion >= Lucene46SegmentInfoFormat.VERSION_CHECKSUM)
-                {
-                    CodecUtil.CheckFooter(input);
-                }
-                else
-                {
-#pragma warning disable 612, 618
-                    CodecUtil.CheckEOF(input);
-#pragma warning restore 612, 618
-                }
-
-                SegmentInfo si = new SegmentInfo(dir, version, segment, docCount, isCompoundFile, null, diagnostics);
-                si.SetFiles(files);
-
-                success = true;
-
-                return si;
-            }
-            finally
-            {
-                if (!success)
-                {
-                    IOUtils.CloseWhileHandlingException(input);
-                }
-                else
-                {
-                    input.Dispose();
-                }
-            }
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a5dc68d0/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46SegmentInfoWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46SegmentInfoWriter.cs b/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46SegmentInfoWriter.cs
deleted file mode 100644
index 9cf8da9..0000000
--- a/src/Lucene.Net.Core/Codecs/Lucene46/Lucene46SegmentInfoWriter.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-namespace Lucene.Net.Codecs.Lucene46
-{
-    /*
-     * Licensed to the Apache Software Foundation (ASF) under one or more
-     * contributor license agreements.  See the NOTICE file distributed with
-     * this work for additional information regarding copyright ownership.
-     * The ASF licenses this file to You under the Apache License, Version 2.0
-     * (the "License"); you may not use this file except in compliance with
-     * the License.  You may obtain a copy of the License at
-     *
-     *     http://www.apache.org/licenses/LICENSE-2.0
-     *
-     * Unless required by applicable law or agreed to in writing, software
-     * distributed under the License is distributed on an "AS IS" BASIS,
-     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     * See the License for the specific language governing permissions and
-     * limitations under the License.
-     */
-
-    using Directory = Lucene.Net.Store.Directory;
-    using FieldInfos = Lucene.Net.Index.FieldInfos;
-    using IndexFileNames = Lucene.Net.Index.IndexFileNames;
-    using IndexOutput = Lucene.Net.Store.IndexOutput;
-    using IOContext = Lucene.Net.Store.IOContext;
-    using IOUtils = Lucene.Net.Util.IOUtils;
-    using SegmentInfo = Lucene.Net.Index.SegmentInfo;
-
-    /// <summary>
-    /// Lucene 4.0 implementation of <seealso cref="SegmentInfoWriter"/>.
-    /// </summary>
-    /// <seealso cref= Lucene46SegmentInfoFormat
-    /// @lucene.experimental </seealso>
-    public class Lucene46SegmentInfoWriter : SegmentInfoWriter
-    {
-        /// <summary>
-        /// Sole constructor. </summary>
-        public Lucene46SegmentInfoWriter()
-        {
-        }
-
-        /// <summary>
-        /// Save a single segment's info. </summary>
-        public override void Write(Directory dir, SegmentInfo si, FieldInfos fis, IOContext ioContext)
-        {
-            string fileName = IndexFileNames.SegmentFileName(si.Name, "", Lucene46SegmentInfoFormat.SI_EXTENSION);
-            si.AddFile(fileName);
-
-            IndexOutput output = dir.CreateOutput(fileName, ioContext);
-
-            bool success = false;
-            try
-            {
-                CodecUtil.WriteHeader(output, Lucene46SegmentInfoFormat.CODEC_NAME, Lucene46SegmentInfoFormat.VERSION_CURRENT);
-                // Write the Lucene version that created this segment, since 3.1
-                output.WriteString(si.Version);
-                output.WriteInt32(si.DocCount);
-
-                output.WriteByte((byte)(sbyte)(si.UseCompoundFile ? SegmentInfo.YES : SegmentInfo.NO));
-                output.WriteStringStringMap(si.Diagnostics);
-                output.WriteStringSet(si.GetFiles());
-                CodecUtil.WriteFooter(output);
-                success = true;
-            }
-            finally
-            {
-                if (!success)
-                {
-                    IOUtils.CloseWhileHandlingException(output);
-                    si.Dir.DeleteFile(fileName);
-                }
-                else
-                {
-                    output.Dispose();
-                }
-            }
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a5dc68d0/src/Lucene.Net.Core/Codecs/MappingMultiDocsAndPositionsEnum.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/MappingMultiDocsAndPositionsEnum.cs b/src/Lucene.Net.Core/Codecs/MappingMultiDocsAndPositionsEnum.cs
deleted file mode 100644
index 15daee5..0000000
--- a/src/Lucene.Net.Core/Codecs/MappingMultiDocsAndPositionsEnum.cs
+++ /dev/null
@@ -1,179 +0,0 @@
-using Lucene.Net.Support;
-using System.Diagnostics.CodeAnalysis;
-
-namespace Lucene.Net.Codecs
-{
-    /*
-     * Licensed to the Apache Software Foundation (ASF) under one or more
-     * contributor license agreements.  See the NOTICE file distributed with
-     * this work for additional information regarding copyright ownership.
-     * The ASF licenses this file to You under the Apache License, Version 2.0
-     * (the "License"); you may not use this file except in compliance with
-     * the License.  You may obtain a copy of the License at
-     *
-     *     http://www.apache.org/licenses/LICENSE-2.0
-     *
-     * Unless required by applicable law or agreed to in writing, software
-     * distributed under the License is distributed on an "AS IS" BASIS,
-     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     * See the License for the specific language governing permissions and
-     * limitations under the License.
-     */
-
-    using BytesRef = Lucene.Net.Util.BytesRef;
-    using DocsAndPositionsEnum = Lucene.Net.Index.DocsAndPositionsEnum;
-    using MergeState = Lucene.Net.Index.MergeState;
-    using MultiDocsAndPositionsEnum = Lucene.Net.Index.MultiDocsAndPositionsEnum;
-
-    /// <summary>
-    /// Exposes flex API, merged from flex API of sub-segments,
-    /// remapping docIDs (this is used for segment merging).
-    ///
-    /// @lucene.experimental
-    /// </summary>
-    public sealed class MappingMultiDocsAndPositionsEnum : DocsAndPositionsEnum
-    {
-        private MultiDocsAndPositionsEnum.EnumWithSlice[] subs;
-        internal int numSubs;
-        internal int upto;
-        internal MergeState.DocMap currentMap;
-        internal DocsAndPositionsEnum current;
-        internal int currentBase;
-        internal int doc = -1;
-        private MergeState mergeState;
-
-        /// <summary>
-        /// Sole constructor. </summary>
-        public MappingMultiDocsAndPositionsEnum()
-        {
-        }
-
-        internal MappingMultiDocsAndPositionsEnum Reset(MultiDocsAndPositionsEnum postingsEnum)
-        {
-            this.numSubs = postingsEnum.NumSubs;
-            this.subs = postingsEnum.Subs;
-            upto = -1;
-            current = null;
-            return this;
-        }
-
-        /// <summary>
-        /// Sets the <seealso cref="MergeState"/>, which is used to re-map
-        ///  document IDs.
-        /// </summary>
-        public MergeState MergeState
-        {
-            get
-            {
-                return this.mergeState; // LUCENENET specific - per MSDN properties should always have a getter
-            }
-            set
-            {
-                this.mergeState = value;
-            }
-        }
-
-        /// <summary>
-        /// How many sub-readers we are merging. </summary>
-        ///  <seealso cref= #getSubs  </seealso>
-        public int NumSubs
-        {
-            get
-            {
-                return numSubs;
-            }
-        }
-
-        /// <summary>
-        /// Returns sub-readers we are merging. </summary>
-        [WritableArray]
-        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
-        public MultiDocsAndPositionsEnum.EnumWithSlice[] Subs
-        {
-            get { return subs; }
-        }
-
-        public override int Freq
-        {
-            get { return current.Freq; }
-        }
-
-        public override int DocID
-        {
-            get { return doc; }
-        }
-
-        public override int Advance(int target)
-        {
-            throw new System.NotSupportedException();
-        }
-
-        public override int NextDoc()
-        {
-            while (true)
-            {
-                if (current == null)
-                {
-                    if (upto == numSubs - 1)
-                    {
-                        return this.doc = NO_MORE_DOCS;
-                    }
-                    else
-                    {
-                        upto++;
-                        int reader = subs[upto].Slice.ReaderIndex;
-                        current = subs[upto].DocsAndPositionsEnum;
-                        currentBase = mergeState.DocBase[reader];
-                        currentMap = mergeState.DocMaps[reader];
-                    }
-                }
-
-                int doc = current.NextDoc();
-                if (doc != NO_MORE_DOCS)
-                {
-                    // compact deletions
-                    doc = currentMap.Get(doc);
-                    if (doc == -1)
-                    {
-                        continue;
-                    }
-                    return this.doc = currentBase + doc;
-                }
-                else
-                {
-                    current = null;
-                }
-            }
-        }
-
-        public override int NextPosition()
-        {
-            return current.NextPosition();
-        }
-
-        public override int StartOffset
-        {
-            get { return current.StartOffset; }
-        }
-
-        public override int EndOffset
-        {
-            get { return current.EndOffset; }
-        }
-
-        public override BytesRef GetPayload()
-        {
-            return current.GetPayload();
-        }
-
-        public override long GetCost()
-        {
-            long cost = 0;
-            foreach (MultiDocsAndPositionsEnum.EnumWithSlice enumWithSlice in subs)
-            {
-                cost += enumWithSlice.DocsAndPositionsEnum.GetCost();
-            }
-            return cost;
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a5dc68d0/src/Lucene.Net.Core/Codecs/MappingMultiDocsEnum.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/MappingMultiDocsEnum.cs b/src/Lucene.Net.Core/Codecs/MappingMultiDocsEnum.cs
deleted file mode 100644
index b16b2ab..0000000
--- a/src/Lucene.Net.Core/Codecs/MappingMultiDocsEnum.cs
+++ /dev/null
@@ -1,160 +0,0 @@
-using Lucene.Net.Support;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-
-namespace Lucene.Net.Codecs
-{
-    /*
-     * Licensed to the Apache Software Foundation (ASF) under one or more
-     * contributor license agreements.  See the NOTICE file distributed with
-     * this work for additional information regarding copyright ownership.
-     * The ASF licenses this file to You under the Apache License, Version 2.0
-     * (the "License"); you may not use this file except in compliance with
-     * the License.  You may obtain a copy of the License at
-     *
-     *     http://www.apache.org/licenses/LICENSE-2.0
-     *
-     * Unless required by applicable law or agreed to in writing, software
-     * distributed under the License is distributed on an "AS IS" BASIS,
-     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     * See the License for the specific language governing permissions and
-     * limitations under the License.
-     */
-
-    using DocsEnum = Lucene.Net.Index.DocsEnum;
-    using MergeState = Lucene.Net.Index.MergeState;
-    using MultiDocsEnum = Lucene.Net.Index.MultiDocsEnum;
-
-    /// <summary>
-    /// Exposes flex API, merged from flex API of sub-segments,
-    /// remapping docIDs (this is used for segment merging).
-    ///
-    /// @lucene.experimental
-    /// </summary>
-    public sealed class MappingMultiDocsEnum : DocsEnum
-    {
-        private MultiDocsEnum.EnumWithSlice[] subs;
-        internal int numSubs;
-        internal int upto;
-        internal MergeState.DocMap currentMap;
-        internal DocsEnum current;
-        internal int currentBase;
-        internal int doc = -1;
-        private MergeState mergeState;
-
-        /// <summary>
-        /// Sole constructor. </summary>
-        public MappingMultiDocsEnum()
-        {
-        }
-
-        internal MappingMultiDocsEnum Reset(MultiDocsEnum docsEnum)
-        {
-            this.numSubs = docsEnum.NumSubs;
-            this.subs = docsEnum.Subs;
-            upto = -1;
-            current = null;
-            return this;
-        }
-
-        /// <summary>
-        /// Sets the <seealso cref="MergeState"/>, which is used to re-map
-        ///  document IDs.
-        /// </summary>
-        public MergeState MergeState
-        {
-            get
-            {
-                return this.mergeState; // LUCENENET specific - per MSDN properties should always have a getter
-            }
-            set
-            {
-                this.mergeState = value;
-            }
-        }
-
-        /// <summary>
-        /// How many sub-readers we are merging. </summary>
-        ///  <seealso cref= #getSubs  </seealso>
-        public int NumSubs
-        {
-            get
-            {
-                return numSubs;
-            }
-        }
-
-        /// <summary>
-        /// Returns sub-readers we are merging. </summary>
-        [WritableArray]
-        [SuppressMessage("Microsoft.Performance", "CA1819", Justification = "Lucene's design requires some writable array properties")]
-        public MultiDocsEnum.EnumWithSlice[] Subs
-        {
-            get { return subs; }
-        }
-
-        public override int Freq
-        {
-            get { return current.Freq; }
-        }
-
-        public override int DocID
-        {
-            get { return doc; }
-        }
-
-        public override int Advance(int target)
-        {
-            throw new System.NotSupportedException();
-        }
-
-        public override int NextDoc()
-        {
-            while (true)
-            {
-                if (current == null)
-                {
-                    if (upto == numSubs - 1)
-                    {
-                        return this.doc = NO_MORE_DOCS;
-                    }
-                    else
-                    {
-                        upto++;
-                        int reader = subs[upto].Slice.ReaderIndex;
-                        current = subs[upto].DocsEnum;
-                        currentBase = mergeState.DocBase[reader];
-                        currentMap = mergeState.DocMaps[reader];
-                        Debug.Assert(currentMap.MaxDoc == subs[upto].Slice.Length, "readerIndex=" + reader + " subs.len=" + subs.Length + " len1=" + currentMap.MaxDoc + " vs " + subs[upto].Slice.Length);
-                    }
-                }
-
-                int doc = current.NextDoc();
-                if (doc != NO_MORE_DOCS)
-                {
-                    // compact deletions
-                    doc = currentMap.Get(doc);
-                    if (doc == -1)
-                    {
-                        continue;
-                    }
-                    return this.doc = currentBase + doc;
-                }
-                else
-                {
-                    current = null;
-                }
-            }
-        }
-
-        public override long GetCost()
-        {
-            long cost = 0;
-            foreach (MultiDocsEnum.EnumWithSlice enumWithSlice in subs)
-            {
-                cost += enumWithSlice.DocsEnum.GetCost();
-            }
-            return cost;
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a5dc68d0/src/Lucene.Net.Core/Codecs/MultiLevelSkipListReader.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/MultiLevelSkipListReader.cs b/src/Lucene.Net.Core/Codecs/MultiLevelSkipListReader.cs
deleted file mode 100644
index 0399aaa..0000000
--- a/src/Lucene.Net.Core/Codecs/MultiLevelSkipListReader.cs
+++ /dev/null
@@ -1,376 +0,0 @@
-using System;
-using System.Diagnostics;
-
-namespace Lucene.Net.Codecs
-{
-    /*
-     * Licensed to the Apache Software Foundation (ASF) under one or more
-     * contributor license agreements.  See the NOTICE file distributed with
-     * this work for additional information regarding copyright ownership.
-     * The ASF licenses this file to You under the Apache License, Version 2.0
-     * (the "License"); you may not use this file except in compliance with
-     * the License.  You may obtain a copy of the License at
-     *
-     *     http://www.apache.org/licenses/LICENSE-2.0
-     *
-     * Unless required by applicable law or agreed to in writing, software
-     * distributed under the License is distributed on an "AS IS" BASIS,
-     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     * See the License for the specific language governing permissions and
-     * limitations under the License.
-     */
-
-    using BufferedIndexInput = Lucene.Net.Store.BufferedIndexInput;
-    using IndexInput = Lucene.Net.Store.IndexInput;
-    using MathUtil = Lucene.Net.Util.MathUtil;
-
-    /// <summary>
-    /// this abstract class reads skip lists with multiple levels.
-    ///
-    /// See <seealso cref="MultiLevelSkipListWriter"/> for the information about the encoding
-    /// of the multi level skip lists.
-    ///
-    /// Subclasses must implement the abstract method <seealso cref="#readSkipData(int, IndexInput)"/>
-    /// which defines the actual format of the skip data.
-    /// @lucene.experimental
-    /// </summary>
-
-    public abstract class MultiLevelSkipListReader : IDisposable
-    {
-        /// <summary>
-        /// the maximum number of skip levels possible for this index </summary>
-        protected internal int m_maxNumberOfSkipLevels;
-
-        // number of levels in this skip list
-        private int numberOfSkipLevels;
-
-        // Expert: defines the number of top skip levels to buffer in memory.
-        // Reducing this number results in less memory usage, but possibly
-        // slower performance due to more random I/Os.
-        // Please notice that the space each level occupies is limited by
-        // the skipInterval. The top level can not contain more than
-        // skipLevel entries, the second top level can not contain more
-        // than skipLevel^2 entries and so forth.
-        private int numberOfLevelsToBuffer = 1;
-
-        private int docCount;
-        private bool haveSkipped;
-
-        /// <summary>
-        /// skipStream for each level. </summary>
-        private IndexInput[] skipStream;
-
-        /// <summary>
-        /// The start pointer of each skip level. </summary>
-        private long[] skipPointer;
-
-        /// <summary>
-        ///  skipInterval of each level. </summary>
-        private int[] skipInterval;
-
-        /// <summary>
-        /// Number of docs skipped per level. </summary>
-        private int[] numSkipped;
-
-        /// <summary>
-        /// Doc id of current skip entry per level. </summary>
-        protected internal int[] m_skipDoc;
-
-        /// <summary>
-        /// Doc id of last read skip entry with docId &lt;= target. </summary>
-        private int lastDoc;
-
-        /// <summary>
-        /// Child pointer of current skip entry per level. </summary>
-        private long[] childPointer;
-
-        /// <summary>
-        /// childPointer of last read skip entry with docId &lt;=
-        ///  target.
-        /// </summary>
-        private long lastChildPointer;
-
-        private bool inputIsBuffered;
-        private readonly int skipMultiplier;
-
-        /// <summary>
-        /// Creates a {@code MultiLevelSkipListReader}. </summary>
-        protected MultiLevelSkipListReader(IndexInput skipStream, int maxSkipLevels, int skipInterval, int skipMultiplier)
-        {
-            this.skipStream = new IndexInput[maxSkipLevels];
-            this.skipPointer = new long[maxSkipLevels];
-            this.childPointer = new long[maxSkipLevels];
-            this.numSkipped = new int[maxSkipLevels];
-            this.m_maxNumberOfSkipLevels = maxSkipLevels;
-            this.skipInterval = new int[maxSkipLevels];
-            this.skipMultiplier = skipMultiplier;
-            this.skipStream[0] = skipStream;
-            this.inputIsBuffered = (skipStream is BufferedIndexInput);
-            this.skipInterval[0] = skipInterval;
-            for (int i = 1; i < maxSkipLevels; i++)
-            {
-                // cache skip intervals
-                this.skipInterval[i] = this.skipInterval[i - 1] * skipMultiplier;
-            }
-            m_skipDoc = new int[maxSkipLevels];
-        }
-
-        /// <summary>
-        /// Creates a {@code MultiLevelSkipListReader}, where
-        ///  {@code skipInterval} and {@code skipMultiplier} are
-        ///  the same.
-        /// </summary>
-        protected internal MultiLevelSkipListReader(IndexInput skipStream, int maxSkipLevels, int skipInterval)
-            : this(skipStream, maxSkipLevels, skipInterval, skipInterval)
-        {
-        }
-
-        /// <summary>
-        /// Returns the id of the doc to which the last call of <seealso cref="#skipTo(int)"/>
-        ///  has skipped.
-        /// </summary>
-        public virtual int Doc
-        {
-            get
-            {
-                return lastDoc;
-            }
-        }
-
-        /// <summary>
-        /// Skips entries to the first beyond the current whose document number is
-        ///  greater than or equal to <i>target</i>. Returns the current doc count.
-        /// </summary>
-        public virtual int SkipTo(int target)
-        {
-            if (!haveSkipped)
-            {
-                // first time, load skip levels
-                LoadSkipLevels();
-                haveSkipped = true;
-            }
-
-            // walk up the levels until highest level is found that has a skip
-            // for this target
-            int level = 0;
-            while (level < numberOfSkipLevels - 1 && target > m_skipDoc[level + 1])
-            {
-                level++;
-            }
-
-            while (level >= 0)
-            {
-                if (target > m_skipDoc[level])
-                {
-                    if (!LoadNextSkip(level))
-                    {
-                        continue;
-                    }
-                }
-                else
-                {
-                    // no more skips on this level, go down one level
-                    if (level > 0 && lastChildPointer > skipStream[level - 1].GetFilePointer())
-                    {
-                        SeekChild(level - 1);
-                    }
-                    level--;
-                }
-            }
-
-            return numSkipped[0] - skipInterval[0] - 1;
-        }
-
-        private bool LoadNextSkip(int level)
-        {
-            // we have to skip, the target document is greater than the current
-            // skip list entry
-            SetLastSkipData(level);
-
-            numSkipped[level] += skipInterval[level];
-
-            if (numSkipped[level] > docCount)
-            {
-                // this skip list is exhausted
-                m_skipDoc[level] = int.MaxValue;
-                if (numberOfSkipLevels > level)
-                {
-                    numberOfSkipLevels = level;
-                }
-                return false;
-            }
-
-            // read next skip entry
-            m_skipDoc[level] += ReadSkipData(level, skipStream[level]);
-
-            if (level != 0)
-            {
-                // read the child pointer if we are not on the leaf level
-                childPointer[level] = skipStream[level].ReadVInt64() + skipPointer[level - 1];
-            }
-
-            return true;
-        }
-
-        /// <summary>
-        /// Seeks the skip entry on the given level </summary>
-        protected virtual void SeekChild(int level)
-        {
-            skipStream[level].Seek(lastChildPointer);
-            numSkipped[level] = numSkipped[level + 1] - skipInterval[level + 1];
-            m_skipDoc[level] = lastDoc;
-            if (level > 0)
-            {
-                childPointer[level] = skipStream[level].ReadVInt64() + skipPointer[level - 1];
-            }
-        }
-
-        public void Dispose()
-        {
-            for (int i = 1; i < skipStream.Length; i++)
-            {
-                if (skipStream[i] != null)
-                {
-                    skipStream[i].Dispose();
-                }
-            }
-        }
-
-        /// <summary>
-        /// Initializes the reader, for reuse on a new term. </summary>
-        public virtual void Init(long skipPointer, int df)
-        {
-            this.skipPointer[0] = skipPointer;
-            this.docCount = df;
-            Debug.Assert(skipPointer >= 0 && skipPointer <= skipStream[0].Length, "invalid skip pointer: " + skipPointer + ", length=" + skipStream[0].Length);
-            Array.Clear(m_skipDoc, 0, m_skipDoc.Length);
-            Array.Clear(numSkipped, 0, numSkipped.Length);
-            Array.Clear(childPointer, 0, childPointer.Length);
-
-            haveSkipped = false;
-            for (int i = 1; i < numberOfSkipLevels; i++)
-            {
-                skipStream[i] = null;
-            }
-        }
-
-        /// <summary>
-        /// Loads the skip levels </summary>
-        private void LoadSkipLevels()
-        {
-            if (docCount <= skipInterval[0])
-            {
-                numberOfSkipLevels = 1;
-            }
-            else
-            {
-                numberOfSkipLevels = 1 + MathUtil.Log(docCount / skipInterval[0], skipMultiplier);
-            }
-
-            if (numberOfSkipLevels > m_maxNumberOfSkipLevels)
-            {
-                numberOfSkipLevels = m_maxNumberOfSkipLevels;
-            }
-
-            skipStream[0].Seek(skipPointer[0]);
-
-            int toBuffer = numberOfLevelsToBuffer;
-
-            for (int i = numberOfSkipLevels - 1; i > 0; i--)
-            {
-                // the length of the current level
-                long length = skipStream[0].ReadVInt64();
-
-                // the start pointer of the current level
-                skipPointer[i] = skipStream[0].GetFilePointer();
-                if (toBuffer > 0)
-                {
-                    // buffer this level
-                    skipStream[i] = new SkipBuffer(skipStream[0], (int)length);
-                    toBuffer--;
-                }
-                else
-                {
-                    // clone this stream, it is already at the start of the current level
-                    skipStream[i] = (IndexInput)skipStream[0].Clone();
-                    if (inputIsBuffered && length < BufferedIndexInput.BUFFER_SIZE)
-                    {
-                        ((BufferedIndexInput)skipStream[i]).SetBufferSize((int)length);
-                    }
-
-                    // move base stream beyond the current level
-                    skipStream[0].Seek(skipStream[0].GetFilePointer() + length);
-                }
-            }
-
-            // use base stream for the lowest level
-            skipPointer[0] = skipStream[0].GetFilePointer();
-        }
-
-        /// <summary>
-        /// Subclasses must implement the actual skip data encoding in this method.
-        /// </summary>
-        /// <param name="level"> the level skip data shall be read from </param>
-        /// <param name="skipStream"> the skip stream to read from </param>
-        protected abstract int ReadSkipData(int level, IndexInput skipStream);
-
-        /// <summary>
-        /// Copies the values of the last read skip entry on this <paramref name="level"/> </summary>
-        protected virtual void SetLastSkipData(int level)
-        {
-            lastDoc = m_skipDoc[level];
-            lastChildPointer = childPointer[level];
-        }
-
-        /// <summary>
-        /// used to buffer the top skip levels </summary>
-        private sealed class SkipBuffer : IndexInput
-        {
-            private byte[] data;
-            private long pointer;
-            private int pos;
-
-            internal SkipBuffer(IndexInput input, int length)
-                : base("SkipBuffer on " + input)
-            {
-                data = new byte[length];
-                pointer = input.GetFilePointer();
-                input.ReadBytes(data, 0, length);
-            }
-
-            protected override void Dispose(bool disposing)
-            {
-                if (disposing)
-                {
-                    data = null;
-                }
-            }
-
-            public override long GetFilePointer()
-            {
-                return pointer + pos;
-            }
-
-            public override long Length
-            {
-                get { return data.Length; }
-            }
-
-            public override byte ReadByte()
-            {
-                return data[pos++];
-            }
-
-            public override void ReadBytes(byte[] b, int offset, int len)
-            {
-                Array.Copy(data, pos, b, offset, len);
-                pos += len;
-            }
-
-            public override void Seek(long pos)
-            {
-                this.pos = (int)(pos - pointer);
-            }
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a5dc68d0/src/Lucene.Net.Core/Codecs/MultiLevelSkipListWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/MultiLevelSkipListWriter.cs b/src/Lucene.Net.Core/Codecs/MultiLevelSkipListWriter.cs
deleted file mode 100644
index d7fe18b..0000000
--- a/src/Lucene.Net.Core/Codecs/MultiLevelSkipListWriter.cs
+++ /dev/null
@@ -1,207 +0,0 @@
-using System.Diagnostics;
-
-namespace Lucene.Net.Codecs
-{
-    /*
-     * Licensed to the Apache Software Foundation (ASF) under one or more
-     * contributor license agreements.  See the NOTICE file distributed with
-     * this work for additional information regarding copyright ownership.
-     * The ASF licenses this file to You under the Apache License, Version 2.0
-     * (the "License"); you may not use this file except in compliance with
-     * the License.  You may obtain a copy of the License at
-     *
-     *     http://www.apache.org/licenses/LICENSE-2.0
-     *
-     * Unless required by applicable law or agreed to in writing, software
-     * distributed under the License is distributed on an "AS IS" BASIS,
-     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     * See the License for the specific language governing permissions and
-     * limitations under the License.
-     */
-
-    using IndexOutput = Lucene.Net.Store.IndexOutput;
-    using MathUtil = Lucene.Net.Util.MathUtil;
-    using RAMOutputStream = Lucene.Net.Store.RAMOutputStream;
-
-    /// <summary>
-    /// this abstract class writes skip lists with multiple levels.
-    ///
-    /// <pre>
-    ///
-    /// Example for skipInterval = 3:
-    ///                                                     c            (skip level 2)
-    ///                 c                 c                 c            (skip level 1)
-    ///     x     x     x     x     x     x     x     x     x     x      (skip level 0)
-    /// d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d d  (posting list)
-    ///     3     6     9     12    15    18    21    24    27    30     (df)
-    ///
-    /// d - document
-    /// x - skip data
-    /// c - skip data with child pointer
-    ///
-    /// Skip level i contains every skipInterval-th entry from skip level i-1.
-    /// Therefore the number of entries on level i is: floor(df / ((skipInterval ^ (i + 1))).
-    ///
-    /// Each skip entry on a level i>0 contains a pointer to the corresponding skip entry in list i-1.
-    /// this guarantees a logarithmic amount of skips to find the target document.
-    ///
-    /// While this class takes care of writing the different skip levels,
-    /// subclasses must define the actual format of the skip data.
-    /// </pre>
-    /// @lucene.experimental
-    /// </summary>
-
-    public abstract class MultiLevelSkipListWriter
-    {
-        /// <summary>
-        /// number of levels in this skip list </summary>
-        protected internal int m_numberOfSkipLevels;
-
-        /// <summary>
-        /// the skip interval in the list with level = 0 </summary>
-        private int skipInterval;
-
-        /// <summary>
-        /// skipInterval used for level &gt; 0 </summary>
-        private int skipMultiplier;
-
-        /// <summary>
-        /// for every skip level a different buffer is used </summary>
-        private RAMOutputStream[] skipBuffer;
-
-        /// <summary>
-        /// Creates a {@code MultiLevelSkipListWriter}. </summary>
-        protected MultiLevelSkipListWriter(int skipInterval, int skipMultiplier, int maxSkipLevels, int df)
-        {
-            this.skipInterval = skipInterval;
-            this.skipMultiplier = skipMultiplier;
-
-            // calculate the maximum number of skip levels for this document frequency
-            if (df <= skipInterval)
-            {
-                m_numberOfSkipLevels = 1;
-            }
-            else
-            {
-                m_numberOfSkipLevels = 1 + MathUtil.Log(df / skipInterval, skipMultiplier);
-            }
-
-            // make sure it does not exceed maxSkipLevels
-            if (m_numberOfSkipLevels > maxSkipLevels)
-            {
-                m_numberOfSkipLevels = maxSkipLevels;
-            }
-        }
-
-        /// <summary>
-        /// Creates a {@code MultiLevelSkipListWriter}, where
-        ///  {@code skipInterval} and {@code skipMultiplier} are
-        ///  the same.
-        /// </summary>
-        protected MultiLevelSkipListWriter(int skipInterval, int maxSkipLevels, int df)
-            : this(skipInterval, skipInterval, maxSkipLevels, df)
-        {
-        }
-
-        /// <summary>
-        /// Allocates internal skip buffers. </summary>
-        protected virtual void Init()
-        {
-            skipBuffer = new RAMOutputStream[m_numberOfSkipLevels];
-            for (int i = 0; i < m_numberOfSkipLevels; i++)
-            {
-                skipBuffer[i] = new RAMOutputStream();
-            }
-        }
-
-        /// <summary>
-        /// Creates new buffers or empties the existing ones </summary>
-        public virtual void ResetSkip()
-        {
-            if (skipBuffer == null)
-            {
-                Init();
-            }
-            else
-            {
-                for (int i = 0; i < skipBuffer.Length; i++)
-                {
-                    skipBuffer[i].Reset();
-                }
-            }
-        }
-
-        /// <summary>
-        /// Subclasses must implement the actual skip data encoding in this method.
-        /// </summary>
-        /// <param name="level"> the level skip data shall be writing for </param>
-        /// <param name="skipBuffer"> the skip buffer to write to </param>
-        protected abstract void WriteSkipData(int level, IndexOutput skipBuffer);
-
-        /// <summary>
-        /// Writes the current skip data to the buffers. The current document frequency determines
-        /// the max level is skip data is to be written to.
-        /// </summary>
-        /// <param name="df"> the current document frequency </param>
-        /// <exception cref="IOException"> If an I/O error occurs </exception>
-        public virtual void BufferSkip(int df)
-        {
-            Debug.Assert(df % skipInterval == 0);
-            int numLevels = 1;
-            df /= skipInterval;
-
-            // determine max level
-            while ((df % skipMultiplier) == 0 && numLevels < m_numberOfSkipLevels)
-            {
-                numLevels++;
-                df /= skipMultiplier;
-            }
-
-            long childPointer = 0;
-
-            for (int level = 0; level < numLevels; level++)
-            {
-                WriteSkipData(level, skipBuffer[level]);
-
-                long newChildPointer = skipBuffer[level].GetFilePointer();
-
-                if (level != 0)
-                {
-                    // store child pointers for all levels except the lowest
-                    skipBuffer[level].WriteVInt64(childPointer);
-                }
-
-                //remember the childPointer for the next level
-                childPointer = newChildPointer;
-            }
-        }
-
-        /// <summary>
-        /// Writes the buffered skip lists to the given output.
-        /// </summary>
-        /// <param name="output"> the IndexOutput the skip lists shall be written to </param>
-        /// <returns> the pointer the skip list starts </returns>
-        public virtual long WriteSkip(IndexOutput output)
-        {
-            long skipPointer = output.GetFilePointer();
-            //System.out.println("skipper.writeSkip fp=" + skipPointer);
-            if (skipBuffer == null || skipBuffer.Length == 0)
-            {
-                return skipPointer;
-            }
-
-            for (int level = m_numberOfSkipLevels - 1; level > 0; level--)
-            {
-                long length = skipBuffer[level].GetFilePointer();
-                if (length > 0)
-                {
-                    output.WriteVInt64(length);
-                    skipBuffer[level].WriteTo(output);
-                }
-            }
-            skipBuffer[0].WriteTo(output);
-
-            return skipPointer;
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a5dc68d0/src/Lucene.Net.Core/Codecs/NormsFormat.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/NormsFormat.cs b/src/Lucene.Net.Core/Codecs/NormsFormat.cs
deleted file mode 100644
index 0bb97a9..0000000
--- a/src/Lucene.Net.Core/Codecs/NormsFormat.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-namespace Lucene.Net.Codecs
-{
-    /*
-     * Licensed to the Apache Software Foundation (ASF) under one or more
-     * contributor license agreements.  See the NOTICE file distributed with
-     * this work for additional information regarding copyright ownership.
-     * The ASF licenses this file to You under the Apache License, Version 2.0
-     * (the "License"); you may not use this file except in compliance with
-     * the License.  You may obtain a copy of the License at
-     *
-     *     http://www.apache.org/licenses/LICENSE-2.0
-     *
-     * Unless required by applicable law or agreed to in writing, software
-     * distributed under the License is distributed on an "AS IS" BASIS,
-     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-     * See the License for the specific language governing permissions and
-     * limitations under the License.
-     */
-
-    using SegmentReadState = Lucene.Net.Index.SegmentReadState;
-    using SegmentWriteState = Lucene.Net.Index.SegmentWriteState;
-
-    /// <summary>
-    /// Encodes/decodes per-document score normalization values.
-    /// </summary>
-    public abstract class NormsFormat
-    {
-        /// <summary>
-        /// Sole constructor. (For invocation by subclass
-        ///  constructors, typically implicit.)
-        /// </summary>
-        protected internal NormsFormat()
-        {
-        }
-
-        /// <summary>
-        /// Returns a <seealso cref="DocValuesConsumer"/> to write norms to the
-        ///  index.
-        /// </summary>
-        public abstract DocValuesConsumer NormsConsumer(SegmentWriteState state);
-
-        /// <summary>
-        /// Returns a <seealso cref="DocValuesProducer"/> to read norms from the index.
-        /// <p>
-        /// NOTE: by the time this call returns, it must hold open any files it will
-        /// need to use; else, those files may be deleted. Additionally, required files
-        /// may be deleted during the execution of this call before there is a chance
-        /// to open them. Under these circumstances an IOException should be thrown by
-        /// the implementation. IOExceptions are expected and will automatically cause
-        /// a retry of the segment opening logic with the newly revised segments.
-        /// </summary>
-        public abstract DocValuesProducer NormsProducer(SegmentReadState state);
-    }
-}
\ No newline at end of file


Mime
View raw message