lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [50/50] [abbrv] lucenenet git commit: .NETify Suggest: Added a SuggesterOptions flags enum to specify the AnalyzingSuggester and FuzzySuggester options using Intellisense.
Date Sun, 02 Oct 2016 14:36:08 GMT
.NETify Suggest: Added a SuggesterOptions flags enum to specify the AnalyzingSuggester and
FuzzySuggester options using Intellisense.


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

Branch: refs/heads/master
Commit: 0ab847b28bf49f1f27280407f8493e46ed47eabb
Parents: c76e010
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Thu Sep 22 10:58:46 2016 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sun Oct 2 17:45:18 2016 +0700

----------------------------------------------------------------------
 .../Lucene.Net.Suggest.csproj                   |  1 +
 .../Suggest/Analyzing/AnalyzingSuggester.cs     | 43 ++++++--------------
 .../Suggest/Analyzing/FuzzySuggester.cs         |  6 +--
 .../Suggest/Analyzing/SuggesterOptions.cs       | 23 +++++++++++
 .../Suggest/Analyzing/AnalyzingSuggesterTest.cs | 24 +++++------
 .../Suggest/Analyzing/FuzzySuggesterTest.cs     | 16 ++++----
 6 files changed, 60 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0ab847b2/src/Lucene.Net.Suggest/Lucene.Net.Suggest.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/Lucene.Net.Suggest.csproj b/src/Lucene.Net.Suggest/Lucene.Net.Suggest.csproj
index 749c488..94d4c65 100644
--- a/src/Lucene.Net.Suggest/Lucene.Net.Suggest.csproj
+++ b/src/Lucene.Net.Suggest/Lucene.Net.Suggest.csproj
@@ -64,6 +64,7 @@
     <Compile Include="Suggest\Analyzing\FreeTextSuggester.cs" />
     <Compile Include="Suggest\Analyzing\FSTUtil.cs" />
     <Compile Include="Suggest\Analyzing\FuzzySuggester.cs" />
+    <Compile Include="Suggest\Analyzing\SuggesterOptions.cs" />
     <Compile Include="Suggest\Analyzing\SuggestStopFilter.cs" />
     <Compile Include="Suggest\BufferedInputIterator.cs" />
     <Compile Include="Suggest\BufferingTermFreqIteratorWrapper.cs" />

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0ab847b2/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 08ea182..cbe47b2 100644
--- a/src/Lucene.Net.Suggest/Suggest/Analyzing/AnalyzingSuggester.cs
+++ b/src/Lucene.Net.Suggest/Suggest/Analyzing/AnalyzingSuggester.cs
@@ -119,24 +119,8 @@ namespace Lucene.Net.Search.Suggest.Analyzing
         private readonly bool preserveSep;
 
         /// <summary>
-        /// Include this flag in the options parameter to 
-        /// <see cref="AnalyzingSuggester(Analyzer,Analyzer,int,int,int,bool)"/> to
always
-        /// return the exact match first, regardless of score.  This
-        /// has no performance impact but could result in
-        /// low-quality suggestions. 
-        /// </summary>
-        public const int EXACT_FIRST = 1;
-
-        /// <summary>
-        /// Include this flag in the options parameter to
-        /// <see cref="AnalyzingSuggester(Analyzer,Analyzer,int,int,int,bool)"/> to
preserve
-        /// token separators when matching. 
-        /// </summary>
-        public const int PRESERVE_SEP = 2;
-
-        /// <summary>
         /// Represents the separation between tokens, if
-        ///  PRESERVE_SEP was specified 
+        /// <see cref="SuggesterOptions.PRESERVE_SEP"/> was specified 
         /// </summary>
         private const int SEP_LABEL = '\u001F';
 
@@ -180,22 +164,22 @@ namespace Lucene.Net.Search.Suggest.Analyzing
         private long count = 0;
 
         /// <summary>
-        /// Calls <see cref="AnalyzingSuggester(Analyzer,Analyzer,int,int,int,bool)">
-        /// AnalyzingSuggester(analyzer, analyzer, EXACT_FIRST | PRESERVE_SEP, 256, -1, true)
+        /// Calls <see cref="AnalyzingSuggester(Analyzer,Analyzer,Options,int,int,bool)">
+        /// AnalyzingSuggester(analyzer, analyzer, SuggesterOptions.EXACT_FIRST | SuggesterOptions.PRESERVE_SEP,
256, -1, true)
         /// </see>
         /// </summary>
         public AnalyzingSuggester(Analyzer analyzer)
