lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [44/50] [abbrv] lucenenet git commit: Lucene.Net.Suggest refactor: Changed all public fields to auto-implemented properties
Date Tue, 31 Jan 2017 17:56:17 GMT
Lucene.Net.Suggest refactor: Changed all public fields to auto-implemented properties


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/1647a703
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/1647a703
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/1647a703

Branch: refs/heads/api-work
Commit: 1647a703befa7d6f89c9989b43c6c2da7b42fc00
Parents: ae51578
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Tue Jan 31 20:00:44 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Tue Jan 31 20:00:44 2017 +0700

----------------------------------------------------------------------
 .../Spell/DirectSpellChecker.cs                 |  52 ++--
 .../Analyzing/AnalyzingInfixSuggester.cs        |   2 +-
 .../Suggest/Analyzing/AnalyzingSuggester.cs     |  10 +-
 .../Suggest/Analyzing/BlendedInfixSuggester.cs  |  10 +-
 .../Suggest/Analyzing/FSTUtil.cs                |  30 +-
 .../Suggest/Analyzing/FreeTextSuggester.cs      |   6 +-
 .../Suggest/Fst/FSTCompletion.cs                |  16 +-
 .../Suggest/Fst/FSTCompletionLookup.cs          |   6 +-
 src/Lucene.Net.Suggest/Suggest/InputIterator.cs |   2 +-
 src/Lucene.Net.Suggest/Suggest/Lookup.cs        |  26 +-
 .../Analyzing/AnalyzingInfixSuggesterTest.cs    | 292 +++++++++----------
 .../Suggest/Analyzing/AnalyzingSuggesterTest.cs | 210 ++++++-------
 .../Analyzing/BlendedInfixSuggesterTest.cs      |   4 +-
 .../Suggest/Analyzing/FuzzySuggesterTest.cs     | 152 +++++-----
 .../Suggest/Analyzing/TestFreeTextSuggester.cs  |  16 +-
 .../Suggest/Fst/FSTCompletionTest.cs            |   8 +-
 .../Suggest/Fst/WFSTCompletionTest.cs           |  54 ++--
 .../Suggest/PersistenceTest.cs                  |   8 +-
 18 files changed, 452 insertions(+), 452 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1647a703/src/Lucene.Net.Suggest/Spell/DirectSpellChecker.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/Spell/DirectSpellChecker.cs b/src/Lucene.Net.Suggest/Spell/DirectSpellChecker.cs
index 5238d69..433a502 100644
--- a/src/Lucene.Net.Suggest/Spell/DirectSpellChecker.cs
+++ b/src/Lucene.Net.Suggest/Spell/DirectSpellChecker.cs
@@ -419,14 +419,14 @@ namespace Lucene.Net.Search.Spell
             foreach (ScoreTerm s in terms)
             {
                 SuggestWord suggestion = new SuggestWord();
-                if (s.termAsString == null)
+                if (s.TermAsString == null)
                 {
-                    UnicodeUtil.UTF8toUTF16(s.term, spare);
-                    s.termAsString = spare.ToString();
+                    UnicodeUtil.UTF8toUTF16(s.Term, spare);
+                    s.TermAsString = spare.ToString();
                 }
-                suggestion.String = s.termAsString;
-                suggestion.Score = s.score;
-                suggestion.Freq = s.docfreq;
+                suggestion.String = s.TermAsString;
+                suggestion.Score = s.Score;
+                suggestion.Freq = s.Docfreq;
                 suggestions[index--] = suggestion;
             }
 
@@ -475,7 +475,7 @@ namespace Lucene.Net.Search.Spell
             {
                 float boost = boostAtt.Boost;
                 // ignore uncompetitive hits
-                if (stQueue.Count >= numSug && boost <= stQueue.Peek().boost)
+                if (stQueue.Count >= numSug && boost <= stQueue.Peek().Boost)
                 {
                     continue;
                 }
@@ -516,15 +516,15 @@ namespace Lucene.Net.Search.Spell
                 }
 
                 // add new entry in PQ
-                st.term = BytesRef.DeepCopyOf(candidateTerm);
-                st.boost = boost;
-                st.docfreq = df;
-                st.termAsString = termAsString;
-                st.score = score;
+                st.Term = BytesRef.DeepCopyOf(candidateTerm);
+                st.Boost = boost;
+                st.Docfreq = df;
+                st.TermAsString = termAsString;
+                st.Score = score;
                 stQueue.Offer(st);
                 // possibly drop entries from queue
                 st = (stQueue.Count > numSug) ? stQueue.Poll() : new ScoreTerm();
-                maxBoostAtt.MaxNonCompetitiveBoost = (stQueue.Count >= numSug) ? stQueue.Peek().boost : float.NegativeInfinity;
+                maxBoostAtt.MaxNonCompetitiveBoost = (stQueue.Count >= numSug) ? stQueue.Peek().Boost : float.NegativeInfinity;
             }
 
             return stQueue;
@@ -539,27 +539,27 @@ namespace Lucene.Net.Search.Spell
             /// <summary>
             /// The actual spellcheck correction.
             /// </summary>
-            public BytesRef term;
+            public BytesRef Term { get; set; }
 
             /// <summary>
             /// The boost representing the similarity from the FuzzyTermsEnum (internal similarity score)
             /// </summary>
-            public float boost;
+            public float Boost { get; set; }
 
             /// <summary>
             /// The df of the spellcheck correction.
             /// </summary>
-            public int docfreq;
+            public int Docfreq { get; set; }
 
             /// <summary>
             /// The spellcheck correction represented as string, can be <code>null</code>.
             /// </summary>
-            public string termAsString;
+            public string TermAsString { get; set; }
 
             /// <summary>
             /// The similarity score.
             /// </summary>
-            public float score;
+            public float Score { get; set; }
 
             /// <summary>
             /// Constructor.
@@ -570,17 +570,17 @@ namespace Lucene.Net.Search.Spell
 
             public virtual int CompareTo(ScoreTerm other)
             {
-                if (term.BytesEquals(other.term))
+                if (Term.BytesEquals(other.Term))
                 {
                     return 0; // consistent with equals
                 }
-                if (this.boost == other.boost)
+                if (this.Boost == other.Boost)
                 {
-                    return other.term.CompareTo(this.term);
+                    return other.Term.CompareTo(this.Term);
                 }
                 else
                 {
-                    return this.boost.CompareTo(other.boost);
+                    return this.Boost.CompareTo(other.Boost);
                 }
             }
 
@@ -588,7 +588,7 @@ namespace Lucene.Net.Search.Spell
             {
                 const int prime = 31;
                 int result = 1;
-                result = prime * result + ((term == null) ? 0 : term.GetHashCode());
+                result = prime * result + ((Term == null) ? 0 : Term.GetHashCode());
                 return result;
             }
 
@@ -607,14 +607,14 @@ namespace Lucene.Net.Search.Spell
                     return false;
                 }
                 ScoreTerm other = (ScoreTerm)obj;
-                if (term == null)
+                if (Term == null)
                 {
-                    if (other.term != null)
+                    if (other.Term != null)
                     {
                         return false;
                     }
                 }
