lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [28/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:34 GMT
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a5dc68d0/src/Lucene.Net.Core/Codecs/TermVectorsWriter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/TermVectorsWriter.cs b/src/Lucene.Net.Core/Codecs/TermVectorsWriter.cs
deleted file mode 100644
index dd195c3..0000000
--- a/src/Lucene.Net.Core/Codecs/TermVectorsWriter.cs
+++ /dev/null
@@ -1,366 +0,0 @@
-using Lucene.Net.Support;
-using System;
-using System.Collections.Generic;
-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 AtomicReader = Lucene.Net.Index.AtomicReader;
-    using IBits = Lucene.Net.Util.IBits;
-    using BytesRef = Lucene.Net.Util.BytesRef;
-    using DataInput = Lucene.Net.Store.DataInput;
-    using DocIdSetIterator = Lucene.Net.Search.DocIdSetIterator;
-    using DocsAndPositionsEnum = Lucene.Net.Index.DocsAndPositionsEnum;
-    using FieldInfo = Lucene.Net.Index.FieldInfo;
-    using FieldInfos = Lucene.Net.Index.FieldInfos;
-    using Fields = Lucene.Net.Index.Fields;
-    using MergeState = Lucene.Net.Index.MergeState;
-    using Terms = Lucene.Net.Index.Terms;
-    using TermsEnum = Lucene.Net.Index.TermsEnum;
-
-    /// <summary>
-    /// Codec API for writing term vectors:
-    /// <p>
-    /// <ol>
-    ///   <li>For every document, <seealso cref="#startDocument(int)"/> is called,
-    ///       informing the Codec how many fields will be written.
-    ///   <li><seealso cref="#startField(FieldInfo, int, boolean, boolean, boolean)"/> is called for
-    ///       each field in the document, informing the codec how many terms
-    ///       will be written for that field, and whether or not positions,
-    ///       offsets, or payloads are enabled.
-    ///   <li>Within each field, <seealso cref="#startTerm(BytesRef, int)"/> is called
-    ///       for each term.
-    ///   <li>If offsets and/or positions are enabled, then
-    ///       <seealso cref="#addPosition(int, int, int, BytesRef)"/> will be called for each term
-    ///       occurrence.
-    ///   <li>After all documents have been written, <seealso cref="#finish(FieldInfos, int)"/>
-    ///       is called for verification/sanity-checks.
-    ///   <li>Finally the writer is closed (<seealso cref="#close()"/>)
-    /// </ol>
-    ///
-    /// @lucene.experimental
-    /// </summary>
-    public abstract class TermVectorsWriter : IDisposable
-    {
-        /// <summary>
-        /// Sole constructor. (For invocation by subclass
-        ///  constructors, typically implicit.)
-        /// </summary>
-        protected internal TermVectorsWriter()
-        {
-        }
-
-        /// <summary>
-        /// Called before writing the term vectors of the document.
-        ///  <seealso cref="#startField(FieldInfo, int, boolean, boolean, boolean)"/> will
-        ///  be called <code>numVectorFields</code> times. Note that if term
-        ///  vectors are enabled, this is called even if the document
-        ///  has no vector fields, in this case <code>numVectorFields</code>
-        ///  will be zero.
-        /// </summary>
-        public abstract void StartDocument(int numVectorFields);
-
-        /// <summary>
-        /// Called after a doc and all its fields have been added. </summary>
-        public virtual void FinishDocument()
-        {
-        }
-
-        /// <summary>
-        /// Called before writing the terms of the field.
-        ///  <seealso cref="#startTerm(BytesRef, int)"/> will be called <code>numTerms</code> times.
-        /// </summary>
-        public abstract void StartField(FieldInfo info, int numTerms, bool positions, bool offsets, bool payloads);
-
-        /// <summary>
-        /// Called after a field and all its terms have been added. </summary>
-        public virtual void FinishField()
-        {
-        }
-
-        /// <summary>
-        /// Adds a term and its term frequency <code>freq</code>.
-        /// If this field has positions and/or offsets enabled, then
-        /// <seealso cref="#addPosition(int, int, int, BytesRef)"/> will be called
-        /// <code>freq</code> times respectively.
-        /// </summary>
-        public abstract void StartTerm(BytesRef term, int freq);
-
-        /// <summary>
-        /// Called after a term and all its positions have been added. </summary>
-        public virtual void FinishTerm()
-        {
-        }
-
-        /// <summary>
-        /// Adds a term position and offsets </summary>
-        public abstract void AddPosition(int position, int startOffset, int endOffset, BytesRef payload);
-
-        /// <summary>
-        /// Aborts writing entirely, implementation should remove
-        ///  any partially-written files, etc.
-        /// </summary>
-        public abstract void Abort();
-
-        /// <summary>
-        /// Called before <seealso cref="#close()"/>, passing in the number
-        ///  of documents that were written. Note that this is
-        ///  intentionally redundant (equivalent to the number of
-        ///  calls to <seealso cref="#startDocument(int)"/>, but a Codec should
-        ///  check that this is the case to detect the JRE bug described
-        ///  in LUCENE-1282.
-        /// </summary>
-        public abstract void Finish(FieldInfos fis, int numDocs);
-
-        /// <summary>
-        /// Called by IndexWriter when writing new segments.
-        /// <p>
-        /// this is an expert API that allows the codec to consume
-        /// positions and offsets directly from the indexer.
-        /// <p>
-        /// The default implementation calls <seealso cref="#addPosition(int, int, int, BytesRef)"/>,
-        /// but subclasses can override this if they want to efficiently write
-        /// all the positions, then all the offsets, for example.
-        /// <p>
-        /// NOTE: this API is extremely expert and subject to change or removal!!!
-        /// @lucene.internal
-        /// </summary>
-        // TODO: we should probably nuke this and make a more efficient 4.x format
-        // PreFlex-RW could then be slow and buffer (its only used in tests...)
-        public virtual void AddProx(int numProx, DataInput positions, DataInput offsets)
-        {
-            int position = 0;
-            int lastOffset = 0;
-            BytesRef payload = null;
-
-            for (int i = 0; i < numProx; i++)
-            {
-                int startOffset;
-                int endOffset;
-                BytesRef thisPayload;
-
-                if (positions == null)
-                {
-                    position = -1;
-                    thisPayload = null;
-                }
-                else
-                {
-                    int code = positions.ReadVInt32();
-                    position += (int)((uint)code >> 1);
-                    if ((code & 1) != 0)
-                    {
-                        // this position has a payload
-                        int payloadLength = positions.ReadVInt32();
-
-                        if (payload == null)
-                        {
-                            payload = new BytesRef();
-                            payload.Bytes = new byte[payloadLength];
-                        }
-                        else if (payload.Bytes.Length < payloadLength)
-                        {
-                            payload.Grow(payloadLength);
-                        }
-
-                        positions.ReadBytes(payload.Bytes, 0, payloadLength);
-                        payload.Length = payloadLength;
-                        thisPayload = payload;
-                    }
-                    else
-                    {
-                        thisPayload = null;
-                    }
-                }
-
-                if (offsets == null)
-                {
-                    startOffset = endOffset = -1;
-                }
-                else
-                {
-                    startOffset = lastOffset + offsets.ReadVInt32();
-                    endOffset = startOffset + offsets.ReadVInt32();
-                    lastOffset = endOffset;
-                }
-                AddPosition(position, startOffset, endOffset, thisPayload);
-            }
-        }
-
-        /// <summary>
-        /// Merges in the term vectors from the readers in
-        ///  <code>mergeState</code>. The default implementation skips
-        ///  over deleted documents, and uses <seealso cref="#startDocument(int)"/>,
-        ///  <seealso cref="#startField(FieldInfo, int, boolean, boolean, boolean)"/>,
-        ///  <seealso cref="#startTerm(BytesRef, int)"/>, <seealso cref="#addPosition(int, int, int, BytesRef)"/>,
-        ///  and <seealso cref="#finish(FieldInfos, int)"/>,
-        ///  returning the number of documents that were written.
-        ///  Implementations can override this method for more sophisticated
-        ///  merging (bulk-byte copying, etc).
-        /// </summary>
-        public virtual int Merge(MergeState mergeState)
-        {
-            int docCount = 0;
-            for (int i = 0; i < mergeState.Readers.Count; i++)
-            {
-                AtomicReader reader = mergeState.Readers[i];
-                int maxDoc = reader.MaxDoc;
-                IBits liveDocs = reader.LiveDocs;
-
-                for (int docID = 0; docID < maxDoc; docID++)
-                {
-                    if (liveDocs != null && !liveDocs.Get(docID))
-                    {
-                        // skip deleted docs
-                        continue;
-                    }
-                    // NOTE: it's very important to first assign to vectors then pass it to
-                    // termVectorsWriter.addAllDocVectors; see LUCENE-1282
-                    Fields vectors = reader.GetTermVectors(docID);
-                    AddAllDocVectors(vectors, mergeState);
-                    docCount++;
-                    mergeState.CheckAbort.Work(300);
-                }
-            }
-            Finish(mergeState.FieldInfos, docCount);
-            return docCount;
-        }
-
-        /// <summary>
-        /// Safe (but, slowish) default method to write every
-        ///  vector field in the document.
-        /// </summary>
-        protected void AddAllDocVectors(Fields vectors, MergeState mergeState)
-        {
-            if (vectors == null)
-            {
-                StartDocument(0);
-                FinishDocument();
-                return;
-            }
-
-            int numFields = vectors.Count;
-            if (numFields == -1)
-            {
-                // count manually! TODO: Maybe enforce that Fields.size() returns something valid?
-                numFields = 0;
-                //for (IEnumerator<string> it = vectors.Iterator(); it.hasNext();)
-                foreach (string it in vectors)
-                {
-                    numFields++;
-                }
-            }
-            StartDocument(numFields);
-
-            string lastFieldName = null;
-
-            TermsEnum termsEnum = null;
-            DocsAndPositionsEnum docsAndPositionsEnum = null;
-
-            int fieldCount = 0;
-            foreach (string fieldName in vectors)
-            {
-                fieldCount++;
-                FieldInfo fieldInfo = mergeState.FieldInfos.FieldInfo(fieldName);
-
-                Debug.Assert(lastFieldName == null || fieldName.CompareToOrdinal(lastFieldName) > 0, "lastFieldName=" + lastFieldName + " fieldName=" + fieldName);
-                lastFieldName = fieldName;
-
-                Terms terms = vectors.GetTerms(fieldName);
-                if (terms == null)
-                {
-                    // FieldsEnum shouldn't lie...
-                    continue;
-                }
-
-                bool hasPositions = terms.HasPositions;
-                bool hasOffsets = terms.HasOffsets;
-                bool hasPayloads = terms.HasPayloads;
-                Debug.Assert(!hasPayloads || hasPositions);
-
-                int numTerms = (int)terms.Count;
-                if (numTerms == -1)
-                {
-                    // count manually. It is stupid, but needed, as Terms.size() is not a mandatory statistics function
-                    numTerms = 0;
-                    termsEnum = terms.GetIterator(termsEnum);
-                    while (termsEnum.Next() != null)
-                    {
-                        numTerms++;
-                    }
-                }
-
-                StartField(fieldInfo, numTerms, hasPositions, hasOffsets, hasPayloads);
-                termsEnum = terms.GetIterator(termsEnum);
-
-                int termCount = 0;
-                while (termsEnum.Next() != null)
-                {
-                    termCount++;
-
-                    int freq = (int)termsEnum.TotalTermFreq;
-
-                    StartTerm(termsEnum.Term, freq);
-
-                    if (hasPositions || hasOffsets)
-                    {
-                        docsAndPositionsEnum = termsEnum.DocsAndPositions(null, docsAndPositionsEnum);
-                        Debug.Assert(docsAndPositionsEnum != null);
-
-                        int docID = docsAndPositionsEnum.NextDoc();
-                        Debug.Assert(docID != DocIdSetIterator.NO_MORE_DOCS);
-                        Debug.Assert(docsAndPositionsEnum.Freq == freq);
-
-                        for (int posUpto = 0; posUpto < freq; posUpto++)
-                        {
-                            int pos = docsAndPositionsEnum.NextPosition();
-                            int startOffset = docsAndPositionsEnum.StartOffset;
-                            int endOffset = docsAndPositionsEnum.EndOffset;
-
-                            BytesRef payload = docsAndPositionsEnum.GetPayload();
-
-                            Debug.Assert(!hasPositions || pos >= 0);
-                            AddPosition(pos, startOffset, endOffset, payload);
-                        }
-                    }
-                    FinishTerm();
-                }
-                Debug.Assert(termCount == numTerms);
-                FinishField();
-            }
-            Debug.Assert(fieldCount == numFields);
-            FinishDocument();
-        }
-
-        /// <summary>
-        /// Return the BytesRef Comparer used to sort terms
-        ///  before feeding to this API.
-        /// </summary>
-        public abstract IComparer<BytesRef> Comparer { get; }
-
-        public void Dispose()
-        {
-            Dispose(true);
-            GC.SuppressFinalize(this);
-        }
-
-        protected abstract void Dispose(bool disposing);
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a5dc68d0/src/Lucene.Net.Core/Codecs/TermsConsumer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Codecs/TermsConsumer.cs b/src/Lucene.Net.Core/Codecs/TermsConsumer.cs
deleted file mode 100644
index ca896bf..0000000
--- a/src/Lucene.Net.Core/Codecs/TermsConsumer.cs
+++ /dev/null
@@ -1,243 +0,0 @@
-using Lucene.Net.Index;
-using System.Collections.Generic;
-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 BytesRef = Lucene.Net.Util.BytesRef;
-    using DocsAndPositionsEnum = Lucene.Net.Index.DocsAndPositionsEnum;
-    using DocsEnum = Lucene.Net.Index.DocsEnum;
-    using IndexOptions = Lucene.Net.Index.IndexOptions;
-    using FieldInfo = Lucene.Net.Index.FieldInfo; // javadocs
-    using FixedBitSet = Lucene.Net.Util.FixedBitSet;
-    using MergeState = Lucene.Net.Index.MergeState;
-    using MultiDocsAndPositionsEnum = Lucene.Net.Index.MultiDocsAndPositionsEnum;
-    using MultiDocsEnum = Lucene.Net.Index.MultiDocsEnum;
-    using TermsEnum = Lucene.Net.Index.TermsEnum;
-
-    /// <summary>
-    /// Abstract API that consumes terms for an individual field.
-    /// <p>
-    /// The lifecycle is:
-    /// <ol>
-    ///   <li>TermsConsumer is returned for each field
-    ///       by <seealso cref="FieldsConsumer#addField(FieldInfo)"/>.
-    ///   <li>TermsConsumer returns a <seealso cref="PostingsConsumer"/> for
-    ///       each term in <seealso cref="#startTerm(BytesRef)"/>.
-    ///   <li>When the producer (e.g. IndexWriter)
-    ///       is done adding documents for the term, it calls
-    ///       <seealso cref="#finishTerm(BytesRef, TermStats)"/>, passing in
-    ///       the accumulated term statistics.
-    ///   <li>Producer calls <seealso cref="#finish(long, long, int)"/> with
-    ///       the accumulated collection statistics when it is finished
-    ///       adding terms to the field.
-    /// </ol>
-    ///
-    /// @lucene.experimental
-    /// </summary>
-    public abstract class TermsConsumer
-    {
-        /// <summary>
-        /// Sole constructor. (For invocation by subclass
-        ///  constructors, typically implicit.)
-        /// </summary>
-        protected internal TermsConsumer()
-        {
-        }
-
-        /// <summary>
-        /// Starts a new term in this field; this may be called
-        ///  with no corresponding call to finish if the term had
-        ///  no docs.
-        /// </summary>
-        public abstract PostingsConsumer StartTerm(BytesRef text);
-
-        /// <summary>
-        /// Finishes the current term; numDocs must be > 0.
-        ///  <code>stats.totalTermFreq</code> will be -1 when term
-        ///  frequencies are omitted for the field.
-        /// </summary>
-        public abstract void FinishTerm(BytesRef text, TermStats stats);
-
-        /// <summary>
-        /// Called when we are done adding terms to this field.
-        ///  <code>sumTotalTermFreq</code> will be -1 when term
-        ///  frequencies are omitted for the field.
-        /// </summary>
-        public abstract void Finish(long sumTotalTermFreq, long sumDocFreq, int docCount);
-
-        /// <summary>
-        /// Return the BytesRef Comparer used to sort terms
-        ///  before feeding to this API.
-        /// </summary>
-        public abstract IComparer<BytesRef> Comparer { get; }
-
-        private MappingMultiDocsEnum docsEnum;
-        private MappingMultiDocsEnum docsAndFreqsEnum;
-        private MappingMultiDocsAndPositionsEnum postingsEnum;
-
-        /// <summary>
-        /// Default merge impl </summary>
-        public virtual void Merge(MergeState mergeState, IndexOptions indexOptions, TermsEnum termsEnum)
-        {
-            BytesRef term;
-            Debug.Assert(termsEnum != null);
-            long sumTotalTermFreq = 0;
-            long sumDocFreq = 0;
-            long sumDFsinceLastAbortCheck = 0;
-            FixedBitSet visitedDocs = new FixedBitSet(mergeState.SegmentInfo.DocCount);
-
-            if (indexOptions == IndexOptions.DOCS_ONLY)
-            {
-                if (docsEnum == null)
-                {
-                    docsEnum = new MappingMultiDocsEnum();
-                }
-                docsEnum.MergeState = mergeState;
-
-                MultiDocsEnum docsEnumIn = null;
-
-                while ((term = termsEnum.Next()) != null)
-                {
-                    // We can pass null for liveDocs, because the
-                    // mapping enum will skip the non-live docs:
-                    docsEnumIn = (MultiDocsEnum)termsEnum.Docs(null, docsEnumIn, DocsFlags.NONE);
-                    if (docsEnumIn != null)
-                    {
-                        docsEnum.Reset(docsEnumIn);
-                        PostingsConsumer postingsConsumer = StartTerm(term);
-                        TermStats stats = postingsConsumer.Merge(mergeState, indexOptions, docsEnum, visitedDocs);
-                        if (stats.DocFreq > 0)
-                        {
-                            FinishTerm(term, stats);
-                            sumTotalTermFreq += stats.DocFreq;
-                            sumDFsinceLastAbortCheck += stats.DocFreq;
-                            sumDocFreq += stats.DocFreq;
-                            if (sumDFsinceLastAbortCheck > 60000)
-                            {
-                                mergeState.CheckAbort.Work(sumDFsinceLastAbortCheck / 5.0);
-                                sumDFsinceLastAbortCheck = 0;
-                            }
-                        }
-                    }
-                }
-            }
-            else if (indexOptions == IndexOptions.DOCS_AND_FREQS)
-            {
-                if (docsAndFreqsEnum == null)
-                {
-                    docsAndFreqsEnum = new MappingMultiDocsEnum();
-                }
-                docsAndFreqsEnum.MergeState = mergeState;
-
-                MultiDocsEnum docsAndFreqsEnumIn = null;
-
-                while ((term = termsEnum.Next()) != null)
-                {
-                    // We can pass null for liveDocs, because the
-                    // mapping enum will skip the non-live docs:
-                    docsAndFreqsEnumIn = (MultiDocsEnum)termsEnum.Docs(null, docsAndFreqsEnumIn);
-                    Debug.Assert(docsAndFreqsEnumIn != null);
-                    docsAndFreqsEnum.Reset(docsAndFreqsEnumIn);
-                    PostingsConsumer postingsConsumer = StartTerm(term);
-                    TermStats stats = postingsConsumer.Merge(mergeState, indexOptions, docsAndFreqsEnum, visitedDocs);
-                    if (stats.DocFreq > 0)
-                    {
-                        FinishTerm(term, stats);
-                        sumTotalTermFreq += stats.TotalTermFreq;
-                        sumDFsinceLastAbortCheck += stats.DocFreq;
-                        sumDocFreq += stats.DocFreq;
-                        if (sumDFsinceLastAbortCheck > 60000)
-                        {
-                            mergeState.CheckAbort.Work(sumDFsinceLastAbortCheck / 5.0);
-                            sumDFsinceLastAbortCheck = 0;
-                        }
-                    }
-                }
-            }
-            else if (indexOptions == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS)
-            {
-                if (postingsEnum == null)
-                {
-                    postingsEnum = new MappingMultiDocsAndPositionsEnum();
-                }
-                postingsEnum.MergeState = mergeState;
-                MultiDocsAndPositionsEnum postingsEnumIn = null;
-                while ((term = termsEnum.Next()) != null)
-                {
-                    // We can pass null for liveDocs, because the
-                    // mapping enum will skip the non-live docs:
-                    postingsEnumIn = (MultiDocsAndPositionsEnum)termsEnum.DocsAndPositions(null, postingsEnumIn, DocsAndPositionsFlags.PAYLOADS);
-                    Debug.Assert(postingsEnumIn != null);
-                    postingsEnum.Reset(postingsEnumIn);
-
-                    PostingsConsumer postingsConsumer = StartTerm(term);
-                    TermStats stats = postingsConsumer.Merge(mergeState, indexOptions, postingsEnum, visitedDocs);
-                    if (stats.DocFreq > 0)
-                    {
-                        FinishTerm(term, stats);
-                        sumTotalTermFreq += stats.TotalTermFreq;
-                        sumDFsinceLastAbortCheck += stats.DocFreq;
-                        sumDocFreq += stats.DocFreq;
-                        if (sumDFsinceLastAbortCheck > 60000)
-                        {
-                            mergeState.CheckAbort.Work(sumDFsinceLastAbortCheck / 5.0);
-                            sumDFsinceLastAbortCheck = 0;
-                        }
-                    }
-                }
-            }
-            else
-            {
-                Debug.Assert(indexOptions == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS);
-                if (postingsEnum == null)
-                {
-                    postingsEnum = new MappingMultiDocsAndPositionsEnum();
-                }
-                postingsEnum.MergeState = mergeState;
-                MultiDocsAndPositionsEnum postingsEnumIn = null;
-                while ((term = termsEnum.Next()) != null)
-                {
-                    // We can pass null for liveDocs, because the
-                    // mapping enum will skip the non-live docs:
-                    postingsEnumIn = (MultiDocsAndPositionsEnum)termsEnum.DocsAndPositions(null, postingsEnumIn);
-                    Debug.Assert(postingsEnumIn != null);
-                    postingsEnum.Reset(postingsEnumIn);
-
-                    PostingsConsumer postingsConsumer = StartTerm(term);
-                    TermStats stats = postingsConsumer.Merge(mergeState, indexOptions, postingsEnum, visitedDocs);
-                    if (stats.DocFreq > 0)
-                    {
-                        FinishTerm(term, stats);
-                        sumTotalTermFreq += stats.TotalTermFreq;
-                        sumDFsinceLastAbortCheck += stats.DocFreq;
-                        sumDocFreq += stats.DocFreq;
-                        if (sumDFsinceLastAbortCheck > 60000)
-                        {
-                            mergeState.CheckAbort.Work(sumDFsinceLastAbortCheck / 5.0);
-                            sumDFsinceLastAbortCheck = 0;
-                        }
-                    }
-                }
-            }
-            Finish(indexOptions == IndexOptions.DOCS_ONLY ? -1 : sumTotalTermFreq, sumDocFreq, visitedDocs.Cardinality());
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a5dc68d0/src/Lucene.Net.Core/Document/BinaryDocValuesField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Document/BinaryDocValuesField.cs b/src/Lucene.Net.Core/Document/BinaryDocValuesField.cs
deleted file mode 100644
index 0c05d60..0000000
--- a/src/Lucene.Net.Core/Document/BinaryDocValuesField.cs
+++ /dev/null
@@ -1,67 +0,0 @@
-using Lucene.Net.Index;
-using Lucene.Net.Util;
-using System;
-
-namespace Lucene.Net.Documents
-{
-    /*
-     * 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>
-    /// Field that stores a per-document <see cref="BytesRef"/> value.
-    /// <para/>
-    /// The values are stored directly with no sharing, which is a good fit when
-    /// the fields don't share (many) values, such as a title field.  If values
-    /// may be shared and sorted it's better to use <see cref="SortedDocValuesField"/>.
-    /// Here's an example usage:
-    ///
-    /// <code>
-    ///   document.Add(new BinaryDocValuesField(name, new BytesRef("hello")));
-    /// </code>
-    /// <para/>
-    /// If you also need to store the value, you should add a
-    /// separate <see cref="StoredField"/> instance.
-    /// </summary>
-    /// <seealso cref="BinaryDocValues"/>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
-    public class BinaryDocValuesField : Field
-    {
-        /// <summary>
-        /// Type for straight bytes <see cref="DocValues"/>.
-        /// </summary>
-        public static readonly FieldType fType = new FieldType();
-
-        static BinaryDocValuesField()
-        {
-            fType.DocValueType = DocValuesType.BINARY;
-            fType.Freeze();
-        }
-
-        /// <summary>
-        /// Create a new binary <see cref="DocValues"/> field. </summary>
-        /// <param name="name"> field name </param>
-        /// <param name="value"> binary content </param>
-        /// <exception cref="System.ArgumentNullException"> if the field name is null </exception>
-        public BinaryDocValuesField(string name, BytesRef value)
-            : base(name, fType)
-        {
-            m_fieldsData = value;
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a5dc68d0/src/Lucene.Net.Core/Document/ByteDocValuesField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Document/ByteDocValuesField.cs b/src/Lucene.Net.Core/Document/ByteDocValuesField.cs
deleted file mode 100644
index cb3b7c9..0000000
--- a/src/Lucene.Net.Core/Document/ByteDocValuesField.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-using System;
-
-namespace Lucene.Net.Documents
-{
-    /*
-     * 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>
-    /// Field that stores a per-document <see cref="byte"/> value for scoring,
-    /// sorting or value retrieval. Here's an example usage:
-    ///
-    /// <code>
-    ///   document.Add(new ByteDocValuesField(name, (byte) 22));
-    /// </code>
-    /// 
-    /// <para/>
-    /// If you also need to store the value, you should add a
-    /// separate <see cref="StoredField"/> instance.
-    /// </summary>
-    /// <seealso cref="NumericDocValuesField"/>
-    [Obsolete("Use NumericDocValuesField instead")]
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
-    public class ByteDocValuesField : NumericDocValuesField
-    {
-        /// <summary>
-        /// Creates a new <see cref="Index.DocValues"/> field with the specified 8-bit byte value </summary>
-        /// <param name="name"> field name </param>
-        /// <param name="value"> 8-bit byte value </param>
-        /// <exception cref="ArgumentNullException"> if the field name is null. </exception>
-        public ByteDocValuesField(string name, byte value)
-            : base(name, value)
-        {
-        }
-
-        public override void SetByteValue(byte value)
-        {
-            SetInt64Value(value);
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a5dc68d0/src/Lucene.Net.Core/Document/CompressionTools.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Document/CompressionTools.cs b/src/Lucene.Net.Core/Document/CompressionTools.cs
deleted file mode 100644
index d5324f4..0000000
--- a/src/Lucene.Net.Core/Document/CompressionTools.cs
+++ /dev/null
@@ -1,160 +0,0 @@
-using Lucene.Net.Util;
-using System.IO;
-using System.IO.Compression;
-
-namespace Lucene.Net.Documents
-{
-    /*
-     * 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>
-    /// Simple utility class providing static methods to
-    /// compress and decompress binary data for stored fields.
-    /// this class uses the <see cref="System.IO.Compression.DeflateStream"/>
-    /// class to compress and decompress.
-    /// </summary>
-    public class CompressionTools
-    {
-        // Export only static methods
-        private CompressionTools()
-        {
-        }
-
-        /// <summary>
-        /// Compresses the specified <see cref="byte"/> range using the
-        /// specified <paramref name="compressionLevel"/>.
-        /// </summary>
-        public static byte[] Compress(byte[] value, int offset, int length, CompressionLevel compressionLevel)
-        {
-            byte[] resultArray = null;
-            using (MemoryStream compressionMemoryStream = new MemoryStream())
-            {
-                using (DeflateStream deflateStream = new DeflateStream(compressionMemoryStream, compressionLevel))
-                {
-
-                    deflateStream.Write(value, offset, length);
-                }
-                resultArray = compressionMemoryStream.ToArray();
-            }
-            return resultArray;
-        }
-
-        /// <summary>
-        /// Compresses the specified <see cref="byte"/> range, with default <see cref="CompressionLevel.Optimal"/> level 
-        /// </summary>
-        public static byte[] Compress(byte[] value, int offset, int length)
-        {
-            return Compress(value, offset, length, CompressionLevel.Optimal);
-        }
-
-        /// <summary>
-        /// Compresses all <see cref="byte"/>s in the array, with default <see cref="CompressionLevel.Optimal"/> level </summary>
-        public static byte[] Compress(byte[] value)
-        {
-            return Compress(value, 0, value.Length, CompressionLevel.Optimal);
-        }
-
-        /// <summary>
-        /// Compresses the <see cref="string"/> value, with default <see cref="CompressionLevel.Optimal"/> level </summary>
-        public static byte[] CompressString(string value)
-        {
-            return CompressString(value, CompressionLevel.Optimal);
-        }
-
-        /// <summary>
-        /// Compresses the <see cref="string"/> value using the specified
-        /// <paramref name="compressionLevel"/>.
-        /// </summary>
-        public static byte[] CompressString(string value, CompressionLevel compressionLevel)
-        {
-            var result = new BytesRef();
-            UnicodeUtil.UTF16toUTF8(value.ToCharArray(), 0, value.Length, result);
-            return Compress(result.Bytes, 0, result.Length, compressionLevel);
-        }
-
-        /// <summary>
-        /// Decompress the <see cref="byte"/> array previously returned by
-        /// compress (referenced by the provided <see cref="BytesRef"/>)
-        /// </summary>
-        public static byte[] Decompress(BytesRef bytes)
-        {
-            return Decompress(bytes.Bytes, bytes.Offset, bytes.Length);
-        }
-
-        /// <summary>
-        /// Decompress the <see cref="byte"/> array previously returned by
-        /// compress
-        /// </summary>
-        public static byte[] Decompress(byte[] value)
-        {
-            return Decompress(value, 0, value.Length);
-        }
-
-        /// <summary>
-        /// Decompress the <see cref="byte"/> array previously returned by
-        /// compress
-        /// </summary>
-        public static byte[] Decompress(byte[] value, int offset, int length)
-        {
-            byte[] decompressedBytes = null;
-
-            using (MemoryStream decompressedStream = new MemoryStream())
-            {
-                using (MemoryStream compressedStream = new MemoryStream(value))
-                {
-                    using (DeflateStream dStream = new DeflateStream(compressedStream, CompressionMode.Decompress))
-                    {
-                        dStream.CopyTo(decompressedStream);
-                    }
-                }
-                decompressedBytes = decompressedStream.ToArray();
-            }
-
-            return decompressedBytes;
-        }
-
-        /// <summary>
-        /// Decompress the <see cref="byte"/> array previously returned by
-        /// <see cref="CompressString(string)"/> back into a <see cref="string"/>
-        /// </summary>
-        public static string DecompressString(byte[] value)
-        {
-            return DecompressString(value, 0, value.Length);
-        }
-
-        /// <summary>
-        /// Decompress the <see cref="byte"/> array previously returned by
-        /// <see cref="CompressString(string)"/> back into a <see cref="string"/>
-        /// </summary>
-        public static string DecompressString(byte[] value, int offset, int length)
-        {
-            byte[] bytes = Decompress(value, offset, length);
-            CharsRef result = new CharsRef(bytes.Length);
-            UnicodeUtil.UTF8toUTF16(bytes, 0, bytes.Length, result);
-            return new string(result.Chars, 0, result.Length);
-        }
-
-        /// <summary>
-        /// Decompress the <see cref="byte"/> array (referenced by the provided <see cref="BytesRef"/>)
-        /// previously returned by <see cref="CompressString(string)"/> back into a <see cref="string"/>
-        /// </summary>
-        public static string DecompressString(BytesRef bytes)
-        {
-            return DecompressString(bytes.Bytes, bytes.Offset, bytes.Length);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a5dc68d0/src/Lucene.Net.Core/Document/DateTools.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Document/DateTools.cs b/src/Lucene.Net.Core/Document/DateTools.cs
deleted file mode 100644
index 2edfe7f..0000000
--- a/src/Lucene.Net.Core/Document/DateTools.cs
+++ /dev/null
@@ -1,311 +0,0 @@
-using System;
-
-namespace Lucene.Net.Documents
-{
-    /*
-     * 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>
-    /// Provides support for converting dates to strings and vice-versa.
-    /// The strings are structured so that lexicographic sorting orders
-    /// them by date, which makes them suitable for use as field values
-    /// and search terms.
-    ///
-    /// <para/>This class also helps you to limit the resolution of your dates. Do not
-    /// save dates with a finer resolution than you really need, as then
-    /// <see cref="Search.TermRangeQuery"/> and <see cref="Search.PrefixQuery"/> will require more memory and become slower.
-    ///
-    /// <para/>
-    /// Another approach is <see cref="Util.NumericUtils"/>, which provides
-    /// a sortable binary representation (prefix encoded) of numeric values, which
-    /// date/time are.
-    /// 
-    /// For indexing a <see cref="DateTime"/>, just get the <see cref="DateTime.Ticks"/> and index
-    /// this as a numeric value with <see cref="Int64Field"/> and use <see cref="Search.NumericRangeQuery{T}"/>
-    /// to query it.
-    /// </summary>
-    public static class DateTools
-    {
-        private static readonly string YEAR_FORMAT = "yyyy";
-        private static readonly string MONTH_FORMAT = "yyyyMM";
-        private static readonly string DAY_FORMAT = "yyyyMMdd";
-        private static readonly string HOUR_FORMAT = "yyyyMMddHH";
-        private static readonly string MINUTE_FORMAT = "yyyyMMddHHmm";
-        private static readonly string SECOND_FORMAT = "yyyyMMddHHmmss";
-        private static readonly string MILLISECOND_FORMAT = "yyyyMMddHHmmssfff";
-
-        // LUCENENET - not used
-        //private static readonly System.Globalization.Calendar calInstance = new System.Globalization.GregorianCalendar();
-
-        /// <summary>
-        /// Converts a <see cref="DateTime"/> to a string suitable for indexing.
-        /// </summary>
-        /// <param name="date"> the date to be converted </param>
-        /// <param name="resolution"> the desired resolution, see
-        /// <see cref="Round(DateTime, DateTools.Resolution)"/> </param>
-        /// <returns> a string in format <c>yyyyMMddHHmmssSSS</c> or shorter,
-        /// depending on <paramref name="resolution"/>; using GMT as timezone  </returns>
-        public static string DateToString(DateTime date, Resolution resolution)
-        {
-            return TimeToString(date.Ticks / TimeSpan.TicksPerMillisecond, resolution);
-        }
-
-        /// <summary>
-        /// Converts a millisecond time to a string suitable for indexing.
-        /// </summary>
-        /// <param name="time"> the date expressed as milliseconds since January 1, 1970, 00:00:00 GMT (also known as the "epoch") </param>
-        /// <param name="resolution"> the desired resolution, see
-        /// <see cref="Round(long, DateTools.Resolution)"/> </param>
-        /// <returns> a string in format <c>yyyyMMddHHmmssSSS</c> or shorter,
-        /// depending on <paramref name="resolution"/>; using GMT as timezone </returns>
-        public static string TimeToString(long time, Resolution resolution)
-        {
-            DateTime date = new DateTime(Round(time, resolution));
-
-            if (resolution == Resolution.YEAR)
-            {
-                return date.ToString(YEAR_FORMAT, System.Globalization.CultureInfo.InvariantCulture);
-            }
-            else if (resolution == Resolution.MONTH)
-            {
-                return date.ToString(MONTH_FORMAT, System.Globalization.CultureInfo.InvariantCulture);
-            }
-            else if (resolution == Resolution.DAY)
-            {
-                return date.ToString(DAY_FORMAT, System.Globalization.CultureInfo.InvariantCulture);
-            }
-            else if (resolution == Resolution.HOUR)
-            {
-                return date.ToString(HOUR_FORMAT, System.Globalization.CultureInfo.InvariantCulture);
-            }
-            else if (resolution == Resolution.MINUTE)
-            {
-                return date.ToString(MINUTE_FORMAT, System.Globalization.CultureInfo.InvariantCulture);
-            }
-            else if (resolution == Resolution.SECOND)
-            {
-                return date.ToString(SECOND_FORMAT, System.Globalization.CultureInfo.InvariantCulture);
-            }
-            else if (resolution == Resolution.MILLISECOND)
-            {
-                return date.ToString(MILLISECOND_FORMAT, System.Globalization.CultureInfo.InvariantCulture);
-            }
-
-            throw new ArgumentException("unknown resolution " + resolution);
-        }
-
-        /// <summary>
-        /// Converts a string produced by <see cref="TimeToString(long, Resolution)"/> or
-        /// <see cref="DateToString(DateTime, Resolution)"/> back to a time, represented as the
-        /// number of milliseconds since January 1, 1970, 00:00:00 GMT (also known as the "epoch").
-        /// </summary>
-        /// <param name="dateString"> the date string to be converted </param>
-        /// <returns> the number of milliseconds since January 1, 1970, 00:00:00 GMT (also known as the "epoch")</returns>
-        /// <exception cref="FormatException"> if <paramref name="dateString"/> is not in the
-        /// expected format </exception>
-        public static long StringToTime(string dateString)
-        {
-            return StringToDate(dateString).Ticks;
-        }
-
-        /// <summary>
-        /// Converts a string produced by <see cref="TimeToString(long, Resolution)"/> or
-        /// <see cref="DateToString(DateTime, Resolution)"/> back to a time, represented as a
-        /// <see cref="DateTime"/> object.
-        /// </summary>
-        /// <param name="dateString"> the date string to be converted </param>
-        /// <returns> the parsed time as a <see cref="DateTime"/> object </returns>
-        /// <exception cref="FormatException"> if <paramref name="dateString"/> is not in the
-        /// expected format </exception>
-        public static DateTime StringToDate(string dateString)
-        {
-            DateTime date;
-            if (dateString.Length == 4)
-            {
-                date = new DateTime(Convert.ToInt16(dateString.Substring(0, 4)),
-                    1, 1, 0, 0, 0, 0);
-            }
-            else if (dateString.Length == 6)
-            {
-                date = new DateTime(Convert.ToInt16(dateString.Substring(0, 4)),
-                    Convert.ToInt16(dateString.Substring(4, 2)),
-                    1, 0, 0, 0, 0);
-            }
-            else if (dateString.Length == 8)
-            {
-                date = new DateTime(Convert.ToInt16(dateString.Substring(0, 4)),
-                    Convert.ToInt16(dateString.Substring(4, 2)),
-                    Convert.ToInt16(dateString.Substring(6, 2)),
-                    0, 0, 0, 0);
-            }
-            else if (dateString.Length == 10)
-            {
-                date = new DateTime(Convert.ToInt16(dateString.Substring(0, 4)),
-                    Convert.ToInt16(dateString.Substring(4, 2)),
-                    Convert.ToInt16(dateString.Substring(6, 2)),
-                    Convert.ToInt16(dateString.Substring(8, 2)),
-                    0, 0, 0);
-            }
-            else if (dateString.Length == 12)
-            {
-                date = new DateTime(Convert.ToInt16(dateString.Substring(0, 4)),
-                    Convert.ToInt16(dateString.Substring(4, 2)),
-                    Convert.ToInt16(dateString.Substring(6, 2)),
-                    Convert.ToInt16(dateString.Substring(8, 2)),
-                    Convert.ToInt16(dateString.Substring(10, 2)),
-                    0, 0);
-            }
-            else if (dateString.Length == 14)
-            {
-                date = new DateTime(Convert.ToInt16(dateString.Substring(0, 4)),
-                    Convert.ToInt16(dateString.Substring(4, 2)),
-                    Convert.ToInt16(dateString.Substring(6, 2)),
-                    Convert.ToInt16(dateString.Substring(8, 2)),
-                    Convert.ToInt16(dateString.Substring(10, 2)),
-                    Convert.ToInt16(dateString.Substring(12, 2)),
-                    0);
-            }
-            else if (dateString.Length == 17)
-            {
-                date = new DateTime(Convert.ToInt16(dateString.Substring(0, 4)),
-                    Convert.ToInt16(dateString.Substring(4, 2)),
-                    Convert.ToInt16(dateString.Substring(6, 2)),
-                    Convert.ToInt16(dateString.Substring(8, 2)),
-                    Convert.ToInt16(dateString.Substring(10, 2)),
-                    Convert.ToInt16(dateString.Substring(12, 2)),
-                    Convert.ToInt16(dateString.Substring(14, 3)));
-            }
-            else
-            {
-                throw new FormatException("Input is not valid date string: " + dateString);
-            }
-            return date;
-        }
-
-        /// <summary>
-        /// Limit a date's resolution. For example, the date <c>2004-09-21 13:50:11</c>
-        /// will be changed to <c>2004-09-01 00:00:00</c> when using
-        /// <see cref="Resolution.MONTH"/>.
-        /// </summary>
-        /// <param name="date"> the date to be rounded </param>
-        /// <param name="resolution"> The desired resolution of the date to be returned </param>
-        /// <returns> the date with all values more precise than <paramref name="resolution"/>
-        /// set to 0 or 1 </returns>
-        public static DateTime Round(DateTime date, Resolution resolution)
-        {
-            return new DateTime(Round(date.Ticks / TimeSpan.TicksPerMillisecond, resolution));
-        }
-
-        /// <summary>
-        /// Limit a date's resolution. For example, the date <c>1095767411000</c>
-        /// (which represents 2004-09-21 13:50:11) will be changed to
-        /// <c>1093989600000</c> (2004-09-01 00:00:00) when using
-        /// <see cref="Resolution.MONTH"/>.
-        /// </summary>
-        /// <param name="time"> the time to be rounded </param>
-        /// <param name="resolution"> The desired resolution of the date to be returned </param>
-        /// <returns> the date with all values more precise than <paramref name="resolution"/>
-        /// set to 0 or 1, expressed as milliseconds since January 1, 1970, 00:00:00 GMT 
-        /// (also known as the "epoch")</returns>
-        public static long Round(long time, Resolution resolution)
-        {
-            DateTime dt = new DateTime(time * TimeSpan.TicksPerMillisecond);
-
-            if (resolution == Resolution.YEAR)
-            {
-                dt = dt.AddMonths(1 - dt.Month);
-                dt = dt.AddDays(1 - dt.Day);
-                dt = dt.AddHours(0 - dt.Hour);
-                dt = dt.AddMinutes(0 - dt.Minute);
-                dt = dt.AddSeconds(0 - dt.Second);
-                dt = dt.AddMilliseconds(0 - dt.Millisecond);
-            }
-            else if (resolution == Resolution.MONTH)
-            {
-                dt = dt.AddDays(1 - dt.Day);
-                dt = dt.AddHours(0 - dt.Hour);
-                dt = dt.AddMinutes(0 - dt.Minute);
-                dt = dt.AddSeconds(0 - dt.Second);
-                dt = dt.AddMilliseconds(0 - dt.Millisecond);
-            }
-            else if (resolution == Resolution.DAY)
-            {
-                dt = dt.AddHours(0 - dt.Hour);
-                dt = dt.AddMinutes(0 - dt.Minute);
-                dt = dt.AddSeconds(0 - dt.Second);
-                dt = dt.AddMilliseconds(0 - dt.Millisecond);
-            }
-            else if (resolution == Resolution.HOUR)
-            {
-                dt = dt.AddMinutes(0 - dt.Minute);
-                dt = dt.AddSeconds(0 - dt.Second);
-                dt = dt.AddMilliseconds(0 - dt.Millisecond);
-            }
-            else if (resolution == Resolution.MINUTE)
-            {
-                dt = dt.AddSeconds(0 - dt.Second);
-                dt = dt.AddMilliseconds(0 - dt.Millisecond);
-            }
-            else if (resolution == Resolution.SECOND)
-            {
-                dt = dt.AddMilliseconds(0 - dt.Millisecond);
-            }
-            else if (resolution == Resolution.MILLISECOND)
-            {
-                // don't cut off anything
-            }
-            else
-            {
-                throw new System.ArgumentException("unknown resolution " + resolution);
-            }
-            return dt.Ticks;
-        }
-
-        /// <summary>
-        /// Specifies the time granularity. </summary>
-        public enum Resolution
-        {
-            /// <summary>
-            /// Limit a date's resolution to year granularity. </summary>
-            YEAR = 4,
-
-            /// <summary>
-            /// Limit a date's resolution to month granularity. </summary>
-            MONTH = 6,
-
-            /// <summary>
-            /// Limit a date's resolution to day granularity. </summary>
-            DAY = 8,
-
-            /// <summary>
-            /// Limit a date's resolution to hour granularity. </summary>
-            HOUR = 10,
-
-            /// <summary>
-            /// Limit a date's resolution to minute granularity. </summary>
-            MINUTE = 12,
-
-            /// <summary>
-            /// Limit a date's resolution to second granularity. </summary>
-            SECOND = 14,
-
-            /// <summary>
-            /// Limit a date's resolution to millisecond granularity. </summary>
-            MILLISECOND = 17
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a5dc68d0/src/Lucene.Net.Core/Document/DerefBytesDocValuesField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Document/DerefBytesDocValuesField.cs b/src/Lucene.Net.Core/Document/DerefBytesDocValuesField.cs
deleted file mode 100644
index 2d72760..0000000
--- a/src/Lucene.Net.Core/Document/DerefBytesDocValuesField.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-using Lucene.Net.Util;
-using System;
-
-namespace Lucene.Net.Documents
-{
-    /*
-     * 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>
-    /// Field that stores
-    /// a per-document <see cref="BytesRef"/> value. Here's an example usage:
-    ///
-    /// <code>
-    ///   document.Add(new DerefBytesDocValuesField(name, new BytesRef("hello")));
-    /// </code>
-    ///
-    /// <para/>
-    /// If you also need to store the value, you should add a
-    /// separate <see cref="StoredField"/> instance.
-    /// </summary>
-    /// <seealso cref="Index.BinaryDocValues"/>
-    [Obsolete("Use BinaryDocValuesField instead.")]
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
-    public class DerefBytesDocValuesField : BinaryDocValuesField
-    {
-        /// <summary>
-        /// Type for bytes <see cref="Index.DocValues"/>: all with the same length
-        /// </summary>
-        public static readonly FieldType TYPE_FIXED_LEN = BinaryDocValuesField.fType;
-
-        /// <summary>
-        /// Type for bytes <see cref="Index.DocValues"/>: can have variable lengths
-        /// </summary>
-        public static readonly FieldType TYPE_VAR_LEN = BinaryDocValuesField.fType;
-
-        /// <summary>
-        /// Create a new fixed or variable-length <see cref="Index.DocValues"/> field. </summary>
-        /// <param name="name"> field name </param>
-        /// <param name="bytes"> binary content </param>
-        /// <exception cref="ArgumentNullException"> if the field name is null </exception>
-        public DerefBytesDocValuesField(string name, BytesRef bytes)
-            : base(name, bytes)
-        {
-        }
-
-        /// <summary>
-        /// Create a new fixed or variable length <see cref="Index.DocValues"/> field.
-        /// </summary>
-        /// <param name="name"> field name </param>
-        /// <param name="bytes"> binary content </param>
-        /// <param name="isFixedLength"> (ignored) </param>
-        /// <exception cref="ArgumentNullException"> if the field name is null </exception>
-        public DerefBytesDocValuesField(string name, BytesRef bytes, bool isFixedLength)
-            : base(name, bytes)
-        {
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a5dc68d0/src/Lucene.Net.Core/Document/Document.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Document/Document.cs b/src/Lucene.Net.Core/Document/Document.cs
deleted file mode 100644
index d19f874..0000000
--- a/src/Lucene.Net.Core/Document/Document.cs
+++ /dev/null
@@ -1,300 +0,0 @@
-using Lucene.Net.Index;
-using Lucene.Net.Util;
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Text;
-
-namespace Lucene.Net.Documents
-{
-    /*
-     * 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>
-    /// Documents are the unit of indexing and search.
-    /// <para/>
-    /// A Document is a set of fields.  Each field has a name and a textual value.
-    /// A field may be stored (<see cref="IIndexableFieldType.IsStored"/>) with the document, in which
-    /// case it is returned with search hits on the document.  Thus each document
-    /// should typically contain one or more stored fields which uniquely identify
-    /// it.
-    /// <para/>
-    /// Note that fields which are <i>not</i> <see cref="Lucene.Net.Index.IIndexableFieldType.IsStored"/> are
-    /// <i>not</i> available in documents retrieved from the index, e.g. with 
-    /// <see cref="Search.ScoreDoc.Doc"/> or <see cref="IndexReader.Document(int)"/>.
-    /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
-    public sealed class Document : IEnumerable<IIndexableField>
-    {
-        private readonly List<IIndexableField> fields = new List<IIndexableField>();
-
-        /// <summary>
-        /// Constructs a new document with no fields. </summary>
-        public Document()
-        {
-        }
-
-        public IEnumerator<IIndexableField> GetEnumerator()
-        {
-            return fields.GetEnumerator();
-        }
-
-        IEnumerator IEnumerable.GetEnumerator()
-        {
-            return GetEnumerator();
-        }
-
-        /// <summary>
-        /// <para>Adds a field to a document.  Several fields may be added with
-        /// the same name.  In this case, if the fields are indexed, their text is
-        /// treated as though appended for the purposes of search.</para>
-        /// <para> Note that add like the <see cref="RemoveField(string)"/> and <see cref="RemoveFields(string)"/> methods only makes sense
-        /// prior to adding a document to an index. These methods cannot
-        /// be used to change the content of an existing index! In order to achieve this,
-        /// a document has to be deleted from an index and a new changed version of that
-        /// document has to be added.</para>
-        /// </summary>
-        public void Add(IIndexableField field)
-        {
-            fields.Add(field);
-        }
-
-        /// <summary>
-        /// <para>Removes field with the specified name from the document.
-        /// If multiple fields exist with this name, this method removes the first field that has been added.
-        /// If there is no field with the specified name, the document remains unchanged.</para>
-        /// <para> Note that the <see cref="RemoveField(string)"/> and <see cref="RemoveFields(string)"/> methods like the add method only make sense
-        /// prior to adding a document to an index. These methods cannot
-        /// be used to change the content of an existing index! In order to achieve this,
-        /// a document has to be deleted from an index and a new changed version of that
-        /// document has to be added.</para>
-        /// </summary>
-        public void RemoveField(string name)
-        {
-            for (int i = 0; i < fields.Count; i++)
-            {
-                IIndexableField field = fields[i];
-
-                if (field.Name.Equals(name, StringComparison.Ordinal))
-                {
-                    fields.Remove(field);
-                    return;
-                }
-            }
-        }
-
-        /// <summary>
-        /// <para>Removes all fields with the given name from the document.
-        /// If there is no field with the specified name, the document remains unchanged.</para>
-        /// <para> Note that the <see cref="RemoveField(string)"/> and <see cref="RemoveFields(string)"/> methods like the add method only make sense
-        /// prior to adding a document to an index. These methods cannot
-        /// be used to change the content of an existing index! In order to achieve this,
-        /// a document has to be deleted from an index and a new changed version of that
-        /// document has to be added.</para>
-        /// </summary>
-        public void RemoveFields(string name)
-        {
-            for (int i = fields.Count - 1; i >= 0; i--)
-            {
-                IIndexableField field = fields[i];
-
-                if (field.Name.Equals(name, StringComparison.Ordinal))
-                {
-                    fields.Remove(field);
-                }
-            }
-        }
-
-        /// <summary>
-        /// Returns an array of byte arrays for of the fields that have the name specified
-        /// as the method parameter. This method returns an empty
-        /// array when there are no matching fields.  It never
-        /// returns <c>null</c>.
-        /// </summary>
-        /// <param name="name"> the name of the field </param>
-        /// <returns> a <see cref="T:BytesRef[]"/> of binary field values </returns>
-        public BytesRef[] GetBinaryValues(string name)
-        {
-            var result = new List<BytesRef>();
-
-            foreach (IIndexableField field in fields)
-            {
-                if (field.Name.Equals(name, StringComparison.Ordinal))
-                {
-                    BytesRef bytes = field.GetBinaryValue();
-
-                    if (bytes != null)
-                    {
-                        result.Add(bytes);
-                    }
-                }
-            }
-
-            return result.ToArray();
-        }
-
-        /// <summary>
-        /// Returns an array of bytes for the first (or only) field that has the name
-        /// specified as the method parameter. this method will return <c>null</c>
-        /// if no binary fields with the specified name are available.
-        /// There may be non-binary fields with the same name.
-        /// </summary>
-        /// <param name="name"> the name of the field. </param>
-        /// <returns> a <see cref="BytesRef"/> containing the binary field value or <c>null</c> </returns>
-        public BytesRef GetBinaryValue(string name)
-        {
-            foreach (IIndexableField field in fields)
-            {
-                if (field.Name.Equals(name, StringComparison.Ordinal))
-                {
-                    BytesRef bytes = field.GetBinaryValue();
-                    if (bytes != null)
-                    {
-                        return bytes;
-                    }
-                }
-            }
-            return null;
-        }
-
-        /// <summary>
-        /// Returns a field with the given name if any exist in this document, or
-        /// <c>null</c>. If multiple fields exists with this name, this method returns the
-        /// first value added.
-        /// </summary>
-        public IIndexableField GetField(string name)
-        {
-            foreach (IIndexableField field in fields)
-            {
-                if (field.Name.Equals(name, StringComparison.Ordinal))
-                {
-                    return field;
-                }
-            }
-            return null;
-        }
-
-        /// <summary>
-        /// Returns an array of <see cref="IIndexableField"/>s with the given name.
-        /// this method returns an empty array when there are no
-        /// matching fields. It never returns <c>null</c>.
-        /// </summary>
-        /// <param name="name"> the name of the field </param>
-        /// <returns> a <see cref="T:IndexableField[]"/> array </returns>
-        public IIndexableField[] GetFields(string name)
-        {
-            var result = new List<IIndexableField>();
-            foreach (IIndexableField field in fields)
-            {
-                if (field.Name.Equals(name, StringComparison.Ordinal))
-                {
-                    result.Add(field);
-                }
-            }
-
-            return result.ToArray();
-        }
-
-        /// <summary>
-        /// Returns a List of all the fields in a document.
-        /// <para>Note that fields which are <i>not</i> stored are
-        /// <i>not</i> available in documents retrieved from the
-        /// index, e.g. <see cref="Search.IndexSearcher.Doc(int)"/> or 
-        /// <see cref="IndexReader.Document(int)"/>.
-        /// </para>
-        /// </summary>
-        public IList<IIndexableField> Fields
-        {
-            get
-            {
-                return fields;
-            }
-        }
-
-        private static readonly string[] NO_STRINGS = new string[0];
-
-        /// <summary>
-        /// Returns an array of values of the field specified as the method parameter.
-        /// This method returns an empty array when there are no
-        /// matching fields. It never returns <c>null</c>.
-        /// For <see cref="Int32Field"/>, <see cref="Int64Field"/>, 
-        /// <see cref="SingleField"/> and <seealso cref="DoubleField"/> it returns the string value of the number. If you want
-        /// the actual numeric field instances back, use <see cref="GetFields(string)"/>. </summary>
-        /// <param name="name"> the name of the field </param>
-        /// <returns> a <see cref="T:string[]"/> of field values </returns>
-        public string[] GetValues(string name)
-        {
-            var result = new List<string>();
-            foreach (IIndexableField field in fields)
-            {
-                if (field.Name.Equals(name, StringComparison.Ordinal) && field.GetStringValue() != null)
-                {
-                    result.Add(field.GetStringValue());
-                }
-            }
-
-            if (result.Count == 0)
-            {
-                return NO_STRINGS;
-            }
-
-            return result.ToArray();
-        }
-
-        /// <summary>
-        /// Returns the string value of the field with the given name if any exist in
-        /// this document, or <c>null</c>.  If multiple fields exist with this name, this
-        /// method returns the first value added. If only binary fields with this name
-        /// exist, returns <c>null</c>.
-        /// For <see cref="Int32Field"/>, <see cref="Int64Field"/>, 
-        /// <see cref="SingleField"/> and <seealso cref="DoubleField"/> it returns the string value of the number. If you want
-        /// the actual numeric field instance back, use <see cref="GetField(string)"/>.
-        /// </summary>
-        public string Get(string name)
-        {
-            foreach (IIndexableField field in fields)
-            {
-                if (field.Name.Equals(name, StringComparison.Ordinal) && field.GetStringValue() != null)
-                {
-                    return field.GetStringValue();
-                }
-            }
-            return null;
-        }
-
-        /// <summary>
-        /// Prints the fields of a document for human consumption. </summary>
-        public override string ToString()
-        {
-            var buffer = new StringBuilder();
-            buffer.Append("Document<");
-            for (int i = 0; i < fields.Count; i++)
-            {
-                IIndexableField field = fields[i];
-                buffer.Append(field.ToString());
-                if (i != fields.Count - 1)
-                {
-                    buffer.Append(" ");
-                }
-            }
-            buffer.Append(">");
-            return buffer.ToString();
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a5dc68d0/src/Lucene.Net.Core/Document/DocumentStoredFieldVisitor.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Document/DocumentStoredFieldVisitor.cs b/src/Lucene.Net.Core/Document/DocumentStoredFieldVisitor.cs
deleted file mode 100644
index 490035e..0000000
--- a/src/Lucene.Net.Core/Document/DocumentStoredFieldVisitor.cs
+++ /dev/null
@@ -1,122 +0,0 @@
-using Lucene.Net.Index;
-using System;
-using System.Collections.Generic;
-
-namespace Lucene.Net.Documents
-{
-    /*
-     * 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>
-    /// A <see cref="StoredFieldVisitor"/> that creates a 
-    /// <see cref="Document"/> containing all stored fields, or only specific
-    /// requested fields provided to <see cref="DocumentStoredFieldVisitor.DocumentStoredFieldVisitor(ISet{string})"/>.
-    /// <para/>
-    /// This is used by <see cref="IndexReader.Document(int)"/> to load a
-    /// document.
-    ///
-    /// @lucene.experimental
-    /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
-    public class DocumentStoredFieldVisitor : StoredFieldVisitor
-    {
-        private readonly Documents.Document doc = new Documents.Document();
-        private readonly ISet<string> fieldsToAdd;
-
-        /// <summary>
-        /// Load only fields named in the provided <see cref="ISet{String}"/>. </summary>
-        /// <param name="fieldsToAdd"> Set of fields to load, or <c>null</c> (all fields). </param>
-        public DocumentStoredFieldVisitor(ISet<string> fieldsToAdd)
-        {
-            this.fieldsToAdd = fieldsToAdd;
-        }
-
-        /// <summary>
-        /// Load only fields named in the provided fields. </summary>
-        public DocumentStoredFieldVisitor(params string[] fields)
-        {
-            fieldsToAdd = new HashSet<string>();
-            foreach (string field in fields)
-            {
-                fieldsToAdd.Add(field);
-            }
-        }
-
-        /// <summary>
-        /// Load all stored fields. </summary>
-        public DocumentStoredFieldVisitor()
-        {
-            this.fieldsToAdd = null;
-        }
-
-        public override void BinaryField(FieldInfo fieldInfo, byte[] value)
-        {
-            doc.Add(new StoredField(fieldInfo.Name, value));
-        }
-
-        public override void StringField(FieldInfo fieldInfo, string value)
-        {
-            FieldType ft = new FieldType(TextField.TYPE_STORED);
-            ft.StoreTermVectors = fieldInfo.HasVectors;
-            ft.IsIndexed = fieldInfo.IsIndexed;
-            ft.OmitNorms = fieldInfo.OmitsNorms;
-            ft.IndexOptions = fieldInfo.IndexOptions;
-            doc.Add(new Field(fieldInfo.Name, value, ft));
-        }
-
-        public override void Int32Field(FieldInfo fieldInfo, int value) // LUCENENET specific: renamed from IntField to follow .NET conventions
-        {
-            doc.Add(new StoredField(fieldInfo.Name, value));
-        }
-
-        public override void Int64Field(FieldInfo fieldInfo, long value) // LUCENENET specific: renamed from LongField to follow  .NET conventions
-        {
-            doc.Add(new StoredField(fieldInfo.Name, value));
-        }
-
-        public override void SingleField(FieldInfo fieldInfo, float value) // LUCENENET specific: renamed from FloatField to follow  .NET conventions
-        {
-            doc.Add(new StoredField(fieldInfo.Name, value));
-        }
-
-        public override void DoubleField(FieldInfo fieldInfo, double value)
-        {
-            doc.Add(new StoredField(fieldInfo.Name, value));
-        }
-
-        public override Status NeedsField(FieldInfo fieldInfo)
-        {
-            return fieldsToAdd == null || fieldsToAdd.Contains(fieldInfo.Name) ? Status.YES : Status.NO;
-        }
-
-        /// <summary>
-        /// Retrieve the visited document. </summary>
-        /// <returns> Document populated with stored fields. Note that only
-        ///         the stored information in the field instances is valid,
-        ///         data such as boosts, indexing options, term vector options,
-        ///         etc is not set. </returns>
-        public virtual Documents.Document Document
-        {
-            get
-            {
-                return doc;
-            }
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a5dc68d0/src/Lucene.Net.Core/Document/DoubleDocValuesField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Document/DoubleDocValuesField.cs b/src/Lucene.Net.Core/Document/DoubleDocValuesField.cs
deleted file mode 100644
index caf1f97..0000000
--- a/src/Lucene.Net.Core/Document/DoubleDocValuesField.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-using System;
-
-namespace Lucene.Net.Documents
-{
-    /*
-     * 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>
-    /// Syntactic sugar for encoding doubles as <see cref="Index.NumericDocValues"/>
-    /// via <see cref="Support.Number.DoubleToRawInt64Bits(double)"/>.
-    /// <para/>
-    /// Per-document double values can be retrieved via
-    /// <see cref="Search.IFieldCache.GetDoubles(Lucene.Net.Index.AtomicReader, string, bool)"/>.
-    /// <para/>
-    /// <b>NOTE</b>: In most all cases this will be rather inefficient,
-    /// requiring eight bytes per document. Consider encoding double
-    /// values yourself with only as much precision as you require.
-    /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
-    public class DoubleDocValuesField : NumericDocValuesField
-    {
-        /// <summary>
-        /// Creates a new <see cref="Index.DocValues"/> field with the specified 64-bit double value </summary>
-        /// <param name="name"> field name </param>
-        /// <param name="value"> 64-bit double value </param>
-        /// <exception cref="ArgumentNullException"> if the field name is <c>null</c> </exception>
-        public DoubleDocValuesField(string name, double value)
-            : base(name, BitConverter.DoubleToInt64Bits(value))
-        {
-        }
-
-        public override void SetDoubleValue(double value)
-        {
-            base.SetInt64Value(BitConverter.DoubleToInt64Bits(value));
-        }
-
-        public override void SetInt64Value(long value)
-        {
-            throw new System.ArgumentException("cannot change value type from System.Double to System.Int64");
-        }
-    }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a5dc68d0/src/Lucene.Net.Core/Document/DoubleField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Document/DoubleField.cs b/src/Lucene.Net.Core/Document/DoubleField.cs
deleted file mode 100644
index f764782..0000000
--- a/src/Lucene.Net.Core/Document/DoubleField.cs
+++ /dev/null
@@ -1,180 +0,0 @@
-using Lucene.Net.Index;
-using System;
-
-namespace Lucene.Net.Documents
-{
-    /*
-     * 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>
-    /// <para>
-    /// Field that indexes <see cref="double"/> values
-    /// for efficient range filtering and sorting. Here's an example usage:
-    ///
-    /// <code>
-    /// document.Add(new DoubleField(name, 6.0, Field.Store.NO));
-    /// </code>
-    ///
-    /// For optimal performance, re-use the <see cref="DoubleField"/> and
-    /// <see cref="Document"/> instance for more than one document:
-    ///
-    /// <code>
-    ///     DoubleField field = new DoubleField(name, 0.0, Field.Store.NO);
-    ///     Document document = new Document();
-    ///     document.Add(field);
-    ///
-    ///     for (all documents)
-    ///     {
-    ///         ...
-    ///         field.SetDoubleValue(value)
-    ///         writer.AddDocument(document);
-    ///         ...
-    ///     }
-    /// </code>
-    ///
-    /// See also <seealso cref="Int32Field"/>, <seealso cref="Int64Field"/>, 
-    /// <see cref="SingleField"/>.</para>
-    ///
-    /// <para>To perform range querying or filtering against a
-    /// <see cref="DoubleField"/>, use <see cref="Search.NumericRangeQuery"/> or 
-    /// <see cref="Search.NumericRangeFilter{T}"/>.  To sort according to a
-    /// <see cref="DoubleField"/>, use the normal numeric sort types, eg
-    /// <see cref="Lucene.Net.Search.SortFieldType.DOUBLE"/>. <see cref="DoubleField"/>
-    /// values can also be loaded directly from <see cref="Search.IFieldCache"/>.</para>
-    ///
-    /// <para>You may add the same field name as an <see cref="DoubleField"/> to
-    /// the same document more than once.  Range querying and
-    /// filtering will be the logical OR of all values; so a range query
-    /// will hit all documents that have at least one value in
-    /// the range. However sort behavior is not defined.  If you need to sort,
-    /// you should separately index a single-valued <see cref="DoubleField"/>.</para>
-    ///
-    /// <para>A <see cref="DoubleField"/> will consume somewhat more disk space
-    /// in the index than an ordinary single-valued field.
-    /// However, for a typical index that includes substantial
-    /// textual content per document, this increase will likely
-    /// be in the noise. </para>
-    ///
-    /// <para>Within Lucene, each numeric value is indexed as a
-    /// <em>trie</em> structure, where each term is logically
-    /// assigned to larger and larger pre-defined brackets (which
-    /// are simply lower-precision representations of the value).
-    /// The step size between each successive bracket is called the
-    /// <c>precisionStep</c>, measured in bits.  Smaller
-    /// <c>precisionStep</c> values result in larger number
-    /// of brackets, which consumes more disk space in the index
-    /// but may result in faster range search performance.  The
-    /// default value, 4, was selected for a reasonable tradeoff
-    /// of disk space consumption versus performance.  You can
-    /// create a custom <see cref="FieldType"/> and invoke the
-    /// <see cref="FieldType.NumericPrecisionStep"/> setter if you'd
-    /// like to change the value.  Note that you must also
-    /// specify a congruent value when creating 
-    /// <see cref="Search.NumericRangeQuery{T}"/> or <see cref="Search.NumericRangeFilter{T}"/>.
-    /// For low cardinality fields larger precision steps are good.
-    /// If the cardinality is &lt; 100, it is fair
-    /// to use <see cref="int.MaxValue"/>, which produces one
-    /// term per value.</para>
-    ///
-    /// <para>For more information on the internals of numeric trie
-    /// indexing, including the <see cref="Search.NumericRangeQuery{T}.PrecisionStep"/> (<a
-    /// href="../search/NumericRangeQuery.html#precisionStepDesc"><c>precisionStep</c></a>)
-    /// configuration, see <see cref="Search.NumericRangeQuery{T}"/>. The format of
-    /// indexed values is described in <see cref="Util.NumericUtils"/>.</para>
-    ///
-    /// <para>If you only need to sort by numeric value, and never
-    /// run range querying/filtering, you can index using a
-    /// <c>precisionStep</c> of <see cref="int.MaxValue"/>.
-    /// this will minimize disk space consumed. </para>
-    ///
-    /// <para>More advanced users can instead use 
-    /// <see cref="Analysis.NumericTokenStream"/> directly, when indexing numbers. This
-    /// class is a wrapper around this token stream type for
-    /// easier, more intuitive usage.</para>
-    ///
-    /// @since 2.9
-    /// </summary>
-#if FEATURE_SERIALIZABLE
-    [Serializable]
-#endif
-    public sealed class DoubleField : Field
-    {
-        /// <summary>
-        /// Type for a <see cref="DoubleField"/> that is not stored:
-        /// normalization factors, frequencies, and positions are omitted.
-        /// </summary>
-        public static readonly FieldType TYPE_NOT_STORED = new FieldType();
-
-        /// <summary>
-        /// Type for a stored <see cref="DoubleField"/>:
-        /// normalization factors, frequencies, and positions are omitted.
-        /// </summary>
-        public static readonly FieldType TYPE_STORED = new FieldType();
-
-        static DoubleField()
-        {
-            TYPE_NOT_STORED.IsIndexed = true;
-            TYPE_NOT_STORED.IsTokenized = true;
-            TYPE_NOT_STORED.OmitNorms = true;
-            TYPE_NOT_STORED.IndexOptions = IndexOptions.DOCS_ONLY;
-            TYPE_NOT_STORED.NumericType = NumericType.DOUBLE;
-            TYPE_NOT_STORED.Freeze();
-
-            TYPE_STORED.IsIndexed = true;
-            TYPE_STORED.IsTokenized = true;
-            TYPE_STORED.OmitNorms = true;
-            TYPE_STORED.IndexOptions = IndexOptions.DOCS_ONLY;
-            TYPE_STORED.NumericType = NumericType.DOUBLE;
-            TYPE_STORED.IsStored = true;
-            TYPE_STORED.Freeze();
-        }
-
-        /// <summary>
-        /// Creates a stored or un-stored <see cref="DoubleField"/> with the provided value
-        /// and default <c>precisionStep</c> 
-        /// <see cref="Util.NumericUtils.PRECISION_STEP_DEFAULT"/> (4).
-        /// </summary>
-        /// <param name="name"> field name </param>
-        /// <param name="value"> 64-bit <see cref="double"/> value </param>
-        /// <param name="stored"> <see cref="Field.Store.YES"/> if the content should also be stored </param>
-        /// <exception cref="ArgumentNullException"> if the field name is <c>null</c>.  </exception>
-        public DoubleField(string name, double value, Store stored)
-            : base(name, stored == Store.YES ? TYPE_STORED : TYPE_NOT_STORED)
-        {
-            m_fieldsData = Convert.ToDouble(value);
-        }
-
-        /// <summary>
-        /// Expert: allows you to customize the <see cref="FieldType"/>. 
-        /// </summary>
-        /// <param name="name"> field name </param>
-        /// <param name="value"> 64-bit double value </param>
-        /// <param name="type"> customized field type: must have <see cref="FieldType.NumericType"/>
-        ///         of <see cref="NumericType.DOUBLE"/>. </param>
-        /// <exception cref="ArgumentNullException"> if the field name or type is <c>null</c>, or
-        ///          if the field type does not have a <see cref="NumericType.DOUBLE"/> <see cref="FieldType.NumericType"/> </exception>
-        public DoubleField(string name, double value, FieldType type)
-            : base(name, type)
-        {
-            if (type.NumericType != NumericType.DOUBLE)
-            {
-                throw new System.ArgumentException("type.NumericType must be NumericType.DOUBLE but got " + type.NumericType);
-            }
-            m_fieldsData = Convert.ToDouble(value);
-        }
-    }
-}
\ No newline at end of file


Mime
View raw message