-            : this(analyzer, analyzer, EXACT_FIRST | PRESERVE_SEP, 256, -1, true)
+            : this(analyzer, analyzer, SuggesterOptions.EXACT_FIRST | SuggesterOptions.PRESERVE_SEP,
256, -1, true)
         {
         }
 
         /// <summary>
-        /// Calls <see cref="AnalyzingSuggester(Analyzer,Analyzer,int,int,int,bool)">
-        /// AnalyzingSuggester(indexAnalyzer, queryAnalyzer, EXACT_FIRST | PRESERVE_SEP,
256, -1, true)
+        /// Calls <see cref="AnalyzingSuggester(Analyzer,Analyzer,Options,int,int,bool)">
+        /// AnalyzingSuggester(indexAnalyzer, queryAnalyzer, SuggesterOptions.EXACT_FIRST
| SuggesterOptions.PRESERVE_SEP, 256, -1, true)
         /// </see>
         /// </summary>
         public AnalyzingSuggester(Analyzer indexAnalyzer, Analyzer queryAnalyzer)
-            : this(indexAnalyzer, queryAnalyzer, EXACT_FIRST | PRESERVE_SEP, 256, -1, true)
+            : this(indexAnalyzer, queryAnalyzer, SuggesterOptions.EXACT_FIRST | SuggesterOptions.PRESERVE_SEP,
256, -1, true)
         {
         }
 
@@ -206,7 +190,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
         ///   analyzing suggestions while building the index. </param>
         /// <param name="queryAnalyzer"> Analyzer that will be used for
         ///   analyzing query text during lookup </param>
-        /// <param name="options"> see <see cref="EXACT_FIRST"/>, <see cref="PRESERVE_SEP"/>
</param>
+        /// <param name="options"> see <see cref="SuggesterOptions.EXACT_FIRST"/>,
<see cref="SuggesterOptions.PRESERVE_SEP"/> </param>
         /// <param name="maxSurfaceFormsPerAnalyzedForm"> Maximum number of
         ///   surface forms to keep for a single analyzed form.
         ///   When there are too many surface forms we discard the
@@ -216,19 +200,18 @@ namespace Lucene.Net.Search.Suggest.Analyzing
         ///   no limit. </param>
         /// <param name="preservePositionIncrements"> Whether position holes
         ///   should appear in the automata </param>