-                else if (!term.BytesEquals(other.term))
+                else if (!Term.BytesEquals(other.Term))
                 {
                     return false;
                 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1647a703/src/Lucene.Net.Suggest/Suggest/Analyzing/AnalyzingInfixSuggester.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/Suggest/Analyzing/AnalyzingInfixSuggester.cs b/src/Lucene.Net.Suggest/Suggest/Analyzing/AnalyzingInfixSuggester.cs
index 2899aeb..3ba1cb0 100644
--- a/src/Lucene.Net.Suggest/Suggest/Analyzing/AnalyzingInfixSuggester.cs
+++ b/src/Lucene.Net.Suggest/Suggest/Analyzing/AnalyzingInfixSuggester.cs
@@ -625,7 +625,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
         /// <summary>
         /// Override this method to customize the Object
         /// representing a single highlighted suggestions; the
-        /// result is set on each <see cref="Lookup.LookupResult.highlightKey"/>
+        /// result is set on each <see cref="Lookup.LookupResult.HighlightKey"/>
         /// member. 
         /// </summary>
         protected internal virtual object Highlight(string text, IEnumerable<string> matchedTokens, string prefixToken)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1647a703/src/Lucene.Net.Suggest/Suggest/Analyzing/AnalyzingSuggester.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/Suggest/Analyzing/AnalyzingSuggester.cs b/src/Lucene.Net.Suggest/Suggest/Analyzing/AnalyzingSuggester.cs
index 7b03a26..dd163ac 100644
--- a/src/Lucene.Net.Suggest/Suggest/Analyzing/AnalyzingSuggester.cs
+++ b/src/Lucene.Net.Suggest/Suggest/Analyzing/AnalyzingSuggester.cs
@@ -768,7 +768,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
                     int count = 0;
                     foreach (FSTUtil.Path<PairOutputs<long?, BytesRef>.Pair> path in prefixPaths)
                     {
-                        if (fst.FindTargetArc(END_BYTE, path.fstNode, scratchArc, bytesReader) != null)
+                        if (fst.FindTargetArc(END_BYTE, path.FstNode, scratchArc, bytesReader) != null)
                         {
                             // This node has END_BYTE arc leaving, meaning it's an
                             // "exact" match:
@@ -789,12 +789,12 @@ namespace Lucene.Net.Search.Suggest.Analyzing
                     // ...:
                     foreach (var path in prefixPaths)
                     {
-                        if (fst.FindTargetArc(END_BYTE, path.fstNode, scratchArc, bytesReader) != null)
+                        if (fst.FindTargetArc(END_BYTE, path.FstNode, scratchArc, bytesReader) != null)
                         {
                             // This node has END_BYTE arc leaving, meaning it's an
                             // "exact" match:
-                            searcher_Renamed.AddStartPaths(scratchArc, fst.Outputs.Add(path.output, scratchArc.Output), false,
-                                path.input);
+                            searcher_Renamed.AddStartPaths(scratchArc, fst.Outputs.Add(path.Output, scratchArc.Output), false,
+                                path.Input);
                         }
                     }
 
@@ -838,7 +838,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
 
                 foreach (FSTUtil.Path<PairOutputs<long?, BytesRef>.Pair> path in prefixPaths)
                 {
-                    searcher.AddStartPaths(path.fstNode, path.output, true, path.input);
+                    searcher.AddStartPaths(path.FstNode, path.Output, true, path.Input);
                 }
 
                 var completions = searcher.Search();

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1647a703/src/Lucene.Net.Suggest/Suggest/Analyzing/BlendedInfixSuggester.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/Suggest/Analyzing/BlendedInfixSuggester.cs b/src/Lucene.Net.Suggest/Suggest/Analyzing/BlendedInfixSuggester.cs
index 61608a1..0618748 100644
--- a/src/Lucene.Net.Suggest/Suggest/Analyzing/BlendedInfixSuggester.cs
+++ b/src/Lucene.Net.Suggest/Suggest/Analyzing/BlendedInfixSuggester.cs
@@ -218,11 +218,11 @@ namespace Lucene.Net.Search.Suggest.Analyzing
 
             if (results.Count >= num)
             {
-                if (results.Min.value < result.value)
+                if (results.Min.Value < result.Value)
                 {
                     lock (syncLock)
                     {
-                        if (results.Min.value < result.value)
+                        if (results.Min.Value < result.Value)
                         {
                             // Code similar to the java TreeMap class
                             var entry = results.FirstOrDefault();
@@ -318,17 +318,17 @@ namespace Lucene.Net.Search.Suggest.Analyzing
             public virtual int Compare(Lookup.LookupResult o1, Lookup.LookupResult o2)
             {
                 // order on weight
-                if (o1.value > o2.value)
+                if (o1.Value > o2.Value)
                 {
                     return 1;
                 }
-                else if (o1.value < o2.value)
+                else if (o1.Value < o2.Value)
                 {
                     return -1;
                 }
 
                 // otherwise on alphabetic order
-                return CHARSEQUENCE_COMPARER.Compare(o1.key, o2.key);
+                return CHARSEQUENCE_COMPARER.Compare(o1.Key, o2.Key);
             }
         }
     }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1647a703/src/Lucene.Net.Suggest/Suggest/Analyzing/FSTUtil.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/Suggest/Analyzing/FSTUtil.cs b/src/Lucene.Net.Suggest/Suggest/Analyzing/FSTUtil.cs
index ca4fe37..da8ce9d 100644
--- a/src/Lucene.Net.Suggest/Suggest/Analyzing/FSTUtil.cs
+++ b/src/Lucene.Net.Suggest/Suggest/Analyzing/FSTUtil.cs
@@ -42,28 +42,28 @@ namespace Lucene.Net.Search.Suggest.Analyzing
         {
             /// <summary>
             /// Node in the automaton where path ends: </summary>
-            public readonly State state;
+            public State State { get; private set; }
 
             /// <summary>
             /// Node in the <see cref="FST"/> where path ends: </summary>
-            public readonly FST.Arc<T> fstNode;
+            public FST.Arc<T> FstNode { get; private set; }
 
             /// <summary>
             /// Output of the path so far: </summary>
-            internal T output;
+            internal T Output { get; set; }
 
             /// <summary>
             /// Input of the path so far: </summary>
-            public readonly IntsRef input;
+            public IntsRef Input { get; private set; }
 
             /// <summary>
             /// Sole constructor. </summary>
             public Path(State state, FST.Arc<T> fstNode, T output, IntsRef input)
             {
-                this.state = state;
-                this.fstNode = fstNode;
-                this.output = output;
-                this.input = input;
+                this.State = state;
+                this.FstNode = fstNode;
+                this.Output = output;
+                this.Input = input;
             }
         }
 
@@ -85,7 +85,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
             {
                 Path<T> path = queue.ElementAt(queue.Count - 1);
                 queue.Remove(path);
-                if (path.state.Accept)
+                if (path.State.Accept)
                 {
                     endNodes.Add(path);
                     // we can stop here if we accept this path,
@@ -93,14 +93,14 @@ namespace Lucene.Net.Search.Suggest.Analyzing
                     continue;
                 }
 
-                IntsRef currentInput = path.input;
-                foreach (Transition t in path.state.GetTransitions())
+                IntsRef currentInput = path.Input;
+                foreach (Transition t in path.State.GetTransitions())
                 {
                     int min = t.Min;
                     int max = t.Max;
                     if (min == max)
                     {
-                        FST.Arc<T> nextArc = fst.FindTargetArc(t.Min, path.fstNode, scratchArc, fstReader);
+                        FST.Arc<T> nextArc = fst.FindTargetArc(t.Min, path.FstNode, scratchArc, fstReader);
                         if (nextArc != null)
                         {
                             IntsRef newInput = new IntsRef(currentInput.Length + 1);
@@ -108,7 +108,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
                             newInput.Ints[currentInput.Length] = t.Min;
                             newInput.Length = currentInput.Length + 1;
                             queue.Add(new Path<T>(t.Dest, new FST.Arc<T>()
-                              .CopyFrom(nextArc), fst.Outputs.Add(path.output, nextArc.Output), newInput));
+                              .CopyFrom(nextArc), fst.Outputs.Add(path.Output, nextArc.Output), newInput));
                         }
                     }
                     else
@@ -121,7 +121,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
                         // (this one) to another (the completion search
                         // done in AnalyzingSuggester).
 
-                        FST.Arc<T> nextArc = Lucene.Net.Util.Fst.Util.ReadCeilArc(min, fst, path.fstNode, scratchArc, fstReader);
+                        FST.Arc<T> nextArc = Lucene.Net.Util.Fst.Util.ReadCeilArc(min, fst, path.FstNode, scratchArc, fstReader);
                         while (nextArc != null && nextArc.Label <= max)
                         {
                             Debug.Assert(nextArc.Label <= max);
@@ -131,7 +131,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
                             newInput.Ints[currentInput.Length] = nextArc.Label;
                             newInput.Length = currentInput.Length + 1;
                             queue.Add(new Path<T>(t.Dest, new FST.Arc<T>()
-                              .CopyFrom(nextArc), fst.Outputs.Add(path.output, nextArc.Output), newInput));
+                              .CopyFrom(nextArc), fst.Outputs.Add(path.Output, nextArc.Output), newInput));
                             int label = nextArc.Label; // used in assert
                             nextArc = nextArc.IsLast ? null : fst.ReadNextRealArc(nextArc, fstReader);
                             Debug.Assert(nextArc == null || label < nextArc.Label, "last: " + label + " next: " + (nextArc == null ? "" : nextArc.Label.ToString()));

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1647a703/src/Lucene.Net.Suggest/Suggest/Analyzing/FreeTextSuggester.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/Suggest/Analyzing/FreeTextSuggester.cs b/src/Lucene.Net.Suggest/Suggest/Analyzing/FreeTextSuggester.cs
index e1e0da9..18242df 100644
--- a/src/Lucene.Net.Suggest/Suggest/Analyzing/FreeTextSuggester.cs
+++ b/src/Lucene.Net.Suggest/Suggest/Analyzing/FreeTextSuggester.cs
@@ -853,18 +853,18 @@ namespace Lucene.Net.Search.Suggest.Analyzing
 
             public int Compare(LookupResult a, LookupResult b)
             {
-                if (a.value > b.value)
+                if (a.Value > b.Value)
                 {
                     return -1;
                 }
-                else if (a.value < b.value)
+                else if (a.Value < b.Value)
                 {
                     return 1;
                 }
                 else
                 {
                     // Tie break by UTF16 sort order:
-                    return a.key.CompareToOrdinal(b.key);
+                    return a.Key.CompareToOrdinal(b.Key);
                 }
             }
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1647a703/src/Lucene.Net.Suggest/Suggest/Fst/FSTCompletion.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/Suggest/Fst/FSTCompletion.cs b/src/Lucene.Net.Suggest/Suggest/Fst/FSTCompletion.cs
index 5d2bd73..792b682 100644
--- a/src/Lucene.Net.Suggest/Suggest/Fst/FSTCompletion.cs
+++ b/src/Lucene.Net.Suggest/Suggest/Fst/FSTCompletion.cs
@@ -48,26 +48,26 @@ namespace Lucene.Net.Search.Suggest.Fst
         {
             /// <summary>
             /// UTF-8 bytes of the suggestion </summary>
-            public readonly BytesRef utf8;
+            public BytesRef Utf8 { get; private set; }
             /// <summary>
             /// source bucket (weight) of the suggestion </summary>
-            public readonly int bucket;
+            public int Bucket { get; private set; }
 
             internal Completion(BytesRef key, int bucket)
             {
-                this.utf8 = BytesRef.DeepCopyOf(key);
-                this.bucket = bucket;
+                this.Utf8 = BytesRef.DeepCopyOf(key);
+                this.Bucket = bucket;
             }
 
             public override string ToString()
             {
-                return utf8.Utf8ToString() + "/" + bucket.ToString("0.0", CultureInfo.InvariantCulture);
+                return Utf8.Utf8ToString() + "/" + Bucket.ToString("0.0", CultureInfo.InvariantCulture);
             }
 
             /// <seealso cref="BytesRef.CompareTo(BytesRef)"></seealso>
             public int CompareTo(Completion o)
             {
-                return this.utf8.CompareTo(o.utf8);
+                return this.Utf8.CompareTo(o.Utf8);
             }
         }
 
@@ -347,14 +347,14 @@ namespace Lucene.Net.Search.Suggest.Fst
             // We assume list does not have duplicates (because of how the FST is created).
             for (int i = list.Count; --i >= 0; )
             {
-                if (key.Equals(list[i].utf8))
+                if (key.Equals(list[i].Utf8))
                 {
                     // Key found. Unless already at i==0, remove it and push up front so
                     // that the ordering
                     // remains identical with the exception of the exact match.
                     lock (syncLock)
                     {
-                        if (key.Equals(list[i].utf8))
+                        if (key.Equals(list[i].Utf8))
                         {
                             var element = list.ElementAt(i);
                             list.Remove(element);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1647a703/src/Lucene.Net.Suggest/Suggest/Fst/FSTCompletionLookup.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/Suggest/Fst/FSTCompletionLookup.cs b/src/Lucene.Net.Suggest/Suggest/Fst/FSTCompletionLookup.cs
index 6cbb8ae..bc0da9d 100644
--- a/src/Lucene.Net.Suggest/Suggest/Fst/FSTCompletionLookup.cs
+++ b/src/Lucene.Net.Suggest/Suggest/Fst/FSTCompletionLookup.cs
@@ -269,9 +269,9 @@ namespace Lucene.Net.Search.Suggest.Fst
             CharsRef spare = new CharsRef();
             foreach (FSTCompletion.Completion c in completions)
             {
-                spare.Grow(c.utf8.Length);
-                UnicodeUtil.UTF8toUTF16(c.utf8, spare);
-                results.Add(new LookupResult(spare.ToString(), c.bucket));
+                spare.Grow(c.Utf8.Length);
+                UnicodeUtil.UTF8toUTF16(c.Utf8, spare);
+                results.Add(new LookupResult(spare.ToString(), c.Bucket));
             }
             return results;
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1647a703/src/Lucene.Net.Suggest/Suggest/InputIterator.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/Suggest/InputIterator.cs b/src/Lucene.Net.Suggest/Suggest/InputIterator.cs
index 0b561ef..eb14eb4 100644
--- a/src/Lucene.Net.Suggest/Suggest/InputIterator.cs
+++ b/src/Lucene.Net.Suggest/Suggest/InputIterator.cs
@@ -34,7 +34,7 @@ namespace Lucene.Net.Search.Suggest
 
         /// <summary>
         /// An arbitrary byte[] to record per suggestion.  See
-        /// <see cref="Lookup.LookupResult.payload"/> to retrieve the payload
+        /// <see cref="Lookup.LookupResult.Payload"/> to retrieve the payload
         /// for each suggestion. 
         /// </summary>
         BytesRef Payload { get; }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1647a703/src/Lucene.Net.Suggest/Suggest/Lookup.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/Suggest/Lookup.cs b/src/Lucene.Net.Suggest/Suggest/Lookup.cs
index bca5275..daadcc3 100644
--- a/src/Lucene.Net.Suggest/Suggest/Lookup.cs
+++ b/src/Lucene.Net.Suggest/Suggest/Lookup.cs
@@ -39,25 +39,25 @@ namespace Lucene.Net.Search.Suggest
         {
             /// <summary>
             /// the key's text </summary>
-            public readonly string key;
+            public string Key { get; private set; }
 
             /// <summary>
             /// Expert: custom Object to hold the result of a
             /// highlighted suggestion. 
             /// </summary>
-            public readonly object highlightKey;
+            public object HighlightKey { get; private set; }
 
             /// <summary>
             /// the key's weight </summary>
-            public readonly long value;
+            public long Value { get; private set; }
 
             /// <summary>
             /// the key's payload (null if not present) </summary>
-            public readonly BytesRef payload;
+            public BytesRef Payload { get; private set; }
 
             /// <summary>
             /// the key's contexts (null if not present) </summary>
-            public readonly IEnumerable<BytesRef> contexts;
+            public IEnumerable<BytesRef> Contexts { get; private set; }
 
             /// <summary>
             /// Create a new result from a key+weight pair.
@@ -104,23 +104,23 @@ namespace Lucene.Net.Search.Suggest
             /// </summary>
             public LookupResult(string key, object highlightKey, long value, BytesRef payload, IEnumerable<BytesRef> contexts)
             {
-                this.key = key;
-                this.highlightKey = highlightKey;
-                this.value = value;
-                this.payload = payload;
-                this.contexts = contexts;
+                this.Key = key;
+                this.HighlightKey = highlightKey;
+                this.Value = value;
+                this.Payload = payload;
+                this.Contexts = contexts;
             }
 
             public override string ToString()
             {
-                return key + "/" + value;
+                return Key + "/" + Value;
             }
 
             /// <summary>
             /// Compare alphabetically. </summary>
             public int CompareTo(LookupResult o)
             {
-                return CHARSEQUENCE_COMPARER.Compare(key, o.key);
+                return CHARSEQUENCE_COMPARER.Compare(Key, o.Key);
             }
         }
 
@@ -168,7 +168,7 @@ namespace Lucene.Net.Search.Suggest
 
             protected internal override bool LessThan(LookupResult a, LookupResult b)
             {
-                return a.value < b.value;
+                return a.Value < b.Value;
             }
 
             /// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1647a703/src/Lucene.Net.Tests.Suggest/Suggest/Analyzing/AnalyzingInfixSuggesterTest.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Suggest/Suggest/Analyzing/AnalyzingInfixSuggesterTest.cs b/src/Lucene.Net.Tests.Suggest/Suggest/Analyzing/AnalyzingInfixSuggesterTest.cs
index a68373d..0143911 100644
--- a/src/Lucene.Net.Tests.Suggest/Suggest/Analyzing/AnalyzingInfixSuggesterTest.cs
+++ b/src/Lucene.Net.Tests.Suggest/Suggest/Analyzing/AnalyzingInfixSuggesterTest.cs
@@ -52,31 +52,31 @@ namespace Lucene.Net.Search.Suggest.Analyzing
 
             IList<Lookup.LookupResult> results = suggester.DoLookup(TestUtil.StringToCharSequence("ear", Random()).ToString(), 10, true, true);
             assertEquals(2, results.size());
-            assertEquals("a penny saved is a penny <b>ear</b>ned", results[0].key);
-            assertEquals(10, results[0].value);
-            assertEquals(new BytesRef("foobaz"), results[0].payload);
+            assertEquals("a penny saved is a penny <b>ear</b>ned", results[0].Key);
+            assertEquals(10, results[0].Value);
+            assertEquals(new BytesRef("foobaz"), results[0].Payload);
 
-            assertEquals("lend me your <b>ear</b>", results[1].key);
-            assertEquals(8, results[1].value);
-            assertEquals(new BytesRef("foobar"), results[1].payload);
+            assertEquals("lend me your <b>ear</b>", results[1].Key);
+            assertEquals(8, results[1].Value);
+            assertEquals(new BytesRef("foobar"), results[1].Payload);
 
             results = suggester.DoLookup(TestUtil.StringToCharSequence("ear ", Random()).ToString(), 10, true, true);
             assertEquals(1, results.size());
-            assertEquals("lend me your <b>ear</b>", results[0].key);
-            assertEquals(8, results[0].value);
-            assertEquals(new BytesRef("foobar"), results[0].payload);
+            assertEquals("lend me your <b>ear</b>", results[0].Key);
+            assertEquals(8, results[0].Value);
+            assertEquals(new BytesRef("foobar"), results[0].Payload);
 
             results = suggester.DoLookup(TestUtil.StringToCharSequence("pen", Random()).ToString(), 10, true, true);
             assertEquals(1, results.size());
-            assertEquals("a <b>pen</b>ny saved is a <b>pen</b>ny earned", results[0].key);
-            assertEquals(10, results[0].value);
-            assertEquals(new BytesRef("foobaz"), results[0].payload);
+            assertEquals("a <b>pen</b>ny saved is a <b>pen</b>ny earned", results[0].Key);
+            assertEquals(10, results[0].Value);
+            assertEquals(new BytesRef("foobaz"), results[0].Payload);
 
             results = suggester.DoLookup(TestUtil.StringToCharSequence("p", Random()).ToString(), 10, true, true);
             assertEquals(1, results.size());
-            assertEquals("a <b>p</b>enny saved is a <b>p</b>enny earned", results[0].key);
-            assertEquals(10, results[0].value);
-            assertEquals(new BytesRef("foobaz"), results[0].payload);
+            assertEquals("a <b>p</b>enny saved is a <b>p</b>enny earned", results[0].Key);
+            assertEquals(10, results[0].Value);
+            assertEquals(new BytesRef("foobaz"), results[0].Payload);
 
             suggester.Dispose();
         }
@@ -100,9 +100,9 @@ namespace Lucene.Net.Search.Suggest.Analyzing
             suggester = new AnalyzingInfixSuggester(TEST_VERSION_CURRENT, NewFSDirectory(tempDir), a, a, 3);
             IList<Lookup.LookupResult> results = suggester.DoLookup(TestUtil.StringToCharSequence("ear", Random()).ToString(), 10, true, true);
             assertEquals(2, results.size());
-            assertEquals("a penny saved is a penny <b>ear</b>ned", results[0].key);
-            assertEquals(10, results[0].value);
-            assertEquals(new BytesRef("foobaz"), results[0].payload);
+            assertEquals("a penny saved is a penny <b>ear</b>ned", results[0].Key);
+            assertEquals(10, results[0].Value);
+            assertEquals(new BytesRef("foobaz"), results[0].Payload);
             assertEquals(2, suggester.Count);
             suggester.Dispose();
         }
@@ -209,9 +209,9 @@ namespace Lucene.Net.Search.Suggest.Analyzing
 
             IList<Lookup.LookupResult> results = suggester.DoLookup(TestUtil.StringToCharSequence("ear", Random()).ToString(), 10, true, true);
             assertEquals(1, results.size());
-            assertEquals("a penny saved is a penny <b>ear</b>ned", ToString((List<LookupHighlightFragment>)results[0].highlightKey));
-            assertEquals(10, results[0].value);
-            assertEquals(new BytesRef("foobaz"), results[0].payload);
+            assertEquals("a penny saved is a penny <b>ear</b>ned", ToString((List<LookupHighlightFragment>)results[0].HighlightKey));
+            assertEquals(10, results[0].Value);
+            assertEquals(new BytesRef("foobaz"), results[0].Payload);
             suggester.Dispose();
         }
 
@@ -258,63 +258,63 @@ namespace Lucene.Net.Search.Suggest.Analyzing
                     assertEquals(2, results.size());
                     if (doHighlight)
                     {
-                        assertEquals("a penny saved is a penny <b>ear</b>ned", results[0].key);
+                        assertEquals("a penny saved is a penny <b>ear</b>ned", results[0].Key);
                     }
                     else
                     {
-                        assertEquals("a penny saved is a penny earned", results[0].key);
+                        assertEquals("a penny saved is a penny earned", results[0].Key);
                     }
-                    assertEquals(10, results[0].value);
+                    assertEquals(10, results[0].Value);
                     if (doHighlight)
                     {
-                        assertEquals("lend me your <b>ear</b>", results[1].key);
+                        assertEquals("lend me your <b>ear</b>", results[1].Key);
                     }
                     else
                     {
-                        assertEquals("lend me your ear", results[1].key);
+                        assertEquals("lend me your ear", results[1].Key);
                     }
-                    assertEquals(new BytesRef("foobaz"), results[0].payload);
-                    assertEquals(8, results[1].value);
-                    assertEquals(new BytesRef("foobar"), results[1].payload);
+                    assertEquals(new BytesRef("foobaz"), results[0].Payload);
+                    assertEquals(8, results[1].Value);
+                    assertEquals(new BytesRef("foobar"), results[1].Payload);
 
                     results = suggester.DoLookup(TestUtil.StringToCharSequence("ear ", Random()).ToString(), 10, true, doHighlight);
                     assertEquals(1, results.size());
                     if (doHighlight)
                     {
-                        assertEquals("lend me your <b>ear</b>", results[0].key);
+                        assertEquals("lend me your <b>ear</b>", results[0].Key);
                     }
                     else
                     {
-                        assertEquals("lend me your ear", results[0].key);
+                        assertEquals("lend me your ear", results[0].Key);
                     }
-                    assertEquals(8, results[0].value);
-                    assertEquals(new BytesRef("foobar"), results[0].payload);
+                    assertEquals(8, results[0].Value);
+                    assertEquals(new BytesRef("foobar"), results[0].Payload);
 
                     results = suggester.DoLookup(TestUtil.StringToCharSequence("pen", Random()).ToString(), 10, true, doHighlight);
                     assertEquals(1, results.size());
                     if (doHighlight)
                     {
-                        assertEquals("a <b>pen</b>ny saved is a <b>pen</b>ny earned", results[0].key);
+                        assertEquals("a <b>pen</b>ny saved is a <b>pen</b>ny earned", results[0].Key);
                     }
                     else
                     {
-                        assertEquals("a penny saved is a penny earned", results[0].key);
+                        assertEquals("a penny saved is a penny earned", results[0].Key);
                     }
-                    assertEquals(10, results[0].value);
-                    assertEquals(new BytesRef("foobaz"), results[0].payload);
+                    assertEquals(10, results[0].Value);
+                    assertEquals(new BytesRef("foobaz"), results[0].Payload);
 
                     results = suggester.DoLookup(TestUtil.StringToCharSequence("p", Random()).ToString(), 10, true, doHighlight);
                     assertEquals(1, results.size());
                     if (doHighlight)
                     {
-                        assertEquals("a <b>p</b>enny saved is a <b>p</b>enny earned", results[0].key);
+                        assertEquals("a <b>p</b>enny saved is a <b>p</b>enny earned", results[0].Key);
                     }
                     else
                     {
-                        assertEquals("a penny saved is a penny earned", results[0].key);
+                        assertEquals("a penny saved is a penny earned", results[0].Key);
                     }
-                    assertEquals(10, results[0].value);
-                    assertEquals(new BytesRef("foobaz"), results[0].payload);
+                    assertEquals(10, results[0].Value);
+                    assertEquals(new BytesRef("foobaz"), results[0].Payload);
                 }
 
                 // Make sure things still work after close and reopen:
@@ -336,7 +336,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
             suggester.Build(new InputArrayIterator(keys));
             IList<Lookup.LookupResult> results = suggester.DoLookup(TestUtil.StringToCharSequence("penn", Random()).ToString(), 10, true, true);
             assertEquals(1, results.size());
-            assertEquals("a <b>penn</b>y saved is a <b>penn</b>y earned", results[0].key);
+            assertEquals("a <b>penn</b>y saved is a <b>penn</b>y earned", results[0].Key);
             suggester.Dispose();
         }
 
@@ -369,7 +369,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
             suggester.Build(new InputArrayIterator(keys));
             IList<Lookup.LookupResult> results = suggester.DoLookup(TestUtil.StringToCharSequence("penn", Random()).ToString(), 10, true, true);
             assertEquals(1, results.size());
-            assertEquals("a <b>Penn</b>y saved is a <b>penn</b>y earned", results[0].key);
+            assertEquals("a <b>Penn</b>y saved is a <b>penn</b>y earned", results[0].Key);
             suggester.Dispose();
 
             // Try again, but overriding addPrefixMatch to highlight
@@ -379,7 +379,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
             suggester.Build(new InputArrayIterator(keys));
             results = suggester.DoLookup(TestUtil.StringToCharSequence("penn", Random()).ToString(), 10, true, true);
             assertEquals(1, results.size());
-            assertEquals("a <b>Penny</b> saved is a <b>penny</b> earned", results[0].key);
+            assertEquals("a <b>Penny</b> saved is a <b>penny</b> earned", results[0].Key);
             suggester.Dispose();
         }
 
@@ -449,7 +449,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
             suggester.Build(new InputArrayIterator(keys));
             IList<Lookup.LookupResult> results = suggester.DoLookup(TestUtil.StringToCharSequence("a", Random()).ToString(), 10, true, true);
             assertEquals(1, results.size());
-            assertEquals("a bob for <b>a</b>pples", results[0].key);
+            assertEquals("a bob for <b>a</b>pples", results[0].Key);
             suggester.Dispose();
         }
 
@@ -464,31 +464,31 @@ namespace Lucene.Net.Search.Suggest.Analyzing
             suggester.Refresh();
             IList<Lookup.LookupResult> results = suggester.DoLookup(TestUtil.StringToCharSequence("ear", Random()).ToString(), 10, true, true);
             assertEquals(2, results.size());
-            assertEquals("a penny saved is a penny <b>ear</b>ned", results[0].key);
-            assertEquals(10, results[0].value);
-            assertEquals(new BytesRef("foobaz"), results[0].payload);
+            assertEquals("a penny saved is a penny <b>ear</b>ned", results[0].Key);
+            assertEquals(10, results[0].Value);
+            assertEquals(new BytesRef("foobaz"), results[0].Payload);
 
-            assertEquals("lend me your <b>ear</b>", results[1].key);
-            assertEquals(8, results[1].value);
-            assertEquals(new BytesRef("foobar"), results[1].payload);
+            assertEquals("lend me your <b>ear</b>", results[1].Key);
+            assertEquals(8, results[1].Value);
+            assertEquals(new BytesRef("foobar"), results[1].Payload);
 
             results = suggester.DoLookup(TestUtil.StringToCharSequence("ear ", Random()).ToString(), 10, true, true);
             assertEquals(1, results.size());
-            assertEquals("lend me your <b>ear</b>", results[0].key);
-            assertEquals(8, results[0].value);
-            assertEquals(new BytesRef("foobar"), results[0].payload);
+            assertEquals("lend me your <b>ear</b>", results[0].Key);
+            assertEquals(8, results[0].Value);
+            assertEquals(new BytesRef("foobar"), results[0].Payload);
 
             results = suggester.DoLookup(TestUtil.StringToCharSequence("pen", Random()).ToString(), 10, true, true);
             assertEquals(1, results.size());
-            assertEquals("a <b>pen</b>ny saved is a <b>pen</b>ny earned", results[0].key);
-            assertEquals(10, results[0].value);
-            assertEquals(new BytesRef("foobaz"), results[0].payload);
+            assertEquals("a <b>pen</b>ny saved is a <b>pen</b>ny earned", results[0].Key);
+            assertEquals(10, results[0].Value);
+            assertEquals(new BytesRef("foobaz"), results[0].Payload);
 
             results = suggester.DoLookup(TestUtil.StringToCharSequence("p", Random()).ToString(), 10, true, true);
             assertEquals(1, results.size());
-            assertEquals("a <b>p</b>enny saved is a <b>p</b>enny earned", results[0].key);
-            assertEquals(10, results[0].value);
-            assertEquals(new BytesRef("foobaz"), results[0].payload);
+            assertEquals("a <b>p</b>enny saved is a <b>p</b>enny earned", results[0].Key);
+            assertEquals(10, results[0].Value);
+            assertEquals(new BytesRef("foobaz"), results[0].Payload);
 
             suggester.Dispose();
         }
