lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [23/62] [abbrv] lucenenet git commit: Deleted obsolete Contrib folder
Date Sat, 01 Apr 2017 01:09:16 GMT
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/02362804/src/contrib/Core/Index/FieldEnumerator.cs
----------------------------------------------------------------------
diff --git a/src/contrib/Core/Index/FieldEnumerator.cs b/src/contrib/Core/Index/FieldEnumerator.cs
deleted file mode 100644
index ce4148e..0000000
--- a/src/contrib/Core/Index/FieldEnumerator.cs
+++ /dev/null
@@ -1,842 +0,0 @@
-/*
- * 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 System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-using Lucene.Net.Util;
-
-namespace Lucene.Net.Index
-{
-    /// <summary>
-    /// The type of parser for the value of the term.
-    /// </summary>
-    public enum FieldParser
-    {
-        String,
-        Numeric
-    }
-
-    /// <summary>
-    /// <para>Base class for the typed enumerators.</para> 
-    /// 
-    /// <para>
-    /// There are five implementations of FieldEnumerator<typeparamref name="T"/> for
-    /// strings, integers, longs, floats, and doubles. The numeric enumerators support both 
-    /// standard Field and NumericField implementations.  The string and numeric enumerators
-    /// have slightly different options, but both should be used within a using statment
-    /// to close the underlying TermEnum/TermDocs. Refer to the unit tests for usage examples.
-    /// </para>
-    /// </summary>
-    /// <typeparam name="T">The type of data being enumerated.</typeparam>
-    public abstract class FieldEnumerator<T> : IDisposable
-    {
-        /// <summary>
-        /// Whether the enumerator will include TermDocs.
-        /// </summary>
-        protected bool includeDocs;
-
-        /// <summary>
-        /// The underlying TermEnum;
-        /// </summary>
-        private TermEnum termEnum;
-
-        /// <summary>
-        /// The optional TermDocs.
-        /// </summary>
-        private TermDocs termDocs;
-
-        /// <summary>
-        /// The specialized TermEnum enumerator.
-        /// </summary>
-        protected TermEnumerator tEnum;
-
-        /// <summary>
-        /// The specialized TermDoc enumerator.
-        /// </summary>
-        private TermDocEnumerator.TermDocUsingTermsEnumerator tdEnum;
-
-        /// <summary>
-        /// Whether or not the instance has been disposed.
-        /// </summary>
-        private bool disposed;
-
-        /// <summary>
-        /// Initialization method called by subclasses to simulate a shared
-        /// base constructor as generic classes cannot have a parameterized ctor.
-        /// </summary>
-        /// <param name="reader">The index reader to read from.</param>
-        /// <param name="field">The field to enumerate.</param>
-        protected void Init(IndexReader reader, string field)
-        {
-            this.Init(reader, field, true);
-        }
-
-        /// <summary>
-        /// Initialization method called by subclasses to simulate a shared
-        /// base constructor as generic classes cannot have a parameterized ctor.
-        /// </summary>
-        /// <param name="reader">The index reader to read from.</param>
-        /// <param name="fieldName">The field to enumerate.</param>
-        /// <param name="includeDocs">Whether this enumerator will support TermDocs.</param>
-        protected void Init(IndexReader reader, string fieldName, bool includeDocs)
-        {
-            this.termEnum = reader.Terms(new Term(fieldName));
-            if (includeDocs)
-            {
-                this.termDocs = reader.TermDocs();
-                this.tdEnum = new TermDocEnumerator.TermDocUsingTermsEnumerator(this.termDocs, this.termEnum);
-            }
-            this.tEnum = new TermEnumerator(termEnum, termDocs, fieldName, this);
-        }
-
-        /// <summary>
-        /// Method to attempt to parse out the value from the encoded string
-        /// and sets the value of Current.
-        /// </summary>
-        /// <param name="s">The encoded string.</param>
-        /// <returns>True if the value was successfully parsed, false if we reached the
-        /// end of encoded values in the fiele and only the tries remain.</returns>
-        protected abstract bool TryParse(string s);
-
-        /// <summary>
-        /// Access the enumerator for the terms.
-        /// </summary>
-        public TermEnumerator Terms
-        {
-            get { return this.tEnum; }
-        }
-
-        /// <summary>
-        /// Access the enumerator for the TermDocs.
-        /// </summary>
-        public TermDocEnumerator.TermDocUsingTermsEnumerator Docs
-        {
-            get
-            {
-                if (this.termDocs == null)
-                {
-                    throw new NotSupportedException("This instance does not support enumeration over the document ids.");
-                }
-                else
-                {
-                    return this.tdEnum;
-                }
-            }
-        }
-
-        #region IDisposable Members
-
-        /// <summary>
-        /// Dispose of the instance.
-        /// </summary>
-        public void Dispose()
-        {
-            if (!this.disposed)
-            {
-                this.disposed = true;
-                if (this.termEnum != null)
-                {
-                    this.termEnum.Close();
-                }
-                if (this.termDocs != null)
-                {
-                    this.termDocs.Close();
-                }
-                GC.SuppressFinalize(this);
-            }
-        }
-
-        #endregion
-
-        /// <summary>
-        /// The enumerator over the terms in an index.
-        /// </summary>
-        public class TermEnumerator : IEnumerator<T>, IEnumerable<T>
-        {
-            /// <summary>
-            /// The underlying TermEnum;
-            /// </summary>
-            private TermEnum termEnum;
-
-            /// <summary>
-            /// The optional TermDocs.
-            /// </summary>
-            private TermDocs termDocs;
-
-            /// <summary>
-            /// The current term in the enum.
-            /// </summary>
-            private Term currentTerm;
-
-            /// <summary>
-            /// The field name, if any for the enum.
-            /// </summary>
-            protected string fieldName;
-
-            /// <summary>
-            /// Whether the enumerator has moved beyond the first position.
-            /// </summary>
-            private bool isFirst = true;
-
-            /// <summary>
-            /// THe enclosing instance, called back to in order to parse the field.
-            /// </summary>
-            private FieldEnumerator<T> enclosing;
-
-            /// <summary>
-            /// Ctor.
-            /// </summary>
-            /// <param name="termEnum">The TermEnum to wrap.</param>
-            /// <param name="termDocs">The TermDocs to wrap.</param>
-            /// <param name="field"> </param>
-            /// <param name="enclosing"> </param>
-            public TermEnumerator(TermEnum termEnum, TermDocs termDocs, string field, FieldEnumerator<T> enclosing)
-            {
-                this.termEnum = termEnum;
-                this.termDocs = termDocs;
-                this.fieldName = field;
-                this.enclosing = enclosing;
-            }
-
-            #region IEnumerator<T> Members
-
-            /// <summary>
-            /// The current item in the enumerator.
-            /// </summary>
-            public T Current
-            {
-                get;
-                internal set;
-            }
-
-            #endregion
-
-            #region IEnumerator Members
-
-            /// <summary>
-            /// Current item in the enumerator.
-            /// </summary>
-            object IEnumerator.Current
-            {
-                get { return (object)this.Current; }
-            }
-
-            /// <summary>
-            /// Advance to the next item.
-            /// </summary>
-            /// <returns></returns>
-            public bool MoveNext()
-            {
-                if (this.isFirst)
-                {
-                    this.isFirst = false;
-                }
-                else
-                {
-                    if (!this.termEnum.Next())
-                    {
-                        return false;
-                    }
-                }
-
-                this.currentTerm = termEnum.Term;
-                if (this.currentTerm == null || (!this.currentTerm.Field.Equals(this.fieldName)))
-                {
-                    return false;
-                }
-
-                if (this.enclosing.TryParse(this.currentTerm.Text))
-                {
-                    if (this.termDocs != null)
-                    {
-                        this.termDocs.Seek(this.termEnum);
-                    }
-                    return true;
-                }
-
-                return false;
-            }
-
-            /// <summary>
-            /// Reset the enumerator to the beginngin.
-            /// </summary>
-            public void Reset()
-            {
-                throw new NotSupportedException("The enumerator cannot be reset");
-            }
-
-            #endregion
-
-            #region IDisposable Members
-
-            public void Dispose()
-            {
-                // noop
-            }
-
-            #endregion
-
-            #region IEnumerable<T> Members
-
-            /// <summary>
-            /// Accessor to IEnumerator-T-."/>
-            /// </summary>
-            /// <returns></returns>
-            public IEnumerator<T> GetEnumerator()
-            {
-                return this;
-            }
-
-            #endregion
-
-            #region IEnumerable Members
-
-            /// <summary>
-            /// Accessor to IEnumertor.
-            /// </summary>
-            /// <returns></returns>
-            IEnumerator IEnumerable.GetEnumerator()
-            {
-                return this.GetEnumerator();
-            }
-
-            #endregion
-        }
-    }
-
-    /// <summary>
-    /// Class to handle creating a TermDocs and allowing for seeking and enumeration. Used
-    /// when you have a set of one or moreterms for which you want to enumerate over the 
-    /// documents that contain those terms.
-    /// </summary>
-    public class TermDocEnumerator : IEnumerable<int>, IDisposable
-    {
-        /// <summary>
-        /// The underlying TermDocs.
-        /// </summary>
-        private TermDocs termDocs;
-
-        /// <summary>
-        /// Ctor.
-        /// </summary>
-        /// <param name="termDocs">The TermDocs to wrap.</param>
-        public TermDocEnumerator(TermDocs termDocs)
-        {
-            this.termDocs = termDocs;
-        }
-
-        /// <summary>
-        /// Seek to a specific term.
-        /// </summary>
-        /// <param name="t"></param>
-        public void Seek(Term t)
-        {
-            this.termDocs.Seek(t);
-        }
-
-        #region IEnumerable<int> Members
-
-        public IEnumerator<int> GetEnumerator()
-        {
-            return new TermDocUsingTermsEnumerator(this.termDocs);
-        }
-
-        #endregion
-
-        #region IEnumerable Members
-
-        IEnumerator IEnumerable.GetEnumerator()
-        {
-            return this.GetEnumerator();
-        }
-
-        #endregion
-
-        #region IDisposable Members
-
-        /// <summary>
-        /// Dispose of the instance, closing the termdocs.
-        /// </summary>
-        public void Dispose()
-        {
-            if (this.termDocs != null)
-            {
-                termDocs.Close();
-            }
-        }
-
-        #endregion
-
-        /// <summary>
-        /// Class to handle enumeration over the TermDocs that does NOT close them
-        /// on a call to Dispose!
-        /// </summary>
-        public class TermDocUsingTermsEnumerator : IEnumerable<int>, IEnumerator<int>
-        {
-            /// <summary>
-            /// A reference to an outside TermEnum that is used to position
-            /// the TermDocs.  It can be null.
-            /// </summary>
-            private TermEnum termEnum;
-
-            /// <summary>
-            /// The underlying TermDocs.
-            /// </summary>
-            private TermDocs termDocs;
-
-            /// <summary>
-            /// Ctor.
-            /// </summary>
-            /// <param name="termDocs">TermDocs to wrap</param>
-            internal TermDocUsingTermsEnumerator(TermDocs termDocs)
-                : this(termDocs, null)
-            { }
-
-            /// <summary>
-            /// Ctor.
-            /// </summary>
-            /// <param name="td">Underlying TermDocs.</param>
-            /// <param name="termEnum">Enclosing field enum.</param>
-            internal TermDocUsingTermsEnumerator(TermDocs td, TermEnum termEnum)
-            {
-                this.termDocs = td;
-                this.termEnum = termEnum;
-            }
-
-            /// <summary>
-            /// Seel to a term in the underlying TermDocs.
-            /// </summary>
-            /// <param name="te">The point to seek to.</param>
-            internal void Seek(TermEnum te)
-            {
-                this.termDocs.Seek(te);
-            }
-
-            #region IEnumerable<int> Members
-
-            /// <summary>
-            /// Get the enumerator.
-            /// </summary>
-            /// <returns></returns>
-            public IEnumerator<int> GetEnumerator()
-            {
-                return this;
-            }
-
-            #endregion
-
-            #region IEnumerable Members
-
-            /// <summary>
-            /// Get the enumerator.
-            /// </summary>
-            /// <returns></returns>
-            IEnumerator IEnumerable.GetEnumerator()
-            {
-                return this.GetEnumerator();
-            }
-
-            #endregion
-
-            #region IEnumerator<int> Members
-
-            /// <summary>
-            /// The current document id.
-            /// </summary>
-            public int Current
-            {
-                get { return this.termDocs.Doc; }
-            }
-
-            #endregion
-
-            #region IDisposable Members
-
-            /// <summary>
-            /// Dispose impl.
-            /// </summary>
-            public void Dispose()
-            {
-                // noop as the closing of the underlying
-                // TermDocs is handled by the containing class
-            }
-
-            #endregion
-
-            #region IEnumerator Members
-
-            /// <summary>
-            /// The current item.
-            /// </summary>
-            object IEnumerator.Current
-            {
-                get { throw new NotImplementedException(); }
-            }
-
-            /// <summary>
-            /// Move to the next item.
-            /// </summary>
-            /// <returns>True if more, false if not.</returns>
-            public bool MoveNext()
-            {
-                return this.termDocs.Next();
-            }
-
-            /// <summary>
-            /// Not implemented. Use Seek instead.
-            /// </summary>
-            public void Reset()
-            {
-                throw new NotImplementedException();
-            }
-
-            #endregion
-        }
-    }
-
-
-    /// <summary>
-    /// Implementation for enumerating over terms with a string value.
-    /// </summary>
-    public class StringFieldEnumerator : FieldEnumerator<string>
-    {
-        /// <summary>
-        /// Construct an enumerator over one field.
-        /// </summary>
-        /// <param name="reader">Index reader.</param>
-        /// <param name="fieldName">The field to read.</param>
-        public StringFieldEnumerator(IndexReader reader, string fieldName)
-        {
-            this.Init(reader, fieldName);
-        }
-
-        /// <summary>
-        /// Construct an enumerator over one field.
-        /// </summary>
-        /// <param name="reader">Index reader.</param>
-        /// <param name="fieldName">The field to read.</param>
-        /// <param name="includeDocs">Whether the TermDocs will also be enumerated.</param>
-        public StringFieldEnumerator(IndexReader reader, string fieldName, bool includeDocs)
-        {
-            this.Init(reader, fieldName, includeDocs);
-        }
-
-        /// <summary>
-        /// Sets the value of current.
-        /// </summary>
-        /// <param name="s">The string.</param>
-        /// <returns>Always true.</returns>
-        protected override bool TryParse(string s)
-        {
-            this.tEnum.Current = s;
-            return true;
-        }
-    }
-
-    /// <summary>
-    /// Base for enumerating over numeric fields.
-    /// </summary>
-    /// <typeparam name="T"></typeparam>
-    public abstract class NumericFieldEnum<T> : FieldEnumerator<T>
-    {
-        /// <summary>
-        /// The parser type for the field being enumerated.
-        /// </summary>
-        private FieldParser parser;
-
-        /// <summary>
-        /// Initialize the instance.
-        /// </summary>
-        /// <param name="reader">The reader.</param>
-        /// <param name="field">The field name.</param>
-        /// <param name="includeDocs">Whether to include a TermDoc enum.</param>
-        /// <param name="parser">The parser to use on the field.</param>
-        protected void Init(IndexReader reader, string field, bool includeDocs, FieldParser parser)
-        {
-            base.Init(reader, field, includeDocs);
-            this.parser = parser;
-        }
-
-        /// <summary>
-        /// Overridden from base.
-        /// </summary>
-        /// <param name="s">String to parse.</param>
-        /// <returns></returns>
-        protected override bool TryParse(string s)
-        {
-            if (this.parser == FieldParser.Numeric)
-            {
-                return this.TryParseNumeric(s);
-            }
-            else
-            {
-                return this.TryParseString(s);
-            }
-        }
-
-        /// <summary>
-        /// Parse out a standard string and set the value of current.
-        /// </summary>
-        /// <param name="s">String to parse.</param>
-        /// <returns>True on success.</returns>
-        protected abstract bool TryParseString(string s);
-
-        /// <summary>
-        /// Parse out an encoded numeric string and set the value of current.
-        /// </summary>
-        /// <param name="s">String to parse.</param>
-        /// <returns>True on success.</returns>
-        protected abstract bool TryParseNumeric(string s);
-    }
-
-    /// <summary>
-    /// Implementation for enumerating over all of the terms in an int numeric field.
-    /// </summary>
-    public class IntFieldEnumerator : NumericFieldEnum<int>
-    {
-        /// <summary>
-        /// Construct an enumerator over one field.
-        /// </summary>
-        /// <param name="reader">Index reader.</param>
-        /// <param name="fieldName">The field to read.</param>
-        public IntFieldEnumerator(IndexReader reader, string fieldName, FieldParser parser)
-        {
-            this.Init(reader, fieldName, true, parser);
-        }
-
-        /// <summary>
-        /// Construct an enumerator over one field.
-        /// </summary>
-        /// <param name="reader">Index reader.</param>
-        /// <param name="fieldName">The field to read.</param>
-        /// <param name="includeDocs">Whether the TermDocs will also be enumerated.</param>
-        public IntFieldEnumerator(IndexReader reader, string fieldName, FieldParser parser, bool includeDocs)
-        {
-            this.Init(reader, fieldName, includeDocs, parser);
-        }
-
-        /// <summary>
-        /// Parse the int from the string.
-        /// </summary>
-        /// <param name="s">String to parse.</param>
-        /// <returns>Always true.</returns>
-        protected override bool TryParseString(string s)
-        {
-            this.tEnum.Current = Int32.Parse(s);
-            return true;
-        }
-
-        /// <summary>
-        /// Parse the int from an encoded string.
-        /// </summary>
-        /// <param name="s">String to parse.</param>
-        /// <returns>True if the parse was successful, false indicating failure
-        /// and the end of useful terms in the numeric field.</returns>
-        protected override bool TryParseNumeric(string s)
-        {
-            int shift = s[0] - NumericUtils.SHIFT_START_INT;
-            if (shift > 0 && shift <= 31)
-            {
-                return false;
-            }
-            else
-            {
-                this.tEnum.Current = NumericUtils.PrefixCodedToInt(s);
-                return true;
-            }
-        }
-    }
-
-    /// <summary>
-    /// Implementation for enumerating over all of the terms in a float numeric field.
-    /// </summary>
-    public class FloatFieldEnumerator : NumericFieldEnum<float>
-    {
-
-        /// <summary>
-        /// Construct an enumerator over one field.
-        /// </summary>
-        /// <param name="reader">Index reader.</param>
-        /// <param name="fieldName">The field to read.</param>
-        public FloatFieldEnumerator(IndexReader reader, string fieldName, FieldParser parser)
-        {
-            this.Init(reader, fieldName, true, parser);
-        }
-
-        /// <summary>
-        /// Construct an enumerator over one field.
-        /// </summary>
-        /// <param name="reader">Index reader.</param>
-        /// <param name="fieldName">The field to read.</param>
-        /// <param name="includeDocs">Whether the TermDocs will also be enumerated.</param>
-        public FloatFieldEnumerator(IndexReader reader, string fieldName, FieldParser parser, bool includeDocs)
-        {
-            this.Init(reader, fieldName, includeDocs, parser);
-        }
-
-        /// <summary>
-        /// Parse the float from a string.
-        /// </summary>
-        /// <param name="s">The string to parse.</param>
-        /// <returns>Always true.</returns>
-        protected override bool TryParseString(string s)
-        {
-            this.tEnum.Current = float.Parse(s);
-            return true;
-        }
-
-        /// <summary>
-        /// Parse the float from a numeric field.
-        /// </summary>
-        /// <param name="s">The string to parse.</param>
-        /// <returns>True if the string was parsed, false to signify the
-        /// end of usable terms in a numeric field.</returns>
-        protected override bool TryParseNumeric(string s)
-        {
-            int shift = s[0] - NumericUtils.SHIFT_START_INT;
-            if (shift > 0 && shift <= 31)
-            {
-                return false;
-            }
-            else
-            {
-                this.tEnum.Current = NumericUtils.SortableIntToFloat(NumericUtils.PrefixCodedToInt(s));
-                return true;
-            }
-        }
-    }
-
-    /// <summary>
-    /// Implementation for enumerating over all of the terms in a double numeric field.
-    /// </summary>
-    public class DoubleFieldEnumerator : NumericFieldEnum<double>
-    {
-        /// <summary>
-        /// Construct an enumerator over one field.
-        /// </summary>
-        /// <param name="reader">Index reader.</param>
-        /// <param name="fieldName">The field to read.</param>
-        public DoubleFieldEnumerator(IndexReader reader, string fieldName, FieldParser parser)
-        {
-            this.Init(reader, fieldName, true, parser);
-        }
-
-        /// <summary>
-        /// Construct an enumerator over one field.
-        /// </summary>
-        /// <param name="reader">Index reader.</param>
-        /// <param name="fieldName">The field to read.</param>
-        /// <param name="includeDocs">Whether the TermDocs will also be enumerated.</param>
-        public DoubleFieldEnumerator(IndexReader reader, string fieldName, FieldParser parser, bool includeDocs)
-        {
-            this.Init(reader, fieldName, includeDocs, parser);
-        }
-
-        /// <summary>
-        /// Parse the double from a string.
-        /// </summary>
-        /// <param name="s">The string to parse.</param>
-        /// <returns>Always true.</returns>
-        protected override bool TryParseString(string s)
-        {
-            this.tEnum.Current = Double.Parse(s);
-            return true;
-        }
-
-        /// <summary>
-        /// Parse the double from a numeric field.
-        /// </summary>
-        /// <param name="s">The string to parse.</param>
-        /// <returns>True if the string was parsed, false to indicate the end
-        /// of usable numeric terms.</returns>
-        protected override bool TryParseNumeric(string s)
-        {
-            int shift = s[0] - NumericUtils.SHIFT_START_LONG;
-            if (shift > 0 && shift <= 63)
-            {
-                return false;
-            }
-            else
-            {
-                this.tEnum.Current = NumericUtils.SortableLongToDouble(NumericUtils.PrefixCodedToLong(s));
-                return true;
-            }
-        }
-    }
-
-    /// <summary>
-    /// Implementation for enumerating over all of the terms in a long numeric field.
-    /// </summary>
-    public class LongFieldEnumerator : NumericFieldEnum<long>
-    {
-        /// <summary>
-        /// Construct an enumerator over one field.
-        /// </summary>
-        /// <param name="reader">Index reader.</param>
-        /// <param name="fieldName">The field to read.</param>
-        public LongFieldEnumerator(IndexReader reader, string fieldName, FieldParser parser)
-        {
-            this.Init(reader, fieldName, true, parser);
-        }
-
-        /// <summary>
-        /// Construct an enumerator over one field.
-        /// </summary>
-        /// <param name="reader">Index reader.</param>
-        /// <param name="fieldName">The field to read.</param>
-        /// <param name="includeDocs">Whether the TermDocs will also be enumerated.</param>
-        public LongFieldEnumerator(IndexReader reader, string fieldName, FieldParser parser, bool includeDocs)
-        {
-            this.Init(reader, fieldName, includeDocs, parser);
-        }
-
-        /// <summary>
-        /// Parse the long from a string.
-        /// </summary>
-        /// <param name="s">The string to parse.</param>
-        /// <returns>Always true.</returns>
-        protected override bool TryParseString(string s)
-        {
-            this.tEnum.Current = long.Parse(s);
-            return true;
-        }
-
-        /// <summary>
-        /// Parse the long from a numeric field.
-        /// </summary>
-        /// <param name="s">The string to parse.</param>
-        /// <returns>True if the string was parsed, false to inidicate
-        /// the end of usable terms in a numeric field.</returns>
-        protected override bool TryParseNumeric(string s)
-        {
-            int shift = s[0] - NumericUtils.SHIFT_START_LONG;
-            if (shift > 0 && shift <= 63)
-            {
-                return false;
-            }
-            else
-            {
-                this.tEnum.Current = NumericUtils.PrefixCodedToLong(s);
-                return true;
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/02362804/src/contrib/Core/Index/SegmentsGenCommit.cs
----------------------------------------------------------------------
diff --git a/src/contrib/Core/Index/SegmentsGenCommit.cs b/src/contrib/Core/Index/SegmentsGenCommit.cs
deleted file mode 100644
index c6734f9..0000000
--- a/src/contrib/Core/Index/SegmentsGenCommit.cs
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * 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 System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-using Lucene.Net.Store;
-
-namespace Lucene.Net.Index
-{
-    /// <summary>
-    /// Class that will force an index writer to open an index based
-    /// on the generation in the segments.gen file as opposed to the
-    /// highest generation found in a directory listing.
-    /// 
-    /// A use case for using this IndexCommit when opening an IndexWriter
-    /// would be if index snapshots (source) are being copied over an 
-    /// existing index (target) and the source now has a lower generation
-    /// than the target due to initiating a rebuild of the index. 
-    /// </summary>
-    public class SegmentsGenCommit : IndexCommit
-    {
-        /// <summary>
-        /// The index.
-        /// </summary>
-        private Directory directory;
-
-        /// <summary>
-        /// The generation to use.
-        /// </summary>
-        private long generation = long.MinValue;
-
-        /// <summary>
-        /// Ctor.
-        /// </summary>
-        /// <param name="d">The index directory.</param>
-        public SegmentsGenCommit(Directory d)
-        {
-            this.directory = d;
-            this.ReadDirectory();
-        }
-
-        /// <summary>
-        /// Get the segments_n file for the generation found in the 
-        /// segments.gen file.
-        /// </summary>
-        /// <returns>The segments_n file to use.</returns>
-        public override string SegmentsFileName
-        {
-            get
-            {
-                return IndexFileNames.FileNameFromGeneration(IndexFileNames.SEGMENTS, string.Empty, this.generation);
-            }
-        }
-
-        public override long Generation
-        {
-            get
-            {
-                return this.generation;
-            }
-        }
-
-        public override ICollection<string> FileNames
-        {
-            get
-            {
-                throw new NotImplementedException();
-            }
-        }
-
-        public override Directory Directory
-        {
-            get
-            {
-                return this.directory;
-            }
-        }
-
-        /// <summary>
-        /// Read the segments.gen file to get the generation number.
-        /// </summary>
-        private void ReadDirectory()
-        {
-            IndexInput genInput = null;
-            try
-            {
-                genInput = directory.OpenInput(IndexFileNames.SEGMENTS_GEN);
-
-                if (genInput != null)
-                {
-                    int version = genInput.ReadInt();
-                    if (version == Lucene.Net.Index.SegmentInfos.FORMAT_LOCKLESS)
-                    {
-                        long gen0 = genInput.ReadLong();
-                        long gen1 = genInput.ReadLong();
-                        if (gen0 == gen1)
-                        {
-                            // The file is consistent, use the generation
-                            this.generation = gen0;
-                        }
-                    }
-                }
-            }
-            finally
-            {
-                genInput.Close();
-            }
-        }
-
-        // TODO: implement these new API functions -thoward
-        public override void Delete()
-        {
-            throw new NotImplementedException();
-        }
-
-        public override bool IsDeleted
-        {
-            get
-            {
-                throw new NotImplementedException();
-            }
-        }
-
-        public override bool IsOptimized
-        {
-            get { throw new NotImplementedException(); }
-        }
-
-        public override long Version
-        {
-            get
-            {
-                throw new NotImplementedException();
-            }
-        }
-
-        public override IDictionary<string, string> UserData
-        {
-            get
-            {
-                throw new NotImplementedException();
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/02362804/src/contrib/Core/Index/TermVectorEnumerator.cs
----------------------------------------------------------------------
diff --git a/src/contrib/Core/Index/TermVectorEnumerator.cs b/src/contrib/Core/Index/TermVectorEnumerator.cs
deleted file mode 100644
index 69ec94c..0000000
--- a/src/contrib/Core/Index/TermVectorEnumerator.cs
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * 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 System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace Lucene.Net.Index
-{
-    /// <summary>
-    /// Class to allow for enumerating over the documents in the index to 
-    /// retrieve the term vector for each one.
-    /// </summary>
-    public class TermVectorEnumerator : IEnumerator<ITermFreqVector>, IEnumerable<ITermFreqVector>
-    {
-        /// <summary>
-        /// Current document being accessed.
-        /// </summary>
-        private int document = -1;
-
-        /// <summary>
-        /// The field name the vectors are being accessed from.
-        /// </summary>
-        private string fieldName;
-
-        /// <summary>
-        /// The index reader that the vetors are retreived from.
-        /// </summary>
-        private IndexReader reader;
-
-        /// <summary>
-        /// The return value should a document be deleted.
-        /// </summary>
-        private EmptyVector emptyVector;
-
-        /// <summary>
-        /// Ctor.
-        /// </summary>
-        /// <param name="reader">The index reader used to read the vectors.</param>
-        /// <param name="field">The name of the field the vectors are read from.</param>
-        public TermVectorEnumerator(IndexReader reader, string field)
-        {
-            this.reader = reader;
-            this.fieldName = field;
-            this.emptyVector = new EmptyVector(field);
-        }
-
-        #region IEnumerator<TermFreqVector> Members
-
-        public ITermFreqVector Current
-        {
-            get { return this.CurrentVector(); }
-        }
-
-        #endregion
-
-        #region IDisposable Members
-
-        public void Dispose()
-        {
-            // this is a noop as we do not want to close the reader
-        }
-
-        #endregion
-
-        #region IEnumerator Members
-
-        object IEnumerator.Current
-        {
-            get { return this.CurrentVector(); }
-        }
-
-        public bool MoveNext()
-        {
-            this.document++;
-            return this.document < this.reader.MaxDoc;
-        }
-
-        public void Reset()
-        {
-            this.document = 0;
-        }
-
-        #endregion
-
-        #region IEnumerable<TermFreqVector> Members
-
-        public IEnumerator<ITermFreqVector> GetEnumerator()
-        {
-            return (IEnumerator<ITermFreqVector>)this;
-        }
-
-        #endregion
-
-        #region IEnumerable Members
-
-        IEnumerator IEnumerable.GetEnumerator()
-        {
-            return (IEnumerator<ITermFreqVector>)this;
-        }
-
-        #endregion
-
-        /// <summary>
-        /// Retrieve the current TermFreqVector from the index.
-        /// </summary>
-        /// <returns>The current TermFreqVector.</returns>
-        private ITermFreqVector CurrentVector()
-        {
-            if (this.reader.IsDeleted(this.document))
-            {
-                return this.emptyVector;
-            }
-            else
-            {
-                ITermFreqVector vector = this.reader.GetTermFreqVector(this.document, this.fieldName);
-                if (vector == null)
-                {
-                    vector = this.emptyVector;
-                }
-                return vector;
-            }
-        }
-    }
-
-    /// <summary>
-    /// A simple TermFreqVector implementation for an empty vector for use
-    /// with a deleted document or a document that does not have the field
-    /// that is being enumerated.
-    /// </summary>
-    public class EmptyVector : ITermFreqVector
-    {
-        private string field;
-
-        private string[] emptyString = new string[0];
-
-        private int[] emptyInt = new int[0];
-
-        public EmptyVector(string field)
-        {
-            this.field = field;
-        }
-
-        #region TermFreqVector Members
-
-        public string Field
-        {
-            get { return this.field; }
-        }
-
-        public int Size
-        {
-            get { return 0; }
-        }
-
-        public string[] GetTerms()
-        {
-            return this.emptyString;
-        }
-
-        public int[] GetTermFrequencies()
-        {
-            return this.emptyInt;
-        }
-
-        public int IndexOf(string term)
-        {
-            return 0;
-        }
-
-        public int[] IndexesOf(string[] terms, int start, int len)
-        {
-            return this.emptyInt;
-        }
-
-        #endregion
-    }
-}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/02362804/src/contrib/Core/Properties/AssemblyInfo.cs
----------------------------------------------------------------------
diff --git a/src/contrib/Core/Properties/AssemblyInfo.cs b/src/contrib/Core/Properties/AssemblyInfo.cs
deleted file mode 100644
index a492979..0000000
--- a/src/contrib/Core/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- *
- * 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 System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Security;
-
-// General Information about an assembly is controlled through the following 
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("Lucene.Net.Contrib.Core")]
-[assembly: AssemblyDescription("Contributions to the Lucene.Net core library.")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("The Apache Software Foundation")]
-[assembly: AssemblyProduct("Lucene.Net.Contrib.Core")]
-[assembly: AssemblyCopyright("Copyright 2006 - 2011 The Apache Software Foundation")]
-[assembly: AssemblyTrademark("Copyright 2006 - 2011 The Apache Software Foundation")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible 
-// to COM components.  If you need to access a type in this assembly from 
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(false)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("07022a0d-81bd-4d33-aba1-0bc8241524f5")]
-
-// Version information for an assembly consists of the following four values:
-//
-//      Major Version
-//      Minor Version 
-//      Build Number
-//      Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers 
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("3.0.3")]
-[assembly: AssemblyFileVersion("3.0.3")]
-
-[assembly: AllowPartiallyTrustedCallers]

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/02362804/src/contrib/Core/Util/Cache/SegmentCache.cs
----------------------------------------------------------------------
diff --git a/src/contrib/Core/Util/Cache/SegmentCache.cs b/src/contrib/Core/Util/Cache/SegmentCache.cs
deleted file mode 100644
index a6a4c9d..0000000
--- a/src/contrib/Core/Util/Cache/SegmentCache.cs
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * 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 System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading;
-
-using Lucene.Net.Index;
-
-namespace Lucene.Net.Util.Cache
-{
-    /// <summary>
-    /// Root custom cache to allow a factory to retain references to the custom
-    /// caches without having to be aware of the type.
-    /// </summary>
-    public abstract class AbstractSegmentCache
-    {
-        /// <summary>
-        /// Used to warm up the cache.
-        /// </summary>
-        /// <param name="reader">The reader to warm the cache for.</param>
-        /// <param name="key">The inner key.</param>
-        public abstract void Warm(IndexReader reader, string key);
-    }
-
-    /// <summary>
-    /// Custom cache with two levels of keys, outer key is the IndexReader
-    /// with the inner key being a string, commonly a field name but can be anything.
-    /// Refer to the unit tests for an example implementation.
-    /// <typeparam name="T">The type that is being cached.</typeparam>
-    /// </summary>
-    public abstract class SegmentCache<T> : AbstractSegmentCache
-    {
-        /// <summary>
-        /// The cache - outer key is the reader, inner key is the field name. Value is the item desired.
-        /// </summary>
-        private Dictionary<WeakKey, Dictionary<string, T>> readerCache = new Dictionary<WeakKey, Dictionary<string, T>>();
-
-        /// <summary>
-        /// Lock to use when accessing the cache.
-        /// </summary>
-        private ReaderWriterLockSlim cacheLock = new ReaderWriterLockSlim();
-
-        /// <summary>
-        /// Value creation.
-        /// </summary>
-        /// <param name="reader">The reader.</param>
-        /// <param name="key">The key to the item under the reader.</param>
-        /// <returns>The value.</returns>
-        protected abstract T CreateValue(IndexReader reader, string key);
-
-        /// <summary>
-        /// The number of outermost keys in the collection.
-        /// </summary>
-        public int KeyCount
-        {
-            get { return this.readerCache.Count; }
-        }
-
-        /// <summary>
-        /// Warm the cache - simply calls Get and ignores the return value.
-        /// </summary>
-        /// <param name="reader">The index reader to warm up.</param>
-        /// <param name="key">The key of the item under the reader.</param>
-        public override void Warm(IndexReader reader, string key)
-        {
-            this.Get(reader, key);
-        }
-
-        /// <summary>
-        /// Get the item from the cache.
-        /// </summary>
-        /// <param name="reader">The IndexReader the cache is from.</param>
-        /// <param name="key">The key of the item under the reader.</param>
-        /// <returns>The item from cache.</returns>
-        public virtual T Get(IndexReader reader, string key)
-        {
-            WeakKey readerRef = new SegmentCache<T>.WeakKey(reader);
-
-            Dictionary<string, T> innerCache;
-            T retVal = default(T);
-            this.cacheLock.EnterReadLock();
-            try
-            {
-                if (readerCache.TryGetValue(readerRef, out innerCache))
-                {
-                    innerCache.TryGetValue(key, out retVal);
-                }
-            }
-            finally
-            {
-                this.cacheLock.ExitReadLock();
-            }
-
-            if (retVal == null)
-            {
-                retVal = this.CreateValue(reader, key);
-                this.cacheLock.EnterWriteLock();
-                try
-                {
-                    if (!readerCache.TryGetValue(readerRef, out innerCache))
-                    {
-                        innerCache = new Dictionary<string, T>();
-                        readerCache.Add(readerRef, innerCache);
-                    }
-                    if (!innerCache.ContainsKey(key))
-                    {
-                        innerCache[key] = retVal;
-                    }
-                    else
-                    {
-                        // another thread must have put it in while waiting for the write lock
-                        // assumption is that the previous thread already flushed the old items
-                        return retVal;
-                    }
-
-                    // release the old items and yank the gc'd weak references
-                    var keys = from wr in this.readerCache.Keys where !wr.IsAlive select wr;
-                    List<WeakKey> keysToRemove = keys.ToList();
-                    foreach (WeakKey wk in keysToRemove)
-                    {
-                        this.readerCache.Remove(wk);
-                    }
-                }
-                finally
-                {
-                    this.cacheLock.ExitWriteLock();
-                }
-            }
-
-            return retVal;
-        }
-
-
-        /// <summary>
-        /// A weak referene wrapper for the hashtable keys. Whenever a key\value pair 
-        /// is added to the hashtable, the key is wrapped using a WeakKey. WeakKey saves the
-        /// value of the original object hashcode for fast comparison.
-        /// </summary>
-        internal class WeakKey : WeakReference
-        {
-            /// <summary>
-            /// The hashcode for the target.
-            /// </summary>
-            private int hashCode;
-
-            /// <summary>
-            /// Create a new WeakKey
-            /// </summary>
-            /// <param name="target">The object to use as the target.</param>
-            internal WeakKey(object target)
-                : base(target)
-            {
-                this.hashCode = target.GetHashCode();
-            }
-
-            /// <summary>
-            /// The hash code accessor.
-            /// </summary>
-            /// <returns></returns>
-            public override int GetHashCode()
-            {
-                return this.hashCode;
-            }
-
-            /// <summary>
-            /// Equality between keys.
-            /// </summary>
-            /// <param name="obj">The object to compare to.</param>
-            /// <returns>True if they are equivalent.</returns>
-            public override bool Equals(object obj)
-            {
-                WeakKey other = obj as WeakKey;
-                if (other == null)
-                {
-                    return false;
-                }
-
-                object a = this.Target;
-                object b = other.Target;
-
-                if (a == null && b == null)
-                {
-                    return true;
-                }
-                else if (a == null || b == null)
-                {
-                    return false;
-                }
-                else
-                {
-                    return a.Equals(b);
-                }
-            }
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/02362804/src/contrib/DistributedSearch/Distributed/Configuration/CurrentIndex.cs
----------------------------------------------------------------------
diff --git a/src/contrib/DistributedSearch/Distributed/Configuration/CurrentIndex.cs b/src/contrib/DistributedSearch/Distributed/Configuration/CurrentIndex.cs
deleted file mode 100644
index 325207e..0000000
--- a/src/contrib/DistributedSearch/Distributed/Configuration/CurrentIndex.cs
+++ /dev/null
@@ -1,614 +0,0 @@
-/*
- * 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 System;
-using System.Collections;
-using System.Collections.Specialized;
-using System.Configuration;
-using System.Diagnostics;
-using System.IO;
-using System.Xml;
-using Lucene.Net.Analysis;
-using Lucene.Net.Analysis.Standard;
-using Lucene.Net.Documents;
-using Lucene.Net.Index;
-using Lucene.Net.Store;
-using Lucene.Net.Distributed;
-
-namespace Lucene.Net.Distributed.Configuration
-{
-    public enum IndexSetting
-    {
-        NoSetting    = 0,
-        IndexA        = 1,
-        IndexB        = 2
-    }
-
-    /// <summary>
-    /// Definition of current index information managed by the 
-    /// LuceneUpdater windows service. The <copy> node within the
-    /// <indexset> node represents the information needed to load
-    /// a CurrentIndex object for a given IndexSet.
-    /// 
-    /// An example configuration would look like the following:
-    /// <code>
-    ///   <indexsets RAMAllocation="100000" CompoundFile="true" DeltaDirectory="c:\indexes\indexdocuments">
-    ///     <indexSet id="1" action="1" analyzer="1">
-    ///         <add key="localpath" value="c:\lucene\masterindex\index1" />
-    ///         <copy>
-    ///             <targetPath indexA="\\LuceneServer\lucene\indexA\index1" indexB="\\LuceneServer\lucene\indexA\index1" />
-    ///             <statusDir value="\\LuceneServer\lucene\statusfile\" />
-    ///         </copy>
-    ///         <add key="bottomid" value="1"/>
-    ///         <add key="topid" value="1000"/>
-    ///         <add key="idcolumn" value="pkId"/>
-    ///     </indexSet>
-    ///   </indexsets>
-    /// </code>
-    /// </summary>
-    public class CurrentIndex
-    {
-        #region Variables
-        private static readonly string CURRENTINDEX = "currentIndex";
-        private static readonly string INDEX_A = "indexA";
-        private static readonly string INDEX_B = "indexB";
-        private static readonly string TOGGLE = "toggle";
-        private string _strLocalPath;
-        private string _strStatusDir;
-        private string _strIndexAPath;
-        private string _strIndexBPath;
-        private bool _bIndexChanged=false;
-
-        private int _mergeFactor = (ConfigurationManager.AppSettings["IndexMergeFactor"] != null ? Convert.ToInt32(ConfigurationManager.AppSettings["IndexMergeFactor"]) : 5);
-        private int _maxMergeDocs = (ConfigurationManager.AppSettings["IndexMaxMergeDocs"] != null ? Convert.ToInt32(ConfigurationManager.AppSettings["IndexMaxMergeDocs"]) : 9999999);
-
-        #endregion
-
-        #region Constructors
-        /// <summary>
-        /// Constructs a new CurrentIndex using the XmlNode value (from IndexSetConfigurationHandler configuration)
-        /// </summary>
-        /// <param name="node">XmlNode containing configuration information</param>
-        /// <param name="strLocalPath">Local filesystem path to source index</param>
-        public CurrentIndex(XmlNode node, string strLocalPath)
-        {
-            this._strLocalPath=strLocalPath;
-            this.LoadValues(node);
-        }
-
-        /// <summary>
-        /// Constructs a shell CurrentIndex. Use this constructor to interact 
-        /// with the underlying status and toggle files ONLY.
-        /// </summary>
-        /// <param name="sStatusDir">Filesystem path to the status and toggle files for an index</param>
-        public CurrentIndex(string sStatusDir)
-        {
-            this._strStatusDir=sStatusDir;
-        }
-        #endregion
-
-        #region Internals
-        /// <summary>
-        /// Internal routine for use by constructor that accepts a configuration
-        /// entry structured as XmlNode.
-        /// </summary>
-        /// <param name="node">XmlNode containing configuration information</param>
-        internal void LoadValues(XmlNode node)
-        {
-            foreach (XmlNode c in node.ChildNodes)
-            {
-                if (c.Name.ToLower()=="targetpath")
-                {
-                    this._strIndexAPath = c.Attributes["indexA"].Value;
-                    this._strIndexBPath = c.Attributes["indexB"].Value;
-                }
-                else if (c.Name.ToLower()=="statusdir")
-                {
-                    this._strStatusDir = c.Attributes["value"].Value;
-                }
-            }
-            this.CheckValidConfiguration(node);
-        }
-        #endregion
-
-        #region Public properties
-        /// <summary>
-        /// Filesystem path to the local source for an index; this is the path to the master index.
-        /// </summary>
-        public string LocalPath
-        {
-            get {return this._strLocalPath;}
-        }
-        /// <summary>
-        /// Filesystem path to a LuceneServer's status and toggle file for a given IndexSet
-        /// </summary>
-        public string StatusDirectory
-        {
-            get {return this._strStatusDir;}
-        }
-
-        /// <summary>
-        /// Indicates the current index directory (IndexSetting enum) in use (the online set)
-        /// </summary>
-        public IndexSetting IndexSetting
-        {
-            get
-            {
-                string input=(this.GetCurrentIndex());
-                return (input==CurrentIndex.INDEX_A ? IndexSetting.IndexA : (input==CurrentIndex.INDEX_B ? IndexSetting.IndexB : IndexSetting.IndexA));
-            }
-        }
-
-        /// <summary>
-        /// Indicates the index directory to be used in any index searcher refresh
-        /// by determining if any updates have been applied
-        /// </summary>
-        public IndexSetting IndexSettingRefresh
-        {
-            get
-            {
-                if (this.HasChanged)
-                {
-                    return (this.IndexSetting==IndexSetting.IndexA ? IndexSetting.IndexB : (this.IndexSetting==IndexSetting.IndexB ? IndexSetting.IndexA : IndexSetting.IndexB ));
-                }
-                else
-                {
-                    return this.IndexSetting;
-                }
-            }
-        }
-
-        /// <summary>
-        /// Indicates if the current index permits updated indexes to be copied to CopyTargetPath
-        /// </summary>
-        public bool CanCopy
-        {
-            get {return (!this.GetToggle() && (this.LocalIndexVersion!=this.TargetIndexVersion));}
-        }
-
-        /// <summary>
-        /// Indicates if the current index has pending updates (in the offline directory) to be used by an index searcher
-        /// in a refresh evaluation
-        /// </summary>
-        public bool HasChanged
-        {
-            get {return this.GetToggle();}
-        }
-
-        /// <summary>
-        /// The target directory path to be used when updating the offline index
-        /// </summary>
-        public string CopyTargetPath
-        {
-            get {return (this.IndexSetting==IndexSetting.IndexA ? this._strIndexBPath : (this.IndexSetting==IndexSetting.IndexB ? this._strIndexAPath : ""));}
-        }
-        #endregion
-
-        #region Public methods
-        /// <summary>
-        /// Method that executes a filesystem copy of all directory files from a local path to 
-        /// the proper offline index.  This method ensures no conflicts occur with the online index.
-        /// </summary>
-        /// <returns>bool</returns>
-        public bool Copy()
-        {
-            try
-            {
-                if (this.CanCopy && this.CopyTargetPath!="")
-                {
-                    this.DeleteDirectoryFiles(this.CopyTargetPath);
-                    this.CopyDirectory(this._strLocalPath, this.CopyTargetPath);
-                    return true;
-                }
-                else
-                {
-                    return false;
-                }
-            }
-            catch (Exception e)
-            {
-                //Do something with e
-                return false;
-            }
-        }
-
-        /// <summary>
-        /// Method that executes a filesystem copy of updated or new files from a local path to 
-        /// the proper offline index.  This method ensures no conflicts occur with the online index.
-        /// </summary>
-        /// <returns></returns>
-        public bool CopyIncremental()
-        {
-            try
-            {
-                if (this.CanCopy && this.CopyTargetPath!="")
-                {
-                    this.CopyDirectoryIncremental(this._strLocalPath, this.CopyTargetPath);
-                    return true;
-                }
-                else
-                {
-                    return false;
-                }
-            }
-            catch (Exception e)
-            {
-                //Do something with e
-                return false;
-            }
-        }
-
-        /// <summary>
-        /// Takes a name/value pair collection to be used in updating an index. 
-        /// Deletes are necessary to ensure no duplication occurs within the index.
-        /// </summary>
-        /// <param name="nvcDeleteCollection">Set of record IDs (with underlying field name) to be applied for index updating</param>
-        public void ProcessLocalIndexDeletes(NameValueCollection nvcDeleteCollection)
-        {
-            if (IndexReader.IndexExists(this._strLocalPath) && nvcDeleteCollection.Count>0)
-            {
-                IndexReader idxDeleter = IndexReader.Open(this._strLocalPath);
-                string[] arKeys = nvcDeleteCollection.AllKeys;
-                int xDelete=0;
-                for (int k=0;k<arKeys.Length;k++)
-                {
-                    string[] arKeyValues=nvcDeleteCollection.GetValues(arKeys[k]);
-                    for (int v=0;v<arKeyValues.Length;v++)
-                        xDelete=idxDeleter.DeleteDocuments(new Term(arKeys[k].ToString(),arKeyValues[v].ToString()));
-                }
-                idxDeleter.Close();
-            }
-        }
-
-        /// <summary>
-        /// Executes a loop on the Documents arraylist, adding each one to the index with the associated analyzer.
-        /// </summary>
-        /// <param name="oAnalyzer">Analyzer to be used in index document addition</param>
-        /// <param name="alAddDocuments">Arraylist of Lucene Document objects to be inserted in the index</param>
-        /// <param name="bCompoundFile">Setting to dictate if the index should use compound format</param>
-        public void ProcessLocalIndexAdditions(Analyzer oAnalyzer, Hashtable htAddDocuments, bool bCompoundFile)
-        {
-            IndexWriter idxWriter = this.GetIndexWriter(this._strLocalPath, oAnalyzer, bCompoundFile);
-            idxWriter.SetMergeFactor(5);
-            idxWriter.SetMaxMergeDocs(9999999);
-
-            foreach (DictionaryEntry de in htAddDocuments)
-            {
-                Document d = (Document)de.Key;
-                Analyzer a = (Analyzer)de.Value;
-                idxWriter.AddDocument(d,a);
-            }
-            idxWriter.Close();
-        }
-
-        /// <summary>
-        /// Single method to be used by a searchhost to indicate an index refresh has completed.
-        /// </summary>
-        public void IndexRefresh()
-        {
-            if (this.HasChanged)
-            {
-                this.SetCurrentIndex(this.IndexSettingRefresh);
-                this.SetToggle(false);
-            }
-        }
-
-        /// <summary>
-        /// Single method to be used by an index updater to indicate an index update has completed.
-        /// </summary>
-        public void UpdateRefresh()
-        {
-            this.SetToggle(true);
-        }
-        #endregion
-
-        #region Private properties
-        /// <summary>
-        /// The filesystem path to the underlying index status file
-        /// </summary>
-        private string CurrentIndexFile
-        {
-            get {return (this._strStatusDir+(this._strStatusDir.EndsWith(@"\") ? "" : @"\")+CURRENTINDEX);}
-        }
-        /// <summary>
-        /// The filesystem path to the underlying index toggle file
-        /// </summary>
-        private string ToggleFile
-        {
-            get {return (this._strStatusDir+(this._strStatusDir.EndsWith(@"\") ? "" : @"\")+TOGGLE);}
-        }
-
-        #endregion
-
-        #region Private methods
-
-        /// <summary>
-        /// Validation routine to ensure all required values were present within xml configuration node
-        /// used in constructor.
-        /// </summary>
-        /// <param name="node">XmlNode containing configuration information</param>
-        private void CheckValidConfiguration(XmlNode node)
-        {
-            if (this._strLocalPath == null) throw new ConfigurationErrorsException("CurrentIndex local path invalid: "+Environment.NewLine+node.OuterXml);
-            if (this._strStatusDir == null) throw new ConfigurationErrorsException("CurrentIndex statusDir invalid: " + Environment.NewLine + node.OuterXml);
-            if (this._strIndexAPath == null) throw new ConfigurationErrorsException("CurrentIndex indexA invalid: " + Environment.NewLine + node.OuterXml);
-            if (this._strIndexBPath == null) throw new ConfigurationErrorsException("CurrentIndex indexB invalid: " + Environment.NewLine + node.OuterXml);
-        }
-
-        /// <summary>
-        /// Returns the current toggle file setting
-        /// </summary>
-        /// <returns>bool</returns>
-        private bool GetToggle()
-        {
-            bool bValue=false;
-            string input="";
-            try
-            {
-                if (!File.Exists(this.ToggleFile))
-                {
-                    this.SetToggle(false);
-                }
-                else
-                {
-                    StreamReader sr = File.OpenText(this.ToggleFile);
-                    input = sr.ReadLine();
-                    sr.Close();
-                    bValue = (input.ToLower()=="true" ? true : false);
-                }
-            }
-            catch (Exception ex)
-            {
-                //Do something with ex
-            }
-            return bValue;
-        }
-
-        /// <summary>
-        /// Returns the current status file setting
-        /// </summary>
-        /// <returns>string</returns>
-        private string GetCurrentIndex()
-        {
-            string input="";
-            try
-            {
-                if (!File.Exists(this.CurrentIndexFile))
-                {
-                    this.SetCurrentIndex(IndexSetting.IndexA);
-                    input=IndexSetting.IndexA.ToString();
-                }
-                else
-                {
-                    StreamReader sr = File.OpenText(this.CurrentIndexFile);
-                    input = sr.ReadLine();
-                    sr.Close();
-                }
-            }
-            catch (Exception ex)
-            {
-                //Do something with ex
-            }
-            return input;
-        }
-
-        /// <summary>
-        /// Updates the status file with the IndexSetting value parameter
-        /// </summary>
-        /// <param name="eIndexSetting">Setting to be applied to the status file</param>
-        private void SetCurrentIndex(IndexSetting eIndexSetting)
-        {
-            try
-            {
-                StreamWriter sw = File.CreateText(this.CurrentIndexFile);
-                sw.WriteLine((eIndexSetting==IndexSetting.IndexA ? CurrentIndex.INDEX_A : CurrentIndex.INDEX_B));
-                sw.Close();
-            }
-            catch (Exception ex)
-            {
-                //Do something with ex
-            }
-        }
-
-        /// <summary>
-        /// IndexWriter that can be used to apply updates to an index
-        /// </summary>
-        /// <param name="indexPath">File system path to the target index</param>
-        /// <param name="oAnalyzer">Lucene Analyzer to be used by the underlying IndexWriter</param>
-        /// <param name="bCompoundFile">Setting to dictate if the index should use compound format</param>
-        /// <returns></returns>
-        private IndexWriter GetIndexWriter(string indexPath, Analyzer oAnalyzer, bool bCompoundFile)
-        {
-            bool bExists = System.IO.Directory.Exists(indexPath);
-            if (bExists==false)
-                System.IO.Directory.CreateDirectory(indexPath);
-            bExists=IndexReader.IndexExists(FSDirectory.GetDirectory(indexPath, false));
-            IndexWriter idxWriter = new IndexWriter(indexPath, oAnalyzer, !bExists);
-            idxWriter.SetUseCompoundFile(bCompoundFile);
-            return idxWriter;
-        }
-
-        /// <summary>
-        /// Updates the toggle file with the bool value parameter
-        /// </summary>
-        /// <param name="bValue">Bool to be applied to the toggle file</param>
-        private void SetToggle(bool bValue)
-        {
-            try
-            {
-                StreamWriter sw = File.CreateText(this.ToggleFile);
-                sw.WriteLine(bValue.ToString());
-                sw.Close();
-                this._bIndexChanged=bValue;
-            }
-            catch (Exception ex)
-            {
-                //Do something with ex
-            }
-        }
-
-        /// <summary>
-        /// Returns the numeric index version (using Lucene objects) for the index located at LocalPath
-        /// </summary>
-        private long LocalIndexVersion
-        {
-            get {return IndexReader.GetCurrentVersion(this.LocalPath);}
-        }
-        /// <summary>
-        /// Returns the numeric index version (using Lucene objects) for the index located at CopyTargetPath
-        /// </summary>
-        private long TargetIndexVersion
-        {
-            get {return (IndexReader.IndexExists(this.CopyTargetPath) ? IndexReader.GetCurrentVersion(this.CopyTargetPath) : 0);}
-        }
-
-        /// <summary>
-        /// Deletes index files at the filesystem directoryPath location
-        /// </summary>
-        /// <param name="directoryPath">Filesystem path</param>
-        private void DeleteDirectoryFiles(string directoryPath)
-        {
-            try
-            {
-                if(!System.IO.Directory.Exists(directoryPath))
-                    return;
-                DirectoryInfo di = new DirectoryInfo(directoryPath);
-                FileInfo[] arFi = di.GetFiles();
-                foreach(FileInfo fi in arFi)
-                    fi.Delete();
-            }
-            catch(Exception e)
-            {
-                //Do something with e
-            }
-        }
-
-        /// <summary>
-        /// Copy all index files from the sourceDirPath to the destDirPath
-        /// </summary>
-        /// <param name="sourceDirPath">Filesystem path</param>
-        /// <param name="destDirPath">Filesystem path</param>
-        private void CopyDirectory(string sourceDirPath, string destDirPath)
-        {
-            string[] Files;
-
-            if(destDirPath[destDirPath.Length-1]!=Path.DirectorySeparatorChar) 
-                destDirPath+=Path.DirectorySeparatorChar;
-            if(!System.IO.Directory.Exists(destDirPath)) System.IO.Directory.CreateDirectory(destDirPath);
-            Files=System.IO.Directory.GetFileSystemEntries(sourceDirPath);
-            foreach(string Element in Files)
-            {
-                // Sub directories
-                if(System.IO.Directory.Exists(Element)) 
-                    CopyDirectory(Element,destDirPath+Path.GetFileName(Element));
-                    // Files in directory
-                else 
-                    File.Copy(Element,destDirPath+Path.GetFileName(Element),true);
-            }
-
-        }
-
-        /// <summary>
-        /// Copy only new and updated index files from the sourceDirPath to the destDirPath
-        /// </summary>
-        /// <param name="sourceDirPath">Filesystem path</param>
-        /// <param name="destDirPath">Filesystem path</param>
-        private void CopyDirectoryIncremental(string sourceDirPath, string destDirPath)
-        {
-            string[] Files;
-
-            if(destDirPath[destDirPath.Length-1]!=Path.DirectorySeparatorChar) 
-                destDirPath+=Path.DirectorySeparatorChar;
-            Files=System.IO.Directory.GetFileSystemEntries(sourceDirPath);
-            if(!System.IO.Directory.Exists(destDirPath))
-            {
-                System.IO.Directory.CreateDirectory(destDirPath);
-                foreach(string Element in Files)
-                {
-                    // Sub directories
-                    if(System.IO.Directory.Exists(Element)) 
-                        CopyDirectory(Element,destDirPath+Path.GetFileName(Element));
-                        // Files in directory
-                    else 
-                        File.Copy(Element,destDirPath+Path.GetFileName(Element),true);
-                }
-            }
-            else
-            {
-                foreach(string Element in Files)
-                {
-                    if(System.IO.Directory.Exists(Element))
-                    {
-                        CopyDirectoryIncremental(Element,destDirPath+Path.GetFileName(Element));
-                    }
-                    else
-                    {
-                        if (System.IO.File.Exists(destDirPath+Path.GetFileName(Element)))
-                            this.CopyFileIncremental(Element, destDirPath+Path.GetFileName(Element));
-                        else
-                            File.Copy(Element,destDirPath+Path.GetFileName(Element),true);
-                    }
-                }
-            }
-        }
-
-        /// <summary>
-        /// Evaluates the LastWriteTime and Length properties of two files to determine
-        /// if a file should be copied.
-        /// </summary>
-        /// <param name="filepath1">Filesystem path</param>
-        /// <param name="filepath2">Filesystem path</param>
-        private void CopyFileIncremental(string filepath1, string filepath2)
-        {
-            FileInfo fi1 = new FileInfo(filepath1);
-            FileInfo fi2 = new FileInfo(filepath2);
-            if ((fi1.LastWriteTime!=fi2.LastWriteTime)||(fi1.Length!=fi2.Length))
-                File.Copy(filepath1,filepath2,true);
-        }
-        #endregion
-
-        #region Static methods
-        /// <summary>
-        /// Returns an Analyzer for the given AnalyzerType
-        /// </summary>
-        /// <param name="oAnalyzerType">Enumeration value</param>
-        /// <returns>Analyzer</returns>
-        public static Analyzer GetAnalyzer(AnalyzerType oAnalyzerType)
-        {
-            Analyzer oAnalyzer = null;
-            switch (oAnalyzerType)
-            {
-                case AnalyzerType.SimpleAnalyzer:
-                    oAnalyzer = new SimpleAnalyzer();
-                    break;
-                case AnalyzerType.StopAnalyzer:
-                    oAnalyzer = new StopAnalyzer();
-                    break;
-                case AnalyzerType.WhitespaceAnalyzer:
-                    oAnalyzer = new WhitespaceAnalyzer();
-                    break;
-                default:
-                case AnalyzerType.StandardAnalyzer:
-                    oAnalyzer = new StandardAnalyzer();
-                    break;
-            }
-            return oAnalyzer;
-        }
-        #endregion
-
-    }
-}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/02362804/src/contrib/DistributedSearch/Distributed/Configuration/DistributedSearcher.cs
----------------------------------------------------------------------
diff --git a/src/contrib/DistributedSearch/Distributed/Configuration/DistributedSearcher.cs b/src/contrib/DistributedSearch/Distributed/Configuration/DistributedSearcher.cs
deleted file mode 100644
index 13f0d35..0000000
--- a/src/contrib/DistributedSearch/Distributed/Configuration/DistributedSearcher.cs
+++ /dev/null
@@ -1,126 +0,0 @@
-/*
- * 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 System;
-using System.Collections;
-using System.Configuration;
-using System.IO;
-using System.Xml;
-using Lucene.Net.Distributed;
-
-namespace Lucene.Net.Distributed.Configuration
-{
-    /// <summary>
-    /// Definition of a configurable set of search indexes made accessible by the 
-    /// LuceneServer windows service for a consuming application. These search indexes 
-    /// are defined in the configuration file of an application. The locations defined 
-    /// in a DistributedSearcher match the exposed object URIs as defined in the LuceneServer service.
-    /// 
-    /// An example configuration would look like the following:
-    /// <code>
-    ///     <DistributedSearchers>
-    ///         <DistributedSearcher id="1" SearchMethod="0" location="c:\localindexes\LocalIndex1" />
-    ///         <DistributedSearcher id="2" SearchMethod="1" location="tcp://192.168.1.100:1089/RemoteIndex1" />
-    ///         <DistributedSearcher id="3" SearchMethod="1" location="tcp://192.168.1.101:1089/RemoteIndex2" />
-    ///     </DistributedSearchers>
-    /// </code>
-    /// </summary>
-    public class DistributedSearcher
-    {
-        private int _id;
-        private SearchMethod _eSearchMethod;
-        private string _strLocation;
-
-        /// <summary>
-        /// Public constructor for DistributedSearcher. A DistributedSearcher is defined
-        /// in XML configuration and is loaded via a custom configuration handler.
-        /// </summary>
-        /// <param name="xSection">The Xml definition in the configuration file</param>
-        public DistributedSearcher(XmlNode xSection)
-        {
-            
-            XmlAttributeCollection attributeCollection = xSection.Attributes;
-            if (attributeCollection == null)
-                throw new ConfigurationErrorsException("xSection.Attributes invalid: " + Environment.NewLine + xSection.OuterXml);
-
-            try
-            {
-                this._id = Convert.ToInt32(attributeCollection["id"].Value);
-            }
-            catch (Exception e)
-            {
-                throw new ConfigurationErrorsException("DistributedSearcher.id invalid: " + Environment.NewLine + xSection.OuterXml + Environment.NewLine + e.Message);
-            }
-
-            try
-            {
-                this._eSearchMethod = (SearchMethod)Enum.Parse(typeof(SearchMethod), attributeCollection["SearchMethod"].Value);
-            }
-            catch (Exception)
-            {
-                throw new ConfigurationErrorsException("DistributedSearcher.SearchMethod invalid: " + Environment.NewLine + xSection.OuterXml);
-            }
-
-            try
-            {
-                this._strLocation = attributeCollection["Location"].Value;
-            }
-            catch (Exception)
-            {
-                throw new ConfigurationErrorsException("DistributedSearcher.Location invalid: " + Environment.NewLine + xSection.OuterXml);
-            }
-
-            if (this.SearchMethod == SearchMethod.Local)
-            {
-                //check for file-system existence
-                if (!Lucene.Net.Index.IndexReader.IndexExists(this.Location))
-                    throw new ConfigurationErrorsException("DistributedSearcher.Location not an index: " + Environment.NewLine + this.Location);
-            }
-            else if (this.SearchMethod == SearchMethod.Distributed)
-            {
-                //exec ping check if needed
-            }
-
-        }
-
-        /// <summary>
-        /// Unique Id value assigned to this DistributedSearcher. Not required for any processing,
-        /// simply for identification in reference.
-        /// </summary>
-        public int Id
-        {
-            get { return this._id; }
-        }
-
-        /// <summary>
-        /// Enumeration value specifying the locality of the index -- local or remote
-        /// </summary>
-        public SearchMethod SearchMethod
-        {
-            get {return this._eSearchMethod;}
-        }
-        /// <summary>
-        /// Reference path to the DistributedSearcher. If SearchMethod is Local, this is a local
-        /// file-system path, i.e. "c:\local\index". If SearchMethod is Distributed, this is the 
-        /// URI of the server-activated service type, i.e. "tcp://192.168.1.100:1089/RemoteIndex".
-        /// </summary>
-        public string Location
-        {
-            get {return this._strLocation;}
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/02362804/src/contrib/DistributedSearch/Distributed/Configuration/DistributedSearcherConfigurationHandler.cs
----------------------------------------------------------------------
diff --git a/src/contrib/DistributedSearch/Distributed/Configuration/DistributedSearcherConfigurationHandler.cs b/src/contrib/DistributedSearch/Distributed/Configuration/DistributedSearcherConfigurationHandler.cs
deleted file mode 100644
index 5816a8f..0000000
--- a/src/contrib/DistributedSearch/Distributed/Configuration/DistributedSearcherConfigurationHandler.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * 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 System;
-using System.Configuration;
-using System.Xml;
-
-namespace Lucene.Net.Distributed.Configuration
-{
-    /// <summary>
-    /// Implementation of custom configuration handler for the definition of search indexes
-    /// made accessible by the LuceneServer windows service. This configuration resides in
-    /// the configuration file of an application consuming the search indexes made accessible
-    /// by the LuceneServer windows service.
-    /// </summary>
-    public class DistributedSearcherConfigurationHandler : IConfigurationSectionHandler
-    {
-        /// <summary>
-        /// Empty public constructor for the configuration handler.
-        /// </summary>
-        public DistributedSearcherConfigurationHandler()
-        {
-        }
-
-        #region IConfigurationSectionHandler Members
-
-        /// <summary>
-        /// Required implementation of IConfigurationSectionHandler.
-        /// </summary>
-        /// <param name="parent">Required object for IConfigurationSectionHandler</param>
-        /// <param name="configContext">Configuration context object</param>
-        /// <param name="section">Xml configuration in the application configuration file</param>
-        /// <returns></returns>
-        public object Create(object parent, object configContext, XmlNode section)
-        {
-            DistributedSearchers wsConfig = new DistributedSearchers(section);
-            return wsConfig;
-        }
-
-        #endregion
-    }
-}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/02362804/src/contrib/DistributedSearch/Distributed/Configuration/DistributedSearchers.cs
----------------------------------------------------------------------
diff --git a/src/contrib/DistributedSearch/Distributed/Configuration/DistributedSearchers.cs b/src/contrib/DistributedSearch/Distributed/Configuration/DistributedSearchers.cs
deleted file mode 100644
index 28aa1f2..0000000
--- a/src/contrib/DistributedSearch/Distributed/Configuration/DistributedSearchers.cs
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * 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 System;
-using System.Configuration;
-using System.Xml;
-
-namespace Lucene.Net.Distributed.Configuration
-{
-    /// <summary>
-    /// Definition of a configurable set of search indexes made accessible by the 
-    /// LuceneServer windows service for a consuming application. These search indexes 
-    /// are defined in the configuration file of an application. The locations defined 
-    /// in a DistributedSearcher match the exposed object URIs as defined in the LuceneServer service.
-    /// 
-    /// An example configuration would look like the following:
-    /// <code>
-    ///     <DistributedSearchers>
-    ///         <DistributedSearcher wsid="1" SearchMethod="0" location="c:\localindexes\LocalIndex1" />
-    ///         <DistributedSearcher wsid="2" SearchMethod="1" location="tcp://192.168.1.100:1089/RemoteIndex1" />
-    ///         <DistributedSearcher wsid="3" SearchMethod="1" location="tcp://192.168.1.101:1089/RemoteIndex2" />
-    ///     </DistributedSearchers>
-    /// </code>
-    /// </summary>
-    public class DistributedSearchers
-    {
-        private DistributedSearcher[] _arDistributedSearcherArray;
-
-        /// <summary>
-        /// Accessor method for the configurable DistributedSearchers.
-        /// </summary>
-        public static DistributedSearchers GetConfig
-        {
-            get { return (DistributedSearchers)ConfigurationManager.GetSection("DistributedSearchers"); }
-        }
-
-        /// <summary>
-        /// Public constructor for DistributedSearchers. A DistributedSearcher is defined
-        /// in XML configuration and is loaded via a custom configuration handler.
-        /// </summary>
-        /// <param name="xSection">The Xml definition in the configuration file</param>
-        public DistributedSearchers(XmlNode xSection)
-        {
-            this._arDistributedSearcherArray = new DistributedSearcher[xSection.ChildNodes.Count];
-            int x=0;
-
-            foreach (XmlNode c in xSection.ChildNodes)
-            {
-                if (c.Name.ToLower()=="DistributedSearcher")
-                {
-                    DistributedSearcher ws = new DistributedSearcher(c);
-                    this._arDistributedSearcherArray[x] = ws;
-                    x++;
-                }
-            }
-        }
-
-        /// <summary>
-        /// Strongly-typed array of DistributedSearcher objects as defined in 
-        /// a configuration section.
-        /// </summary>
-        public DistributedSearcher[] DistributedSearcherArray
-        {
-            get {return this._arDistributedSearcherArray;}
-        }
-
-    }
-}


Mime
View raw message