-        // LUCENENET TODO: Make options into an enum
-        public AnalyzingSuggester(Analyzer indexAnalyzer, Analyzer queryAnalyzer, int options,
+        public AnalyzingSuggester(Analyzer indexAnalyzer, Analyzer queryAnalyzer, SuggesterOptions
options,
             int maxSurfaceFormsPerAnalyzedForm, int maxGraphExpansions, bool preservePositionIncrements)
         {
             this.indexAnalyzer = indexAnalyzer;
             this.queryAnalyzer = queryAnalyzer;
-            if ((options & ~(EXACT_FIRST | PRESERVE_SEP)) != 0)
+            if ((options & ~(SuggesterOptions.EXACT_FIRST | SuggesterOptions.PRESERVE_SEP))
!= 0)
             {
-                throw new System.ArgumentException("options should only contain EXACT_FIRST
and PRESERVE_SEP; got " +
+                throw new System.ArgumentException("options should only contain SuggesterOptions.EXACT_FIRST
and SuggesterOptions.PRESERVE_SEP; got " +
                                                    options);
             }
-            this.exactFirst = (options & EXACT_FIRST) != 0;
-            this.preserveSep = (options & PRESERVE_SEP) != 0;
+            this.exactFirst = (options & SuggesterOptions.EXACT_FIRST) != 0;
+            this.preserveSep = (options & SuggesterOptions.PRESERVE_SEP) != 0;
 
             // NOTE: this is just an implementation limitation; if
             // somehow this is a problem we could fix it by using

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0ab847b2/src/Lucene.Net.Suggest/Suggest/Analyzing/FuzzySuggester.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/Suggest/Analyzing/FuzzySuggester.cs b/src/Lucene.Net.Suggest/Suggest/Analyzing/FuzzySuggester.cs
index 51da2b3..710376b 100644
--- a/src/Lucene.Net.Suggest/Suggest/Analyzing/FuzzySuggester.cs
+++ b/src/Lucene.Net.Suggest/Suggest/Analyzing/FuzzySuggester.cs
@@ -117,7 +117,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
         /// <param name="queryAnalyzer">
         ///           <see cref="Analyzer"/> that will be used for analyzing query
text during lookup </param>
         public FuzzySuggester(Analyzer indexAnalyzer, Analyzer queryAnalyzer)
-            : this(indexAnalyzer, queryAnalyzer, EXACT_FIRST | PRESERVE_SEP, 256, -1, true,

+            : this(indexAnalyzer, queryAnalyzer, SuggesterOptions.EXACT_FIRST | SuggesterOptions.PRESERVE_SEP,
256, -1, true, 
                   DEFAULT_MAX_EDITS, DEFAULT_TRANSPOSITIONS, DEFAULT_NON_FUZZY_PREFIX, 
                   DEFAULT_MIN_FUZZY_LENGTH, DEFAULT_UNICODE_AWARE)
         {
@@ -130,7 +130,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
         ///        analyzing suggestions while building the index. </param>
         /// <param name="queryAnalyzer"> The <see cref="Analyzer"/> that will
be used for
         ///        analyzing query text during lookup </param>
-        /// <param name="options"> see <see cref="EXACT_FIRST"/>, <see cref="PRESERVE_SEP"/>
</param>
+        /// <param name="options"> see <see cref="SuggesterOptions.EXACT_FIRST"/>,
<see cref="SuggesterOptions.PRESERVE_SEP"/> </param>
         /// <param name="maxSurfaceFormsPerAnalyzedForm"> Maximum number of
         ///        surface forms to keep for a single analyzed form.
         ///        When there are too many surface forms we discard the
@@ -146,7 +146,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
         /// <param name="nonFuzzyPrefix"> length of common (non-fuzzy) prefix (see
default <see cref="DEFAULT_NON_FUZZY_PREFIX"/> </param>
         /// <param name="minFuzzyLength"> minimum length of lookup key before any edits
are allowed (see default <see cref="DEFAULT_MIN_FUZZY_LENGTH"/>) </param>
         /// <param name="unicodeAware"> operate Unicode code points instead of bytes.
</param>
-        public FuzzySuggester(Analyzer indexAnalyzer, Analyzer queryAnalyzer, int options,

+        public FuzzySuggester(Analyzer indexAnalyzer, Analyzer queryAnalyzer, SuggesterOptions
options, 
             int maxSurfaceFormsPerAnalyzedForm, int maxGraphExpansions, bool preservePositionIncrements,

             int maxEdits, bool transpositions, int nonFuzzyPrefix, int minFuzzyLength, bool
unicodeAware)
             : base(indexAnalyzer, queryAnalyzer, options, maxSurfaceFormsPerAnalyzedForm,
maxGraphExpansions, preservePositionIncrements)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0ab847b2/src/Lucene.Net.Suggest/Suggest/Analyzing/SuggesterOptions.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Suggest/Suggest/Analyzing/SuggesterOptions.cs b/src/Lucene.Net.Suggest/Suggest/Analyzing/SuggesterOptions.cs
new file mode 100644
index 0000000..f7416ef
--- /dev/null
+++ b/src/Lucene.Net.Suggest/Suggest/Analyzing/SuggesterOptions.cs
@@ -0,0 +1,23 @@
+using System;
+
+namespace Lucene.Net.Search.Suggest.Analyzing
+{
+    /// <summary>
+    /// LUCENENET specific type for specifying <see cref="AnalyzingSuggester"/> 
+    /// and <see cref="FuzzySuggester"/> options. 
+    /// </summary>
+    [Flags]
+    public enum SuggesterOptions
+    {
+        /// <summary>
+        /// Always return the exact match first, regardless of score.  
+        /// This has no performance impact but could result in
+        /// low-quality suggestions. 
+        /// </summary>
+        EXACT_FIRST = 1,
+        /// <summary>
+        /// Preserve token separators when matching. 
+        /// </summary>
+        PRESERVE_SEP = 2
+    }
+}

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0ab847b2/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 41f3beb..1351e06 100644
--- a/src/Lucene.Net.Tests.Suggest/Suggest/Analyzing/AnalyzingSuggesterTest.cs
+++ b/src/Lucene.Net.Tests.Suggest/Suggest/Analyzing/AnalyzingSuggesterTest.cs
@@ -157,7 +157,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
                 }
             }
             AnalyzingSuggester analyzingSuggester = new AnalyzingSuggester(new MockAnalyzer(Random()),
new MockAnalyzer(Random()),
-                AnalyzingSuggester.EXACT_FIRST | AnalyzingSuggester.PRESERVE_SEP, 256, -1,
Random().nextBoolean());
+                SuggesterOptions.EXACT_FIRST | SuggesterOptions.PRESERVE_SEP, 256, -1, Random().nextBoolean());
             bool doPayloads = Random().nextBoolean();
             if (doPayloads)
             {
@@ -206,7 +206,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
 
             Analyzer standard = new MockAnalyzer(Random(), MockTokenizer.WHITESPACE, true,
MockTokenFilter.ENGLISH_STOPSET);
             AnalyzingSuggester suggester = new AnalyzingSuggester(standard, standard,
-                AnalyzingSuggester.EXACT_FIRST | AnalyzingSuggester.PRESERVE_SEP, 256, -1,
false);
+                SuggesterOptions.EXACT_FIRST | SuggesterOptions.PRESERVE_SEP, 256, -1, false);
 
             suggester.Build(new InputArrayIterator(keys));
 
@@ -248,7 +248,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
                 new Input("abcd", 1),
             };
 
-            int options = 0;
+            SuggesterOptions options = 0;
 
             Analyzer a = new MockAnalyzer(Random());
             AnalyzingSuggester suggester = new AnalyzingSuggester(a, a, options, 256, -1,
true);
@@ -541,7 +541,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
         {
 
             Analyzer a = GetUnusualAnalyzer();
-            int options = AnalyzingSuggester.EXACT_FIRST | AnalyzingSuggester.PRESERVE_SEP;
+            SuggesterOptions options = SuggesterOptions.EXACT_FIRST | SuggesterOptions.PRESERVE_SEP;
             AnalyzingSuggester suggester = new AnalyzingSuggester(a, a, options, 256, -1,
true);
             suggester.Build(new InputArrayIterator(new Input[] {
                 new Input("x y", 1),
@@ -587,7 +587,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
         {
 
             Analyzer a = GetUnusualAnalyzer();
-            AnalyzingSuggester suggester = new AnalyzingSuggester(a, a, AnalyzingSuggester.PRESERVE_SEP,
256, -1, true);
+            AnalyzingSuggester suggester = new AnalyzingSuggester(a, a, SuggesterOptions.PRESERVE_SEP,
256, -1, true);
 
             suggester.Build(new InputArrayIterator(new Input[] {
                 new Input("x y", 1),
@@ -910,7 +910,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
 
             Analyzer a = new MockTokenEatingAnalyzer(numStopChars, preserveHoles);
             AnalyzingSuggester suggester = new AnalyzingSuggester(a, a,
-                                                                  preserveSep ? AnalyzingSuggester.PRESERVE_SEP
: 0, 256, -1, true);
+                                                                  preserveSep ? SuggesterOptions.PRESERVE_SEP
: 0, 256, -1, true);
             if (doPayloads)
             {
                 suggester.Build(new InputArrayIterator(Shuffle(payloadKeys)));
@@ -1069,7 +1069,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
             // Query 1
             Analyzer a1 = new MockTokenEatingAnalyzer(numStopChars, preserveHoles);
             AnalyzingSuggester suggester1 = new AnalyzingSuggester(a1, a1,
-                preserveSep ? AnalyzingSuggester.PRESERVE_SEP : 0, 256, -1, true);
+                preserveSep ? SuggesterOptions.PRESERVE_SEP : 0, 256, -1, true);
 
             suggester1.Build(new InputArrayIterator(new Input[] { new Input(token11, 123456),
new Input(token21, 654321) }));
 
@@ -1084,7 +1084,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
             // Query 2
             Analyzer a2 = new MockTokenEatingAnalyzer(numStopChars, preserveHoles);
             AnalyzingSuggester suggester2 = new AnalyzingSuggester(a2, a2,
-                preserveSep ? AnalyzingSuggester.PRESERVE_SEP : 0, 256, -1, true);
+                preserveSep ? SuggesterOptions.PRESERVE_SEP : 0, 256, -1, true);
 
             suggester2.Build(new InputArrayIterator(new Input[] { new Input(token12, 1234567),
new Input(token22, 7654321) }));
 
@@ -1118,7 +1118,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
         public void TestQueueExhaustion()
         {
             Analyzer a = new MockAnalyzer(Random());
-            AnalyzingSuggester suggester = new AnalyzingSuggester(a, a, AnalyzingSuggester.EXACT_FIRST,
256, -1, true);
+            AnalyzingSuggester suggester = new AnalyzingSuggester(a, a, SuggesterOptions.EXACT_FIRST,
256, -1, true);
 
             suggester.Build(new InputArrayIterator(new Input[] {
                 new Input("a", 2),
@@ -1136,7 +1136,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
 
             Analyzer a = new MockAnalyzer(Random());
 
-            AnalyzingSuggester suggester = new AnalyzingSuggester(a, a, AnalyzingSuggester.EXACT_FIRST,
256, -1, true);
+            AnalyzingSuggester suggester = new AnalyzingSuggester(a, a, SuggesterOptions.EXACT_FIRST,
256, -1, true);
 
             suggester.Build(new InputArrayIterator(new Input[] {
                 new Input("a", 5),
@@ -1415,7 +1415,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
         public void TestDupSurfaceFormsMissingResults3()
         {
             Analyzer a = new MockAnalyzer(Random());
-            AnalyzingSuggester suggester = new AnalyzingSuggester(a, a, AnalyzingSuggester.PRESERVE_SEP,
256, -1, true);
+            AnalyzingSuggester suggester = new AnalyzingSuggester(a, a, SuggesterOptions.PRESERVE_SEP,
256, -1, true);
             suggester.Build(new InputArrayIterator(new Input[] {
                 new Input("a a", 7),
                 new Input("a a", 7),
@@ -1430,7 +1430,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
         public void TestEndingSpace()
         {
             Analyzer a = new MockAnalyzer(Random());
-            AnalyzingSuggester suggester = new AnalyzingSuggester(a, a, AnalyzingSuggester.PRESERVE_SEP,
256, -1, true);
+            AnalyzingSuggester suggester = new AnalyzingSuggester(a, a, SuggesterOptions.PRESERVE_SEP,
256, -1, true);
             suggester.Build(new InputArrayIterator(new Input[] {
                 new Input("i love lucy", 7),
                 new Input("isla de muerta", 8),

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0ab847b2/src/Lucene.Net.Tests.Suggest/Suggest/Analyzing/FuzzySuggesterTest.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Suggest/Suggest/Analyzing/FuzzySuggesterTest.cs b/src/Lucene.Net.Tests.Suggest/Suggest/Analyzing/FuzzySuggesterTest.cs
index 38dca2c..27bd8fb 100644
--- a/src/Lucene.Net.Tests.Suggest/Suggest/Analyzing/FuzzySuggesterTest.cs
+++ b/src/Lucene.Net.Tests.Suggest/Suggest/Analyzing/FuzzySuggesterTest.cs
@@ -44,7 +44,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
             }
             keys.Add(new Input("foo bar boo far", 12));
             MockAnalyzer analyzer = new MockAnalyzer(Random(), MockTokenizer.KEYWORD, false);
-            FuzzySuggester suggester = new FuzzySuggester(analyzer, analyzer, FuzzySuggester.EXACT_FIRST
| FuzzySuggester.PRESERVE_SEP, 256, -1, true, FuzzySuggester.DEFAULT_MAX_EDITS, FuzzySuggester.DEFAULT_TRANSPOSITIONS,
+            FuzzySuggester suggester = new FuzzySuggester(analyzer, analyzer, SuggesterOptions.EXACT_FIRST
| SuggesterOptions.PRESERVE_SEP, 256, -1, true, FuzzySuggester.DEFAULT_MAX_EDITS, FuzzySuggester.DEFAULT_TRANSPOSITIONS,
                                                           0, FuzzySuggester.DEFAULT_MIN_FUZZY_LENGTH,
FuzzySuggester.DEFAULT_UNICODE_AWARE);
             suggester.Build(new InputArrayIterator(keys));
             int numIters = AtLeast(10);
@@ -69,7 +69,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
             }
             keys.Add(new Input("фуу бар буу фар", 12));
             MockAnalyzer analyzer = new MockAnalyzer(Random(), MockTokenizer.KEYWORD, false);
-            FuzzySuggester suggester = new FuzzySuggester(analyzer, analyzer, FuzzySuggester.EXACT_FIRST
| FuzzySuggester.PRESERVE_SEP, 256, -1, true, FuzzySuggester.DEFAULT_MAX_EDITS, FuzzySuggester.DEFAULT_TRANSPOSITIONS,
+            FuzzySuggester suggester = new FuzzySuggester(analyzer, analyzer, SuggesterOptions.EXACT_FIRST
| SuggesterOptions.PRESERVE_SEP, 256, -1, true, FuzzySuggester.DEFAULT_MAX_EDITS, FuzzySuggester.DEFAULT_TRANSPOSITIONS,
                 0, FuzzySuggester.DEFAULT_MIN_FUZZY_LENGTH, true);
             suggester.Build(new InputArrayIterator(keys));
             int numIters = AtLeast(10);
@@ -169,7 +169,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
             };
 
             Analyzer standard = new MockAnalyzer(Random(), MockTokenizer.WHITESPACE, true,
MockTokenFilter.ENGLISH_STOPSET);
-            FuzzySuggester suggester = new FuzzySuggester(standard, standard, AnalyzingSuggester.EXACT_FIRST
| AnalyzingSuggester.PRESERVE_SEP, 256, -1, false, FuzzySuggester.DEFAULT_MAX_EDITS, FuzzySuggester.DEFAULT_TRANSPOSITIONS,
+            FuzzySuggester suggester = new FuzzySuggester(standard, standard, SuggesterOptions.EXACT_FIRST
| SuggesterOptions.PRESERVE_SEP, 256, -1, false, FuzzySuggester.DEFAULT_MAX_EDITS, FuzzySuggester.DEFAULT_TRANSPOSITIONS,
                 FuzzySuggester.DEFAULT_NON_FUZZY_PREFIX, FuzzySuggester.DEFAULT_MIN_FUZZY_LENGTH,
FuzzySuggester.DEFAULT_UNICODE_AWARE);
             suggester.Build(new InputArrayIterator(keys));
 
@@ -199,7 +199,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
                 new Input("abcd", 1),
             };
 
-            int options = 0;
+            SuggesterOptions options = 0;
 
             Analyzer a = new MockAnalyzer(Random());
             FuzzySuggester suggester = new FuzzySuggester(a, a, options, 256, -1, true, 1,
true, 1, 3, false);
@@ -494,7 +494,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
         {
 
             Analyzer a = GetUnusualAnalyzer();
-            FuzzySuggester suggester = new FuzzySuggester(a, a, AnalyzingSuggester.EXACT_FIRST
| AnalyzingSuggester.PRESERVE_SEP, 256, -1, true, 1, true, 1, 3, false);
+            FuzzySuggester suggester = new FuzzySuggester(a, a, SuggesterOptions.EXACT_FIRST
| SuggesterOptions.PRESERVE_SEP, 256, -1, true, 1, true, 1, 3, false);
             suggester.Build(new InputArrayIterator(new Input[] {
                 new Input("x y", 1),
                 new Input("x y z", 3),
@@ -539,7 +539,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
         {
 
             Analyzer a = GetUnusualAnalyzer();
-            FuzzySuggester suggester = new FuzzySuggester(a, a, AnalyzingSuggester.PRESERVE_SEP,
256, -1, true, 1, true, 1, 3, false);
+            FuzzySuggester suggester = new FuzzySuggester(a, a, SuggesterOptions.PRESERVE_SEP,
256, -1, true, 1, true, 1, 3, false);
 
             suggester.Build(new InputArrayIterator(new Input[] {
                 new Input("x y", 1),
@@ -830,7 +830,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
 
             Analyzer a = new MockTokenEatingAnalyzer(numStopChars, preserveHoles);
             FuzzySuggester suggester = new FuzzySuggester(a, a,
-                                                          preserveSep ? AnalyzingSuggester.PRESERVE_SEP
: 0, 256, -1, true, 1, false, 1, 3, unicodeAware);
+                                                          preserveSep ? SuggesterOptions.PRESERVE_SEP
: 0, 256, -1, true, 1, false, 1, 3, unicodeAware);
             suggester.Build(new InputArrayIterator(keys));
 
             foreach (string prefix in allPrefixes)
@@ -1012,7 +1012,7 @@ namespace Lucene.Net.Search.Suggest.Analyzing
         public void TestEditSeps()
         {
             Analyzer a = new MockAnalyzer(Random());
-            FuzzySuggester suggester = new FuzzySuggester(a, a, FuzzySuggester.PRESERVE_SEP,
2, -1, true, 2, true, 1, 3, false);
+            FuzzySuggester suggester = new FuzzySuggester(a, a, SuggesterOptions.PRESERVE_SEP,
2, -1, true, 2, true, 1, 3, false);
 
             IList<Input> keys = Arrays.AsList(new Input[] {
                 new Input("foo bar", 40),


Mime
View raw message