@@ -504,9 +504,9 @@ namespace Lucene.Net.Search.Suggest.Analyzing
 
             IList<Lookup.LookupResult> results = suggester.DoLookup(TestUtil.StringToCharSequence("pen p", Random()).ToString(), 10, true, true);
             assertEquals(1, results.size());
-            assertEquals("the <b>pen</b> is <b>p</b>retty", results[0].key);
-            assertEquals(10, results[0].value);
-            assertEquals(new BytesRef("foobaz"), results[0].payload);
+            assertEquals("the <b>pen</b> is <b>p</b>retty", results[0].Key);
+            assertEquals(10, results[0].Value);
+            assertEquals(new BytesRef("foobaz"), results[0].Payload);
             suggester.Dispose();
         }
 
@@ -847,9 +847,9 @@ namespace Lucene.Net.Search.Suggest.Analyzing
                         assertEquals(expectedCount, actual.size());
                         for (int i = 0; i < expectedCount; i++)
                         {
-                            assertEquals(expected.ElementAt(i).term.Utf8ToString(), actual.ElementAt(i).key.toString());
-                            assertEquals(expected.ElementAt(i).v, actual.ElementAt(i).value);
-                            assertEquals(expected.ElementAt(i).payload, actual.ElementAt(i).payload);
+                            assertEquals(expected.ElementAt(i).term.Utf8ToString(), actual.ElementAt(i).Key.toString());
+                            assertEquals(expected.ElementAt(i).v, actual.ElementAt(i).Value);
+                            assertEquals(expected.ElementAt(i).payload, actual.ElementAt(i).Payload);
                         }
                     }
                     else
@@ -932,9 +932,9 @@ namespace Lucene.Net.Search.Suggest.Analyzing
 
             IList<Lookup.LookupResult> results = suggester.DoLookup(TestUtil.StringToCharSequence("ear", Random()).ToString(), 10, true, true);
             assertEquals(1, results.size());
-            assertEquals("lend me your <b>ear</b>", results.ElementAt(0).key);
-            assertEquals(8, results.ElementAt(0).value);
-            assertEquals(new BytesRef("foobar"), results.ElementAt(0).payload);
+            assertEquals("lend me your <b>ear</b>", results.ElementAt(0).Key);
+            assertEquals(8, results.ElementAt(0).Value);
+            assertEquals(new BytesRef("foobar"), results.ElementAt(0).Payload);
 
             // Add a new suggestion:
             suggester.Add(new BytesRef("a penny saved is a penny earned"), null, 10, new BytesRef("foobaz"));
@@ -944,31 +944,31 @@ namespace Lucene.Net.Search.Suggest.Analyzing
 
             results = suggester.DoLookup(TestUtil.StringToCharSequence("ear", Random()).ToString(), 10, true, true);
             assertEquals(2, results.size());
-            assertEquals("a penny saved is a penny <b>ear</b>ned", results.ElementAt(0).key);
-            assertEquals(10, results.ElementAt(0).value);
-            assertEquals(new BytesRef("foobaz"), results.ElementAt(0).payload);
+            assertEquals("a penny saved is a penny <b>ear</b>ned", results.ElementAt(0).Key);
+            assertEquals(10, results.ElementAt(0).Value);
+            assertEquals(new BytesRef("foobaz"), results.ElementAt(0).Payload);
 
-            assertEquals("lend me your <b>ear</b>", results.ElementAt(1).key);
-            assertEquals(8, results.ElementAt(1).value);
-            assertEquals(new BytesRef("foobar"), results.ElementAt(1).payload);
+            assertEquals("lend me your <b>ear</b>", results.ElementAt(1).Key);
+            assertEquals(8, results.ElementAt(1).Value);
+            assertEquals(new BytesRef("foobar"), results.ElementAt(1).Payload);
 
             results = suggester.DoLookup(TestUtil.StringToCharSequence("ear ", Random()).ToString(), 10, true, true);
             assertEquals(1, results.size());
-            assertEquals("lend me your <b>ear</b>", results.ElementAt(0).key);
-            assertEquals(8, results.ElementAt(0).value);
-            assertEquals(new BytesRef("foobar"), results.ElementAt(0).payload);
+            assertEquals("lend me your <b>ear</b>", results.ElementAt(0).Key);
+            assertEquals(8, results.ElementAt(0).Value);
+            assertEquals(new BytesRef("foobar"), results.ElementAt(0).Payload);
 
             results = suggester.DoLookup(TestUtil.StringToCharSequence("pen", Random()).ToString(), 10, true, true);
             assertEquals(1, results.size());
-            assertEquals("a <b>pen</b>ny saved is a <b>pen</b>ny earned", results.ElementAt(0).key);
-            assertEquals(10, results.ElementAt(0).value);
-            assertEquals(new BytesRef("foobaz"), results.ElementAt(0).payload);
+            assertEquals("a <b>pen</b>ny saved is a <b>pen</b>ny earned", results.ElementAt(0).Key);
+            assertEquals(10, results.ElementAt(0).Value);
+            assertEquals(new BytesRef("foobaz"), results.ElementAt(0).Payload);
 
             results = suggester.DoLookup(TestUtil.StringToCharSequence("p", Random()).ToString(), 10, true, true);
             assertEquals(1, results.size());
-            assertEquals("a <b>p</b>enny saved is a <b>p</b>enny earned", results.ElementAt(0).key);
-            assertEquals(10, results.ElementAt(0).value);
-            assertEquals(new BytesRef("foobaz"), results.ElementAt(0).payload);
+            assertEquals("a <b>p</b>enny saved is a <b>p</b>enny earned", results.ElementAt(0).Key);
+            assertEquals(10, results.ElementAt(0).Value);
+            assertEquals(new BytesRef("foobaz"), results.ElementAt(0).Payload);
 
             // Change the weight:
             suggester.Update(new BytesRef("lend me your ear"), null, 12, new BytesRef("foobox"));
@@ -978,12 +978,12 @@ namespace Lucene.Net.Search.Suggest.Analyzing
 
             results = suggester.DoLookup(TestUtil.StringToCharSequence("ear", Random()).ToString(), 10, true, true);
             assertEquals(2, results.size());
-            assertEquals("lend me your <b>ear</b>", results.ElementAt(0).key);
-            assertEquals(12, results.ElementAt(0).value);
-            assertEquals(new BytesRef("foobox"), results.ElementAt(0).payload);
-            assertEquals("a penny saved is a penny <b>ear</b>ned", results.ElementAt(1).key);
-            assertEquals(10, results.ElementAt(1).value);
-            assertEquals(new BytesRef("foobaz"), results.ElementAt(1).payload);
+            assertEquals("lend me your <b>ear</b>", results.ElementAt(0).Key);
+            assertEquals(12, results.ElementAt(0).Value);
+            assertEquals(new BytesRef("foobox"), results.ElementAt(0).Payload);
+            assertEquals("a penny saved is a penny <b>ear</b>ned", results.ElementAt(1).Key);
+            assertEquals(10, results.ElementAt(1).Value);
+            assertEquals(new BytesRef("foobaz"), results.ElementAt(1).Payload);
             suggester.Dispose();
         }
 
@@ -1028,92 +1028,92 @@ namespace Lucene.Net.Search.Suggest.Analyzing
                 IList<Lookup.LookupResult> results = suggester.DoLookup(TestUtil.StringToCharSequence("ear", Random()).ToString(), 10, true, true);
                 assertEquals(2, results.size());
                 Lookup.LookupResult result = results.ElementAt(0);
-                assertEquals("a penny saved is a penny <b>ear</b>ned", result.key);
-                assertEquals(10, result.value);
-                assertEquals(new BytesRef("foobaz"), result.payload);
-                assertNotNull(result.contexts);
-                assertEquals(2, result.contexts.Count());
-                assertTrue(result.contexts.Contains(new BytesRef("foo")));
-                assertTrue(result.contexts.Contains(new BytesRef("baz")));
+                assertEquals("a penny saved is a penny <b>ear</b>ned", result.Key);
+                assertEquals(10, result.Value);
+                assertEquals(new BytesRef("foobaz"), result.Payload);
+                assertNotNull(result.Contexts);
+                assertEquals(2, result.Contexts.Count());
+                assertTrue(result.Contexts.Contains(new BytesRef("foo")));
+                assertTrue(result.Contexts.Contains(new BytesRef("baz")));
 
                 result = results.ElementAt(1);
-                assertEquals("lend me your <b>ear</b>", result.key);
-                assertEquals(8, result.value);
-                assertEquals(new BytesRef("foobar"), result.payload);
-                assertNotNull(result.contexts);
-                assertEquals(2, result.contexts.Count());
-                assertTrue(result.contexts.Contains(new BytesRef("foo")));
-                assertTrue(result.contexts.Contains(new BytesRef("bar")));
+                assertEquals("lend me your <b>ear</b>", result.Key);
+                assertEquals(8, result.Value);
+                assertEquals(new BytesRef("foobar"), result.Payload);
+                assertNotNull(result.Contexts);
+                assertEquals(2, result.Contexts.Count());
+                assertTrue(result.Contexts.Contains(new BytesRef("foo")));
+                assertTrue(result.Contexts.Contains(new BytesRef("bar")));
 
                 // Both suggestions have "foo" context:
                 results = suggester.DoLookup(TestUtil.StringToCharSequence("ear", Random()).ToString(), AsSet("foo"), 10, true, true);
                 assertEquals(2, results.size());
 
                 result = results.ElementAt(0);
-                assertEquals("a penny saved is a penny <b>ear</b>ned", result.key);
-                assertEquals(10, result.value);
-                assertEquals(new BytesRef("foobaz"), result.payload);
-                assertNotNull(result.contexts);
-                assertEquals(2, result.contexts.Count());
-                assertTrue(result.contexts.Contains(new BytesRef("foo")));
-                assertTrue(result.contexts.Contains(new BytesRef("baz")));
+                assertEquals("a penny saved is a penny <b>ear</b>ned", result.Key);
+                assertEquals(10, result.Value);
+                assertEquals(new BytesRef("foobaz"), result.Payload);
+                assertNotNull(result.Contexts);
+                assertEquals(2, result.Contexts.Count());
+                assertTrue(result.Contexts.Contains(new BytesRef("foo")));
+                assertTrue(result.Contexts.Contains(new BytesRef("baz")));
 
                 result = results.ElementAt(1);
-                assertEquals("lend me your <b>ear</b>", result.key);
-                assertEquals(8, result.value);
-                assertEquals(new BytesRef("foobar"), result.payload);
-                assertNotNull(result.contexts);
-                assertEquals(2, result.contexts.Count());
-                assertTrue(result.contexts.Contains(new BytesRef("foo")));
-                assertTrue(result.contexts.Contains(new BytesRef("bar")));
+                assertEquals("lend me your <b>ear</b>", result.Key);
+                assertEquals(8, result.Value);
+                assertEquals(new BytesRef("foobar"), result.Payload);
+                assertNotNull(result.Contexts);
+                assertEquals(2, result.Contexts.Count());
+                assertTrue(result.Contexts.Contains(new BytesRef("foo")));
+                assertTrue(result.Contexts.Contains(new BytesRef("bar")));
 
                 // Only one has "bar" context:
                 results = suggester.DoLookup(TestUtil.StringToCharSequence("ear", Random()).ToString(), AsSet("bar"), 10, true, true);
                 assertEquals(1, results.size());
 
                 result = results.ElementAt(0);
-                assertEquals("lend me your <b>ear</b>", result.key);
-                assertEquals(8, result.value);
-                assertEquals(new BytesRef("foobar"), result.payload);
-                assertNotNull(result.contexts);
-                assertEquals(2, result.contexts.Count());
-                assertTrue(result.contexts.Contains(new BytesRef("foo")));
-                assertTrue(result.contexts.Contains(new BytesRef("bar")));
+                assertEquals("lend me your <b>ear</b>", result.Key);
+                assertEquals(8, result.Value);
+                assertEquals(new BytesRef("foobar"), result.Payload);
+                assertNotNull(result.Contexts);
+                assertEquals(2, result.Contexts.Count());
+                assertTrue(result.Contexts.Contains(new BytesRef("foo")));
+                assertTrue(result.Contexts.Contains(new BytesRef("bar")));
 
                 // Only one has "baz" context:
                 results = suggester.DoLookup(TestUtil.StringToCharSequence("ear", Random()).ToString(), AsSet("baz"), 10, true, true);
                 assertEquals(1, results.size());
 
                 result = results.ElementAt(0);
-                assertEquals("a penny saved is a penny <b>ear</b>ned", result.key);
-                assertEquals(10, result.value);
-                assertEquals(new BytesRef("foobaz"), result.payload);
-                assertNotNull(result.contexts);
-                assertEquals(2, result.contexts.Count());
-                assertTrue(result.contexts.Contains(new BytesRef("foo")));
-                assertTrue(result.contexts.Contains(new BytesRef("baz")));
+                assertEquals("a penny saved is a penny <b>ear</b>ned", result.Key);
+                assertEquals(10, result.Value);
+                assertEquals(new BytesRef("foobaz"), result.Payload);
+                assertNotNull(result.Contexts);
+                assertEquals(2, result.Contexts.Count());
+                assertTrue(result.Contexts.Contains(new BytesRef("foo")));
+                assertTrue(result.Contexts.Contains(new BytesRef("baz")));
 
                 // Both have foo or bar:
                 results = suggester.DoLookup(TestUtil.StringToCharSequence("ear", Random()).ToString(), AsSet("foo", "bar"), 10, true, true);
                 assertEquals(2, results.size());
 
                 result = results.ElementAt(0);
-                assertEquals("a penny saved is a penny <b>ear</b>ned", result.key);
-                assertEquals(10, result.value);
-                assertEquals(new BytesRef("foobaz"), result.payload);
-                assertNotNull(result.contexts);
-                assertEquals(2, result.contexts.Count());
-                assertTrue(result.contexts.Contains(new BytesRef("foo")));
-                assertTrue(result.contexts.Contains(new BytesRef("baz")));
+                assertEquals("a penny saved is a penny <b>ear</b>ned", result.Key);
+                assertEquals(10, result.Value);
+                assertEquals(new BytesRef("foobaz"), result.Payload);
+                assertNotNull(result.Contexts);
+                assertEquals(2, result.Contexts.Count());
+                assertTrue(result.Contexts.Contains(new BytesRef("foo")));
+                assertTrue(result.Contexts.Contains(new BytesRef("baz")));
 
                 result = results.ElementAt(1);
-                assertEquals("lend me your <b>ear</b>", result.key);
-                assertEquals(8, result.value);
-                assertEquals(new BytesRef("foobar"), result.payload);
-                assertNotNull(result.contexts);
-                assertEquals(2, result.contexts.Count());
-                assertTrue(result.contexts.Contains(new BytesRef("foo")));
-                assertTrue(result.contexts.Contains(new BytesRef("bar")));
+                assertEquals("lend me your <b>ear</b>", result.Key);
+                assertEquals(8, result.Value);
+                assertEquals(new BytesRef("foobar"), result.Payload);
+                assertNotNull(result.Contexts);
+                assertEquals(2, result.Contexts.Count());
+                assertTrue(result.Contexts.Contains(new BytesRef("foo")));
+                assertTrue(result.Contexts.Contains(new BytesRef("bar")));
 
                 suggester.Dispose();
             }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1647a703/src/Lucene.Net.Tests.Suggest/Suggest/Analyzing/AnalyzingSuggesterTest.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Suggest/Suggest/Analyzing/AnalyzingSuggesterTest.cs b/src/Lucene.Net.Tests.Suggest/Suggest/Analyzing/AnalyzingSuggesterTest.cs
index d678264..1b53a0e 100644
--- a/src/Lucene.Net.Tests.Suggest/Suggest/Analyzing/AnalyzingSuggesterTest.cs
+++ b/src/Lucene.Net.Tests.Suggest/Suggest/Analyzing/AnalyzingSuggesterTest.cs
@@ -53,33 +53,33 @@ namespace Lucene.Net.Search.Suggest.Analyzing
             // top N of 2, but only foo is available
             IList<Lookup.LookupResult> results = suggester.DoLookup(TestUtil.StringToCharSequence("f", Random()).ToString(), false, 2);
             assertEquals(1, results.size());
-            assertEquals("foo", results.ElementAt(0).key.toString());
-            assertEquals(50, results.ElementAt(0).value, 0.01F);
+            assertEquals("foo", results.ElementAt(0).Key.toString());
+            assertEquals(50, results.ElementAt(0).Value, 0.01F);
 
             // top N of 1 for 'bar': we return this even though
             // barbar is higher because exactFirst is enabled:
             results = suggester.DoLookup(TestUtil.StringToCharSequence("bar", Random()).ToString(), false, 1);
             assertEquals(1, results.size());
-            assertEquals("bar", results.ElementAt(0).key.toString());
-            assertEquals(10, results.ElementAt(0).value, 0.01F);
+            assertEquals("bar", results.ElementAt(0).Key.toString());
+            assertEquals(10, results.ElementAt(0).Value, 0.01F);
 
             // top N Of 2 for 'b'
             results = suggester.DoLookup(TestUtil.StringToCharSequence("b", Random()).ToString(), false, 2);
             assertEquals(2, results.size());
-            assertEquals("barbar", results.ElementAt(0).key.toString());
-            assertEquals(12, results.ElementAt(0).value, 0.01F);
-            assertEquals("bar", results.ElementAt(1).key.toString());
-            assertEquals(10, results.ElementAt(1).value, 0.01F);
+            assertEquals("barbar", results.ElementAt(0).Key.toString());
+            assertEquals(12, results.ElementAt(0).Value, 0.01F);
+            assertEquals("bar", results.ElementAt(1).Key.toString());
+            assertEquals(10, results.ElementAt(1).Value, 0.01F);
 
             // top N of 3 for 'ba'
             results = suggester.DoLookup(TestUtil.StringToCharSequence("ba", Random()).ToString(), false, 3);
             assertEquals(3, results.size());
-            assertEquals("barbar", results.ElementAt(0).key.toString());
-            assertEquals(12, results.ElementAt(0).value, 0.01F);
-            assertEquals("bar", results.ElementAt(1).key.toString());
-            assertEquals(10, results.ElementAt(1).value, 0.01F);
-            assertEquals("barbara", results.ElementAt(2).key.toString());
-            assertEquals(6, results.ElementAt(2).value, 0.01F);
+            assertEquals("barbar", results.ElementAt(0).Key.toString());
+            assertEquals(12, results.ElementAt(0).Value, 0.01F);
+            assertEquals("bar", results.ElementAt(1).Key.toString());
+            assertEquals(10, results.ElementAt(1).Value, 0.01F);
+            assertEquals("barbara", results.ElementAt(2).Key.toString());
+            assertEquals(6, results.ElementAt(2).Value, 0.01F);
         }
 
         [Test]
@@ -100,40 +100,40 @@ namespace Lucene.Net.Search.Suggest.Analyzing
                 // top N of 2, but only foo is available
                 IList<Lookup.LookupResult> results = suggester.DoLookup(TestUtil.StringToCharSequence("f", Random()).ToString(), false, 2);
                 assertEquals(1, results.size());
-                assertEquals("foo", results.ElementAt(0).key.toString());
-                assertEquals(50, results.ElementAt(0).value, 0.01F);
-                assertEquals(new BytesRef("hello"), results.ElementAt(0).payload);
+                assertEquals("foo", results.ElementAt(0).Key.toString());
+                assertEquals(50, results.ElementAt(0).Value, 0.01F);
+                assertEquals(new BytesRef("hello"), results.ElementAt(0).Payload);
 
                 // top N of 1 for 'bar': we return this even though
                 // barbar is higher because exactFirst is enabled:
                 results = suggester.DoLookup(TestUtil.StringToCharSequence("bar", Random()).ToString(), false, 1);
                 assertEquals(1, results.size());
-                assertEquals("bar", results.ElementAt(0).key.toString());
-                assertEquals(10, results.ElementAt(0).value, 0.01F);
-                assertEquals(new BytesRef("goodbye"), results.ElementAt(0).payload);
+                assertEquals("bar", results.ElementAt(0).Key.toString());
+                assertEquals(10, results.ElementAt(0).Value, 0.01F);
+                assertEquals(new BytesRef("goodbye"), results.ElementAt(0).Payload);
 
                 // top N Of 2 for 'b'
                 results = suggester.DoLookup(TestUtil.StringToCharSequence("b", Random()).ToString(), false, 2);
                 assertEquals(2, results.size());
-                assertEquals("barbar", results.ElementAt(0).key.toString());
-                assertEquals(12, results.ElementAt(0).value, 0.01F);
-                assertEquals(new BytesRef("thank you"), results.ElementAt(0).payload);
-                assertEquals("bar", results.ElementAt(1).key.toString());
-                assertEquals(10, results.ElementAt(1).value, 0.01F);
-                assertEquals(new BytesRef("goodbye"), results.ElementAt(1).payload);
+                assertEquals("barbar", results.ElementAt(0).Key.toString());
+                assertEquals(12, results.ElementAt(0).Value, 0.01F);
+                assertEquals(new BytesRef("thank you"), results.ElementAt(0).Payload);
+                assertEquals("bar", results.ElementAt(1).Key.toString());
+                assertEquals(10, results.ElementAt(1).Value, 0.01F);
+                assertEquals(new BytesRef("goodbye"), results.ElementAt(1).Payload);
 
                 // top N of 3 for 'ba'
                 results = suggester.DoLookup(TestUtil.StringToCharSequence("ba", Random()).ToString(), false, 3);
                 assertEquals(3, results.size());
-                assertEquals("barbar", results.ElementAt(0).key.toString());
-                assertEquals(12, results.ElementAt(0).value, 0.01F);
-                assertEquals(new BytesRef("thank you"), results.ElementAt(0).payload);
-                assertEquals("bar", results.ElementAt(1).key.toString());
-                assertEquals(10, results.ElementAt(1).value, 0.01F);
-                assertEquals(new BytesRef("goodbye"), results.ElementAt(1).payload);
-                assertEquals("barbara", results.ElementAt(2).key.toString());
-                assertEquals(6, results.ElementAt(2).value, 0.01F);
-                assertEquals(new BytesRef("for all the fish"), results.ElementAt(2).payload);
+                assertEquals("barbar", results.ElementAt(0).Key.toString());
+                assertEquals(12, results.ElementAt(0).Value, 0.01F);
+                assertEquals(new BytesRef("thank you"), results.ElementAt(0).Payload);
+                assertEquals("bar", results.ElementAt(1).Key.toString());
+                assertEquals(10, results.ElementAt(1).Value, 0.01F);
+                assertEquals(new BytesRef("goodbye"), results.ElementAt(1).Payload);
+                assertEquals("barbara", results.ElementAt(2).Key.toString());
+                assertEquals(6, results.ElementAt(2).Value, 0.01F);
+                assertEquals(new BytesRef("for all the fish"), results.ElementAt(2).Payload);
             }
         }
 
@@ -178,14 +178,14 @@ namespace Lucene.Net.Search.Suggest.Analyzing
                 IList<Lookup.LookupResult> lookup = analyzingSuggester.DoLookup(termFreq.term.Utf8ToString(), false, keys.size());
                 foreach (Lookup.LookupResult lookupResult in lookup)
                 {
-                    assertEquals(mapping[lookupResult.key], lookupResult.value);
+                    assertEquals(mapping[lookupResult.Key], lookupResult.Value);
                     if (doPayloads)
                     {
-                        assertEquals(lookupResult.payload.Utf8ToString(), lookupResult.value.ToString());
+                        assertEquals(lookupResult.Payload.Utf8ToString(), lookupResult.Value.ToString());
                     }
                     else
                     {
-                        assertNull(lookupResult.payload);
+                        assertNull(lookupResult.Payload);
                     }
                 }
             }
@@ -212,20 +212,20 @@ namespace Lucene.Net.Search.Suggest.Analyzing
 
             IList<Lookup.LookupResult> results = suggester.DoLookup(TestUtil.StringToCharSequence("the ghost of chris", Random()).ToString(), false, 1);
             assertEquals(1, results.size());
-            assertEquals("the ghost of christmas past", results.ElementAt(0).key.toString());
-            assertEquals(50, results.ElementAt(0).value, 0.01F);
+            assertEquals("the ghost of christmas past", results.ElementAt(0).Key.toString());
+            assertEquals(50, results.ElementAt(0).Value, 0.01F);
 
             // omit the 'the' since its a stopword, its suggested anyway
             results = suggester.DoLookup(TestUtil.StringToCharSequence("ghost of chris", Random()).ToString(), false, 1);
             assertEquals(1, results.size());
-            assertEquals("the ghost of christmas past", results.ElementAt(0).key.toString());
-            assertEquals(50, results.ElementAt(0).value, 0.01F);
+            assertEquals("the ghost of christmas past", results.ElementAt(0).Key.toString());
+            assertEquals(50, results.ElementAt(0).Value, 0.01F);
 
             // omit the 'the' and 'of' since they are stopwords, its suggested anyway
             results = suggester.DoLookup(TestUtil.StringToCharSequence("ghost chris", Random()).ToString(), false, 1);
             assertEquals(1, results.size());
-            assertEquals("the ghost of christmas past", results.ElementAt(0).key.toString());
-            assertEquals(50, results.ElementAt(0).value, 0.01F);
+            assertEquals("the ghost of christmas past", results.ElementAt(0).Key.toString());
+            assertEquals(50, results.ElementAt(0).Value, 0.01F);
         }
 
         [Test]
@@ -263,7 +263,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
             // With no PRESERVE_SEPS specified, "ab c" should also
             // complete to "abcd", which has higher weight so should
             // appear first:
-            assertEquals("abcd", r.ElementAt(0).key.toString());
+            assertEquals("abcd", r.ElementAt(0).Key.toString());
         }
 
         internal class TestGraphDupsTokenStreamComponents : Analyzer.TokenStreamComponents
@@ -350,10 +350,10 @@ namespace Lucene.Net.Search.Suggest.Analyzing
                 Console.WriteLine("Results: " + results);
             }
             assertEquals(2, results.size());
-            assertEquals("wifi network is slow", results.ElementAt(0).key);
-            assertEquals(50, results.ElementAt(0).value);
-            assertEquals("wi fi network is fast", results.ElementAt(1).key);
-            assertEquals(10, results.ElementAt(1).value);
+            assertEquals("wifi network is slow", results.ElementAt(0).Key);
+            assertEquals(50, results.ElementAt(0).Value);
+            assertEquals("wi fi network is fast", results.ElementAt(1).Key);
+            assertEquals(10, results.ElementAt(1).Value);
         }
 
         internal class TestInputPathRequiredTokenStreamComponents : Analyzer.TokenStreamComponents
@@ -550,23 +550,23 @@ namespace Lucene.Net.Search.Suggest.Analyzing
 
                 assertEquals(Math.Min(topN, 4), results.size());
 
-                assertEquals("x y", results.ElementAt(0).key);
-                assertEquals(1, results.ElementAt(0).value);
+                assertEquals("x y", results.ElementAt(0).Key);
+                assertEquals(1, results.ElementAt(0).Value);
 
                 if (topN > 1)
                 {
-                    assertEquals("z z z", results.ElementAt(1).key);
-                    assertEquals(20, results.ElementAt(1).value);
+                    assertEquals("z z z", results.ElementAt(1).Key);
+                    assertEquals(20, results.ElementAt(1).Value);
 
                     if (topN > 2)
                     {
-                        assertEquals("x y z", results.ElementAt(2).key);
-                        assertEquals(3, results.ElementAt(2).value);
+                        assertEquals("x y z", results.ElementAt(2).Key);
+                        assertEquals(3, results.ElementAt(2).Value);
 
                         if (topN > 3)
                         {
-                            assertEquals("x", results.ElementAt(3).key);
-                            assertEquals(2, results.ElementAt(3).value);
+                            assertEquals("x", results.ElementAt(3).Key);
+                            assertEquals(2, results.ElementAt(3).Value);
                         }
                     }
                 }
@@ -593,23 +593,23 @@ namespace Lucene.Net.Search.Suggest.Analyzing
 
                 assertEquals(Math.Min(topN, 4), results.size());
 
-                assertEquals("z z z", results.ElementAt(0).key);
-                assertEquals(20, results.ElementAt(0).value);
+                assertEquals("z z z", results.ElementAt(0).Key);
+                assertEquals(20, results.ElementAt(0).Value);
 
                 if (topN > 1)
                 {
-                    assertEquals("x y z", results.ElementAt(1).key);
-                    assertEquals(3, results.ElementAt(1).value);
+                    assertEquals("x y z", results.ElementAt(1).Key);
+                    assertEquals(3, results.ElementAt(1).Value);
 
                     if (topN > 2)
                     {
-                        assertEquals("x", results.ElementAt(2).key);
-                        assertEquals(2, results.ElementAt(2).value);
+                        assertEquals("x", results.ElementAt(2).Key);
+                        assertEquals(2, results.ElementAt(2).Value);
 
                         if (topN > 3)
                         {
-                            assertEquals("x y", results.ElementAt(3).key);
-                            assertEquals(1, results.ElementAt(3).value);
+                            assertEquals("x y", results.ElementAt(3).Key);
+                            assertEquals(1, results.ElementAt(3).Value);
                         }
                     }
                 }
@@ -1018,7 +1018,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
                     Console.WriteLine("  actual:");
                     foreach (Lookup.LookupResult lr in r)
                     {
-                        Console.WriteLine("    key=" + lr.key + " weight=" + lr.value);
+                        Console.WriteLine("    key=" + lr.Key + " weight=" + lr.Value);
                     }
                 }
 
@@ -1027,11 +1027,11 @@ namespace Lucene.Net.Search.Suggest.Analyzing
                 for (int hit = 0; hit < r.size(); hit++)
                 {
                     //System.out.println("  check hit " + hit);
-                    assertEquals(matches.ElementAt(hit).surfaceForm, r.ElementAt(hit).key);
-                    assertEquals(matches.ElementAt(hit).weight, r.ElementAt(hit).value, 0f);
+                    assertEquals(matches.ElementAt(hit).surfaceForm, r.ElementAt(hit).Key);
+                    assertEquals(matches.ElementAt(hit).weight, r.ElementAt(hit).Value, 0f);
                     if (doPayloads)
                     {
-                        assertEquals(matches.ElementAt(hit).payload, r.ElementAt(hit).payload);
+                        assertEquals(matches.ElementAt(hit).payload, r.ElementAt(hit).Payload);
                     }
                 }
             }
@@ -1070,8 +1070,8 @@ namespace Lucene.Net.Search.Suggest.Analyzing
 
             assertEquals(1, r1.size());
 
-            assertEquals("bar foo orange cat", r1.ElementAt(0).key);
-            assertEquals(654321, r1.ElementAt(0).value, 0f);
+            assertEquals("bar foo orange cat", r1.ElementAt(0).Key);
+            assertEquals(654321, r1.ElementAt(0).Value, 0f);
 
             // Query 2
             Analyzer a2 = new MockTokenEatingAnalyzer(numStopChars, preserveHoles);
@@ -1085,8 +1085,8 @@ namespace Lucene.Net.Search.Suggest.Analyzing
 
             assertEquals(1, r2.size());
 
-            assertEquals("peter piper picked a pack of pickled peppers", r2.ElementAt(0).key);
-            assertEquals(7654321, r2.ElementAt(0).value, 0f);
+            assertEquals("peter piper picked a pack of pickled peppers", r2.ElementAt(0).Key);
+            assertEquals(7654321, r2.ElementAt(0).Value, 0f);
         }
 
 
@@ -1100,10 +1100,10 @@ namespace Lucene.Net.Search.Suggest.Analyzing
 
             IList<Lookup.LookupResult> results = suggester.DoLookup("a", false, 5);
             assertEquals(2, results.size());
-            assertEquals(" a", results.ElementAt(0).key);
-            assertEquals(60, results.ElementAt(0).value);
-            assertEquals("a ", results.ElementAt(1).key);
-            assertEquals(50, results.ElementAt(1).value);
+            assertEquals(" a", results.ElementAt(0).Key);
+            assertEquals(60, results.ElementAt(0).Value);
+            assertEquals("a ", results.ElementAt(1).Key);
+            assertEquals(50, results.ElementAt(1).Value);
         }
 
         [Test]
@@ -1139,12 +1139,12 @@ namespace Lucene.Net.Search.Suggest.Analyzing
             assertEquals(3, suggester.Count);
             IList<Lookup.LookupResult> results = suggester.DoLookup("a", false, 3);
             assertEquals(3, results.size());
-            assertEquals("a", results.ElementAt(0).key);
-            assertEquals(5, results.ElementAt(0).value);
-            assertEquals("a c", results.ElementAt(1).key);
-            assertEquals(4, results.ElementAt(1).value);
-            assertEquals("a b", results.ElementAt(2).key);
-            assertEquals(3, results.ElementAt(2).value);
+            assertEquals("a", results.ElementAt(0).Key);
+            assertEquals(5, results.ElementAt(0).Value);
+            assertEquals("a c", results.ElementAt(1).Key);
+            assertEquals(4, results.ElementAt(1).Value);
+            assertEquals("a b", results.ElementAt(2).Key);
+            assertEquals(3, results.ElementAt(2).Value);
 
             // Try again after save/load:
             DirectoryInfo tmpDir = CreateTempDir("AnalyzingSuggesterTest");
@@ -1163,12 +1163,12 @@ namespace Lucene.Net.Search.Suggest.Analyzing
             assertEquals(3, suggester.Count);
             results = suggester.DoLookup("a", false, 3);
             assertEquals(3, results.size());
-            assertEquals("a", results.ElementAt(0).key);
-            assertEquals(5, results.ElementAt(0).value);
-            assertEquals("a c", results.ElementAt(1).key);
-            assertEquals(4, results.ElementAt(1).value);
-            assertEquals("a b", results.ElementAt(2).key);
-            assertEquals(3, results.ElementAt(2).value);
+            assertEquals("a", results.ElementAt(0).Key);
+            assertEquals(5, results.ElementAt(0).Value);
+            assertEquals("a c", results.ElementAt(1).Key);
+            assertEquals(4, results.ElementAt(1).Value);
+            assertEquals("a b", results.ElementAt(2).Key);
+            assertEquals(3, results.ElementAt(2).Value);
         }
 
         internal class TestDupSurfaceFormsMissingResultsTokenStreamComponents : Analyzer.TokenStreamComponents
@@ -1224,10 +1224,10 @@ namespace Lucene.Net.Search.Suggest.Analyzing
 
             IList<Lookup.LookupResult> results = suggester.DoLookup("nellie", false, 2);
             assertEquals(2, results.size());
-            assertEquals("hambone", results.ElementAt(0).key);
-            assertEquals(6, results.ElementAt(0).value);
-            assertEquals("nellie", results.ElementAt(1).key);
-            assertEquals(5, results.ElementAt(1).value);
+            assertEquals("hambone", results.ElementAt(0).Key);
+            assertEquals(6, results.ElementAt(0).Value);
+            assertEquals("nellie", results.ElementAt(1).Key);
+            assertEquals(5, results.ElementAt(1).Value);
 
             // Try again after save/load:
             DirectoryInfo tmpDir = CreateTempDir("AnalyzingSuggesterTest");
@@ -1245,10 +1245,10 @@ namespace Lucene.Net.Search.Suggest.Analyzing
 
             results = suggester.DoLookup("nellie", false, 2);
             assertEquals(2, results.size());
-            assertEquals("hambone", results.ElementAt(0).key);
-            assertEquals(6, results.ElementAt(0).value);
-            assertEquals("nellie", results.ElementAt(1).key);
-            assertEquals(5, results.ElementAt(1).value);
+            assertEquals("hambone", results.ElementAt(0).Key);
+            assertEquals(6, results.ElementAt(0).Value);
+            assertEquals("nellie", results.ElementAt(1).Key);
+            assertEquals(5, results.ElementAt(1).Value);
         }
         internal class TestDupSurfaceFormsMissingResults2TokenStreamComponents : Analyzer.TokenStreamComponents
         {
@@ -1308,10 +1308,10 @@ namespace Lucene.Net.Search.Suggest.Analyzing
 
             IList<Lookup.LookupResult> results = suggester.DoLookup("a", false, 2);
             assertEquals(2, results.size());
-            assertEquals("a", results.ElementAt(0).key);
-            assertEquals(6, results.ElementAt(0).value);
-            assertEquals("b", results.ElementAt(1).key);
-            assertEquals(5, results.ElementAt(1).value);
+            assertEquals("a", results.ElementAt(0).Key);
+            assertEquals(6, results.ElementAt(0).Value);
+            assertEquals("b", results.ElementAt(1).Key);
+            assertEquals(5, results.ElementAt(1).Value);
 
             // Try again after save/load:
             DirectoryInfo tmpDir = CreateTempDir("AnalyzingSuggesterTest");
@@ -1329,10 +1329,10 @@ namespace Lucene.Net.Search.Suggest.Analyzing
 
             results = suggester.DoLookup("a", false, 2);
             assertEquals(2, results.size());
-            assertEquals("a", results.ElementAt(0).key);
-            assertEquals(6, results.ElementAt(0).value);
-            assertEquals("b", results.ElementAt(1).key);
-            assertEquals(5, results.ElementAt(1).value);
+            assertEquals("a", results.ElementAt(0).Key);
+            assertEquals(6, results.ElementAt(0).Value);
+            assertEquals("b", results.ElementAt(1).Key);
+            assertEquals(5, results.ElementAt(1).Value);
         }
 
         internal class Test0ByteKeysTokenStreamComponents : Analyzer.TokenStreamComponents

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1647a703/src/Lucene.Net.Tests.Suggest/Suggest/Analyzing/BlendedInfixSuggesterTest.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Suggest/Suggest/Analyzing/BlendedInfixSuggesterTest.cs b/src/Lucene.Net.Tests.Suggest/Suggest/Analyzing/BlendedInfixSuggesterTest.cs
index ac9cc6b..faa38fa 100644
--- a/src/Lucene.Net.Tests.Suggest/Suggest/Analyzing/BlendedInfixSuggesterTest.cs
+++ b/src/Lucene.Net.Tests.Suggest/Suggest/Analyzing/BlendedInfixSuggesterTest.cs
@@ -205,9 +205,9 @@ namespace Lucene.Net.Search.Suggest.Analyzing
 
             foreach (Lookup.LookupResult response in responses)
             {
-                if (response.payload.equals(payload))
+                if (response.Payload.equals(payload))
                 {
-                    return response.value;
+                    return response.Value;
                 }
             }
 


Mime
View raw message