lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ccurr...@apache.org
Subject svn commit: r1363077 [2/2] - in /incubator/lucene.net/trunk: build/scripts/ build/scripts/Similarity/ build/vs2010/contrib/ build/vs2010/test/ src/contrib/Analyzers/Shingle/ src/contrib/FastVectorHighlighter/ src/contrib/Highlighter/ src/contrib/Memory...
Date Wed, 18 Jul 2012 19:55:19 GMT
Modified: incubator/lucene.net/trunk/src/core/Search/BooleanQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/BooleanQuery.cs?rev=1363077&r1=1363076&r2=1363077&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/BooleanQuery.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/BooleanQuery.cs Wed Jul 18 19:55:17 2012
@@ -142,7 +142,8 @@ namespace Lucene.Net.Search
 
         protected internal int minNrShouldMatch = 0;
 
-	    /// <summary> Specifies a minimum number of the optional BooleanClauses
+	    /// <summary>
+	    /// Specifies a minimum number of the optional BooleanClauses
 	    /// which must be satisfied.
 	    /// <para>
 	    /// By default no optional clauses are necessary for a match
@@ -155,42 +156,12 @@ namespace Lucene.Net.Search
 	    /// only be compared against the number of matching optional clauses.
 	    /// </para>
 	    /// </summary>
-	    /// <value>the number of optional clauses that must match</value>
 	    public virtual int MinimumNumberShouldMatch
 	    {
 	        set { this.minNrShouldMatch = value; }
 	        get { return minNrShouldMatch; }
 	    }
 
-        /// <summary> Specifies a minimum number of the optional BooleanClauses
-        /// which must be satisfied.
-        /// <para>
-        /// By default no optional clauses are necessary for a match
-        /// (unless there are no required clauses).  If this method is used,
-        /// then the specified number of clauses is required.
-        /// </para>
-        /// <para>
-        /// Use of this method is totally independent of specifying that
-        /// any specific clauses are required (or prohibited).  This number will
-        /// only be compared against the number of matching optional clauses.
-        /// </para>
-        /// </summary>
-        /// <param name="min">the number of optional clauses that must match</param>
-        [Obsolete("Use MinimumNumberShouldMatch property instead")]
-        public virtual void SetMinimumNumberShouldMatch(int min)
-        {
-            MinimumNumberShouldMatch = min;
-        }
-
-        /// <summary> Gets the minimum number of the optional BooleanClauses
-        /// which must be satisifed.
-        /// </summary>
-        [Obsolete("Use MinimumNumberShouldMatch property instead")]
-        public virtual int GetMinimumNumberShouldMatch()
-        {
-            return MinimumNumberShouldMatch;
-        }
-
 	    /// <summary>Adds a clause to a boolean query.
 		/// 
 		/// </summary>
@@ -332,7 +303,7 @@ namespace Lucene.Net.Search
 					Explanation e = w.Explain(reader, doc);
                     if (!c.IsProhibited)
 						maxCoord++;
-					if (e.IsMatch())
+					if (e.IsMatch)
 					{
                         if (!c.IsProhibited)
 						{
@@ -385,7 +356,7 @@ namespace Lucene.Net.Search
 				// eliminate wrapper
 				else
 				{
-					ComplexExplanation result = new ComplexExplanation(sumExpl.IsMatch(), sum * coordFactor,
"product of:");
+					ComplexExplanation result = new ComplexExplanation(sumExpl.IsMatch, sum * coordFactor,
"product of:");
 					result.AddDetail(sumExpl);
 					result.AddDetail(new Explanation(coordFactor, "coord(" + coord + "/" + maxCoord + ")"));
 					return result;

Modified: incubator/lucene.net/trunk/src/core/Search/ComplexExplanation.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/ComplexExplanation.cs?rev=1363077&r1=1363076&r2=1363077&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/ComplexExplanation.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/ComplexExplanation.cs Wed Jul 18 19:55:17 2012
@@ -46,39 +46,21 @@ namespace Lucene.Net.Search
 	        set { match = value; }
 	    }
 
-
-        /// <summary> The match status of this explanation node.</summary>
-        /// <returns> May be null if match status is unknown
-        /// </returns>
-        [Obsolete("Use Match property instead")]
-        public virtual System.Boolean? GetMatch()
-        {
-            return Match;
-        }
-
-        /// <summary> Sets the match status assigned to this explanation node.</summary>
-        /// <param name="match">May be null if match status is unknown
-        /// </param>
-        [Obsolete("Use Match property instead")]
-        public virtual void SetMatch(System.Boolean? match)
-        {
-            Match = match;
-        }
-
 	    /// <summary> Indicates whether or not this Explanation models a good match.
-		/// 
-		/// <p/>
-		/// If the match status is explicitly set (i.e.: not null) this method
-		/// uses it; otherwise it defers to the superclass.
-		/// <p/>
-		/// </summary>
-		/// <seealso cref="GetMatch">
-		/// </seealso>
-		public override bool IsMatch()
-		{
-			System.Boolean? m = Match;
-            return m ?? base.IsMatch();
-		}
+	    /// 
+	    /// <p/>
+	    /// If the match status is explicitly set (i.e.: not null) this method
+	    /// uses it; otherwise it defers to the superclass.
+	    /// <p/>
+	    /// </summary>
+	    public override bool IsMatch
+	    {
+	        get
+	        {
+	            System.Boolean? m = Match;
+	            return m ?? base.IsMatch;
+	        }
+	    }
 
 	    protected internal override string Summary
 	    {
@@ -87,7 +69,7 @@ namespace Lucene.Net.Search
 	            if (!match.HasValue)
 	                return base.Summary;
 
-	            return Value + " = " + (IsMatch() ? "(MATCH) " : "(NON-MATCH) ") + Description;
+	            return Value + " = " + (IsMatch ? "(MATCH) " : "(NON-MATCH) ") + Description;
 	        }
 	    }
 	}

Modified: incubator/lucene.net/trunk/src/core/Search/DisjunctionMaxQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/DisjunctionMaxQuery.cs?rev=1363077&r1=1363076&r2=1363077&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/DisjunctionMaxQuery.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/DisjunctionMaxQuery.cs Wed Jul 18 19:55:17
2012
@@ -204,7 +204,7 @@ namespace Lucene.Net.Search
 				foreach(Weight wt in weights)
 				{
 					Explanation e = wt.Explain(reader, doc);
-					if (e.IsMatch())
+					if (e.IsMatch)
 					{
 						System.Boolean tempAux = true;
 						result.Match = tempAux;

Modified: incubator/lucene.net/trunk/src/core/Search/Explanation.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/Explanation.cs?rev=1363077&r1=1363076&r2=1363077&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/Explanation.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/Explanation.cs Wed Jul 18 19:55:17 2012
@@ -38,19 +38,19 @@ namespace Lucene.Net.Search
 			this.value = value;
 			this.description = description;
 		}
-		
-		/// <summary> Indicates whether or not this Explanation models a good match.
-		/// 
-		/// <p/>
-		/// By default, an Explanation represents a "match" if the value is positive.
-		/// <p/>
-		/// </summary>
-		/// <seealso cref="GetValue">
-		/// </seealso>
-		public virtual bool IsMatch()
-		{
-			return (0.0f < Value);
-		}
+
+	    /// <summary> Indicates whether or not this Explanation models a good match.
+	    /// 
+	    /// <p/>
+	    /// By default, an Explanation represents a "match" if the value is positive.
+	    /// <p/>
+	    /// </summary>
+	    /// <seealso cref="GetValue">
+	    /// </seealso>
+	    public virtual bool IsMatch
+	    {
+	        get { return (0.0f < Value); }
+	    }
 
 
 	    /// <summary>The value assigned to this explanation node. </summary>

Modified: incubator/lucene.net/trunk/src/core/Search/Function/CustomScoreQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/Function/CustomScoreQuery.cs?rev=1363077&r1=1363076&r2=1363077&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/Function/CustomScoreQuery.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/Function/CustomScoreQuery.cs Wed Jul 18 19:55:17
2012
@@ -438,7 +438,7 @@ namespace Lucene.Net.Search.Function
 			private Explanation DoExplain(IndexReader reader, int doc)
 			{
 				Explanation subQueryExpl = subQueryWeight.Explain(reader, doc);
-				if (!subQueryExpl.IsMatch())
+				if (!subQueryExpl.IsMatch)
 				{
 					return subQueryExpl;
 				}

Modified: incubator/lucene.net/trunk/src/core/Search/MultiPhraseQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/MultiPhraseQuery.cs?rev=1363077&r1=1363076&r2=1363077&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/MultiPhraseQuery.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/MultiPhraseQuery.cs Wed Jul 18 19:55:17 2012
@@ -269,7 +269,7 @@ namespace Lucene.Net.Search
 				fieldNormExpl.Description = "fieldNorm(field=" + Enclosing_Instance.field + ", doc="
+ doc + ")";
 				fieldExpl.AddDetail(fieldNormExpl);
 				
-				fieldExpl.Match = tfExplanation.IsMatch();
+				fieldExpl.Match = tfExplanation.IsMatch;
                 fieldExpl.Value = tfExplanation.Value * idfExpl.Value * fieldNormExpl.Value;
 				
 				result.AddDetail(fieldExpl);

Modified: incubator/lucene.net/trunk/src/core/Search/Spans/SpanWeight.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/Spans/SpanWeight.cs?rev=1363077&r1=1363076&r2=1363077&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/Spans/SpanWeight.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/Spans/SpanWeight.cs Wed Jul 18 19:55:17 2012
@@ -119,7 +119,7 @@ namespace Lucene.Net.Search.Spans
 			fieldNormExpl.Description = "fieldNorm(field=" + field + ", doc=" + doc + ")";
 			fieldExpl.AddDetail(fieldNormExpl);
 			
-			fieldExpl.Match = tfExpl.IsMatch();
+			fieldExpl.Match = tfExpl.IsMatch;
 			fieldExpl.Value = tfExpl.Value * idfExpl.Value * fieldNormExpl.Value;
 			
 			result.AddDetail(fieldExpl);

Modified: incubator/lucene.net/trunk/src/core/Search/TermQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/TermQuery.cs?rev=1363077&r1=1363076&r2=1363077&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/TermQuery.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/TermQuery.cs Wed Jul 18 19:55:17 2012
@@ -166,7 +166,7 @@ namespace Lucene.Net.Search
 				fieldNormExpl.Description = "fieldNorm(field=" + field + ", doc=" + doc + ")";
 				fieldExpl.AddDetail(fieldNormExpl);
 
-                fieldExpl.Match = tfExplanation.IsMatch();
+                fieldExpl.Match = tfExplanation.IsMatch;
                 fieldExpl.Value = tfExplanation.Value * expl.Value * fieldNormExpl.Value;
 				
 				result.AddDetail(fieldExpl);

Modified: incubator/lucene.net/trunk/src/core/Search/TimeLimitingCollector.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/TimeLimitingCollector.cs?rev=1363077&r1=1363076&r2=1363077&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/TimeLimitingCollector.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/TimeLimitingCollector.cs Wed Jul 18 19:55:17
2012
@@ -89,12 +89,12 @@ namespace Lucene.Net.Search
 					}
 				}
 			}
-			
-			/// <summary> Get the timer value in milliseconds.</summary>
-			public long GetMilliseconds()
-			{
-				return time;
-			}
+
+		    /// <summary> Get the timer value in milliseconds.</summary>
+		    public long Milliseconds
+		    {
+		        get { return time; }
+		    }
 		}
 		
 		/// <summary>Thrown when elapsed search time exceeds allowed search time. </summary>
@@ -150,7 +150,7 @@ namespace Lucene.Net.Search
 		{
 			InitBlock();
 			this.collector = collector;
-			t0 = TIMER_THREAD.GetMilliseconds();
+			t0 = TIMER_THREAD.Milliseconds;
 			this.timeout = t0 + timeAllowed;
 		}
 
@@ -199,7 +199,7 @@ namespace Lucene.Net.Search
 		/// </summary>
 		public override void  Collect(int doc)
 		{
-			long time = TIMER_THREAD.GetMilliseconds();
+			long time = TIMER_THREAD.Milliseconds;
 			if (timeout < time)
 			{
 				if (greedy)

Modified: incubator/lucene.net/trunk/test/contrib/FastVectorHighlighter/FieldPhraseListTest.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/contrib/FastVectorHighlighter/FieldPhraseListTest.cs?rev=1363077&r1=1363076&r2=1363077&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/contrib/FastVectorHighlighter/FieldPhraseListTest.cs (original)
+++ incubator/lucene.net/trunk/test/contrib/FastVectorHighlighter/FieldPhraseListTest.cs Wed
Jul 18 19:55:17 2012
@@ -139,8 +139,8 @@ namespace Lucene.Net.Search.Vectorhighli
             FieldPhraseList fpl = new FieldPhraseList(stack, fq);
             Assert.AreEqual(1, fpl.phraseList.Count);
             Assert.AreEqual("ac(2.0)((4,5)(8,9))", fpl.phraseList.First.Value.ToString());
-            Assert.AreEqual(4, fpl.phraseList.First.Value.GetStartOffset());
-            Assert.AreEqual(9, fpl.phraseList.First.Value.GetEndOffset());
+            Assert.AreEqual(4, fpl.phraseList.First.Value.StartOffset);
+            Assert.AreEqual(9, fpl.phraseList.First.Value.EndOffset);
         }
 
         [Test]

Modified: incubator/lucene.net/trunk/test/contrib/FastVectorHighlighter/FieldQueryTest.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/contrib/FastVectorHighlighter/FieldQueryTest.cs?rev=1363077&r1=1363076&r2=1363077&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/contrib/FastVectorHighlighter/FieldQueryTest.cs (original)
+++ incubator/lucene.net/trunk/test/contrib/FastVectorHighlighter/FieldQueryTest.cs Wed Jul
18 19:55:17 2012
@@ -216,7 +216,7 @@ namespace Lucene.Net.Search.Vectorhighli
 
             QueryPhraseMap pqm = fq.GetFieldTermMap(F, "a");
             Assert.NotNull(pqm);
-            Assert.IsTrue(pqm.IsTerminal());
+            Assert.IsTrue(pqm.IsTerminal);
 
             pqm = fq.GetFieldTermMap(F, "b");
             Assert.Null(pqm);

Modified: incubator/lucene.net/trunk/test/contrib/FastVectorHighlighter/IndexTimeSynonymTest.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/contrib/FastVectorHighlighter/IndexTimeSynonymTest.cs?rev=1363077&r1=1363076&r2=1363077&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/contrib/FastVectorHighlighter/IndexTimeSynonymTest.cs
(original)
+++ incubator/lucene.net/trunk/test/contrib/FastVectorHighlighter/IndexTimeSynonymTest.cs
Wed Jul 18 19:55:17 2012
@@ -181,8 +181,8 @@ namespace Lucene.Net.Search.Vectorhighli
             FieldPhraseList fpl = new FieldPhraseList(stack, fq);
             Assert.AreEqual(1, fpl.phraseList.Count);
             Assert.AreEqual("personalcomputer(1.0)((3,5))", fpl.phraseList.First.Value.ToString());
-            Assert.AreEqual(3, fpl.phraseList.First.Value.GetStartOffset());
-            Assert.AreEqual(5, fpl.phraseList.First.Value.GetEndOffset());
+            Assert.AreEqual(3, fpl.phraseList.First.Value.StartOffset);
+            Assert.AreEqual(5, fpl.phraseList.First.Value.EndOffset);
         }
 
         [Test]
@@ -195,8 +195,8 @@ namespace Lucene.Net.Search.Vectorhighli
             FieldPhraseList fpl = new FieldPhraseList(stack, fq);
             Assert.AreEqual(1, fpl.phraseList.Count);
             Assert.AreEqual("computer(1.0)((3,5))", fpl.phraseList.First.Value.ToString());
-            Assert.AreEqual(3, fpl.phraseList.First.Value.GetStartOffset());
-            Assert.AreEqual(5, fpl.phraseList.First.Value.GetEndOffset());
+            Assert.AreEqual(3, fpl.phraseList.First.Value.StartOffset);
+            Assert.AreEqual(5, fpl.phraseList.First.Value.EndOffset);
         }
 
         [Test]
@@ -212,8 +212,8 @@ namespace Lucene.Net.Search.Vectorhighli
             FieldPhraseList fpl = new FieldPhraseList(stack, fq);
             Assert.AreEqual(1, fpl.phraseList.Count);
             Assert.IsTrue(fpl.phraseList.First.Value.ToString().IndexOf("(1.0)((3,5))") >
0);
-            Assert.AreEqual(3, fpl.phraseList.First.Value.GetStartOffset());
-            Assert.AreEqual(5, fpl.phraseList.First.Value.GetEndOffset());
+            Assert.AreEqual(3, fpl.phraseList.First.Value.StartOffset);
+            Assert.AreEqual(5, fpl.phraseList.First.Value.EndOffset);
         }
 
         [Test]
@@ -226,8 +226,8 @@ namespace Lucene.Net.Search.Vectorhighli
             FieldPhraseList fpl = new FieldPhraseList(stack, fq);
             Assert.AreEqual(1, fpl.phraseList.Count);
             Assert.AreEqual("pc(1.0)((3,20))", fpl.phraseList.First.Value.ToString());
-            Assert.AreEqual(3, fpl.phraseList.First.Value.GetStartOffset());
-            Assert.AreEqual(20, fpl.phraseList.First.Value.GetEndOffset());
+            Assert.AreEqual(3, fpl.phraseList.First.Value.StartOffset);
+            Assert.AreEqual(20, fpl.phraseList.First.Value.EndOffset);
         }
 
         [Test]
@@ -240,8 +240,8 @@ namespace Lucene.Net.Search.Vectorhighli
             FieldPhraseList fpl = new FieldPhraseList(stack, fq);
             Assert.AreEqual(1, fpl.phraseList.Count);
             Assert.AreEqual("personalcomputer(1.0)((3,20))", fpl.phraseList.First.Value.ToString());
-            Assert.AreEqual(3, fpl.phraseList.First.Value.GetStartOffset());
-            Assert.AreEqual(20, fpl.phraseList.First.Value.GetEndOffset());
+            Assert.AreEqual(3, fpl.phraseList.First.Value.StartOffset);
+            Assert.AreEqual(20, fpl.phraseList.First.Value.EndOffset);
         }
 
         [Test]
@@ -254,8 +254,8 @@ namespace Lucene.Net.Search.Vectorhighli
             FieldPhraseList fpl = new FieldPhraseList(stack, fq);
             Assert.AreEqual(1, fpl.phraseList.Count);
             Assert.AreEqual("computer(1.0)((3,20))", fpl.phraseList.First.Value.ToString());
-            Assert.AreEqual(3, fpl.phraseList.First.Value.GetStartOffset());
-            Assert.AreEqual(20, fpl.phraseList.First.Value.GetEndOffset());
+            Assert.AreEqual(3, fpl.phraseList.First.Value.StartOffset);
+            Assert.AreEqual(20, fpl.phraseList.First.Value.EndOffset);
         }
 
         [Test]
@@ -271,8 +271,8 @@ namespace Lucene.Net.Search.Vectorhighli
             FieldPhraseList fpl = new FieldPhraseList(stack, fq);
             Assert.AreEqual(1, fpl.phraseList.Count);
             Assert.IsTrue(fpl.phraseList.First.Value.ToString().IndexOf("(1.0)((3,20))")
> 0);
-            Assert.AreEqual(3, fpl.phraseList.First.Value.GetStartOffset());
-            Assert.AreEqual(20, fpl.phraseList.First.Value.GetEndOffset());
+            Assert.AreEqual(3, fpl.phraseList.First.Value.StartOffset);
+            Assert.AreEqual(20, fpl.phraseList.First.Value.EndOffset);
         }
 
         private void MakeIndex1w()

Modified: incubator/lucene.net/trunk/test/contrib/Highlighter/HighlighterTest.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/contrib/Highlighter/HighlighterTest.cs?rev=1363077&r1=1363076&r2=1363077&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/contrib/Highlighter/HighlighterTest.cs (original)
+++ incubator/lucene.net/trunk/test/contrib/Highlighter/HighlighterTest.cs Wed Jul 18 19:55:17
2012
@@ -1345,9 +1345,9 @@ namespace Lucene.Net.Search.Highlight.Te
                 return 0;
             }
 
-            public float GetFragmentScore()
+            public float FragmentScore
             {
-                return 1;
+                get { return 1; }
             }
         }
 
@@ -1806,7 +1806,7 @@ public void testBigramAnalyzer() {
 
         public String HighlightTerm(String originalText, TokenGroup group)
         {
-            if (group.GetTotalScore() <= 0)
+            if (@group.TotalScore <= 0)
             {
                 return originalText;
             }

Modified: incubator/lucene.net/trunk/test/contrib/Queries/DuplicateFilterTest.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/contrib/Queries/DuplicateFilterTest.cs?rev=1363077&r1=1363076&r2=1363077&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/contrib/Queries/DuplicateFilterTest.cs (original)
+++ incubator/lucene.net/trunk/test/contrib/Queries/DuplicateFilterTest.cs Wed Jul 18 19:55:17
2012
@@ -116,7 +116,7 @@ namespace Lucene.Net.Search
         public void TestFastFilter()
         {
             DuplicateFilter df = new DuplicateFilter(KEY_FIELD);
-            df.SetProcessingMode(DuplicateFilter.PM_FAST_INVALIDATION);
+            df.ProcessingMode = DuplicateFilter.PM_FAST_INVALIDATION;
             Hashtable results = new Hashtable();
             ScoreDoc[] h = searcher.Search(tq, df, 1000).ScoreDocs;
             Assert.IsTrue(h.Length > 0, "Filtered searching should have found some matches");
@@ -134,7 +134,7 @@ namespace Lucene.Net.Search
         public void TestKeepsLastFilter()
         {
             DuplicateFilter df = new DuplicateFilter(KEY_FIELD);
-            df.SetKeepMode(DuplicateFilter.KM_USE_LAST_OCCURRENCE);
+            df.KeepMode = DuplicateFilter.KM_USE_LAST_OCCURRENCE;
             ScoreDoc[] h = searcher.Search(tq, df, 1000).ScoreDocs;
             Assert.IsTrue(h.Length > 0, "Filtered searching should have found some matches");
             for (int i = 0; i < h.Length; i++)
@@ -155,7 +155,7 @@ namespace Lucene.Net.Search
         public void TestKeepsFirstFilter()
         {
             DuplicateFilter df = new DuplicateFilter(KEY_FIELD);
-            df.SetKeepMode(DuplicateFilter.KM_USE_FIRST_OCCURRENCE);
+            df.KeepMode = DuplicateFilter.KM_USE_FIRST_OCCURRENCE;
             ScoreDoc[] h = searcher.Search(tq, df, 1000).ScoreDocs;
             Assert.IsTrue(h.Length > 0, "Filtered searching should have found some matches");
             for (int i = 0; i < h.Length; i++)

Modified: incubator/lucene.net/trunk/test/contrib/Queries/Similar/TestMoreLikeThis.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/contrib/Queries/Similar/TestMoreLikeThis.cs?rev=1363077&r1=1363076&r2=1363077&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/contrib/Queries/Similar/TestMoreLikeThis.cs (original)
+++ incubator/lucene.net/trunk/test/contrib/Queries/Similar/TestMoreLikeThis.cs Wed Jul 18
19:55:17 2012
@@ -82,16 +82,16 @@ namespace Lucene.Net.Search.Similar
 
             MoreLikeThis mlt = new MoreLikeThis(
                 reader);
-            mlt.SetMinDocFreq(1);
-            mlt.SetMinTermFreq(1);
-            mlt.SetMinWordLen(1);
+            mlt.MinDocFreq = 1;
+            mlt.MinTermFreq = 1;
+            mlt.MinWordLen = 1;
             mlt.SetFieldNames(new String[] { "text" });
-            mlt.SetBoost(true);
+            mlt.Boost = true;
 
             // this mean that every term boost factor will be multiplied by this
             // number
             float boostFactor = 5;
-            mlt.SetBoostFactor(boostFactor);
+            mlt.BoostFactor = boostFactor;
 
             BooleanQuery query = (BooleanQuery)mlt.Like(new System.IO.StringReader("lucene
release"));
             IList clauses = query.Clauses;
@@ -115,11 +115,11 @@ namespace Lucene.Net.Search.Similar
         {
             Hashtable originalValues = new Hashtable();
             MoreLikeThis mlt = new MoreLikeThis(reader);
-            mlt.SetMinDocFreq(1);
-            mlt.SetMinTermFreq(1);
-            mlt.SetMinWordLen(1);
+            mlt.MinDocFreq = 1;
+            mlt.MinTermFreq = 1;
+            mlt.MinWordLen = 1;
             mlt.SetFieldNames(new String[] { "text" });
-            mlt.SetBoost(true);
+            mlt.Boost = true;
             BooleanQuery query = (BooleanQuery)mlt.Like(new System.IO.StringReader("lucene
release"));
             IList clauses = query.Clauses;
 

Modified: incubator/lucene.net/trunk/test/contrib/Regex/TestRegexQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/contrib/Regex/TestRegexQuery.cs?rev=1363077&r1=1363076&r2=1363077&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/contrib/Regex/TestRegexQuery.cs (original)
+++ incubator/lucene.net/trunk/test/contrib/Regex/TestRegexQuery.cs Wed Jul 18 19:55:17 2012
@@ -74,7 +74,7 @@ namespace Lucene.Net.Search.Regex
             RegexQuery query = new RegexQuery(NewTerm(regex));
 
             if (capability != null)
-                query.SetRegexImplementation(capability);
+                query.RegexImplementation = capability;
 
             return searcher.Search(query, null, 1000).TotalHits;
         }

Modified: incubator/lucene.net/trunk/test/core/Index/TestByteSlices.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Index/TestByteSlices.cs?rev=1363077&r1=1363076&r2=1363077&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Index/TestByteSlices.cs (original)
+++ incubator/lucene.net/trunk/test/core/Index/TestByteSlices.cs Wed Jul 18 19:55:17 2012
@@ -127,7 +127,7 @@ namespace Lucene.Net.Index
 						//writer.writeVInt(ti);
 					}
 					counters[stream] += numValue;
-					uptos[stream] = writer.GetAddress();
+					uptos[stream] = writer.Address;
 					if (debug)
 						System.Console.Out.WriteLine("    addr now " + uptos[stream]);
 				}

Modified: incubator/lucene.net/trunk/test/core/Index/TestIndexWriterReader.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Index/TestIndexWriterReader.cs?rev=1363077&r1=1363076&r2=1363077&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Index/TestIndexWriterReader.cs (original)
+++ incubator/lucene.net/trunk/test/core/Index/TestIndexWriterReader.cs Wed Jul 18 19:55:17
2012
@@ -333,7 +333,7 @@ namespace Lucene.Net.Index
 			
 			Directory dir1 = new MockRAMDirectory();
 			IndexWriter writer = new IndexWriter(dir1, new WhitespaceAnalyzer(), IndexWriter.MaxFieldLength.LIMITED);
-            writer.SetReaderTermsIndexDivisor(2);
+            writer.ReaderTermsIndexDivisor = 2;
 			writer.SetInfoStream(infoStream);
 			// create the index
 			CreateIndexNoClose(!optimize, "index1", writer);

Modified: incubator/lucene.net/trunk/test/core/Search/TestBooleanMinShouldMatch.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Search/TestBooleanMinShouldMatch.cs?rev=1363077&r1=1363076&r2=1363077&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Search/TestBooleanMinShouldMatch.cs (original)
+++ incubator/lucene.net/trunk/test/core/Search/TestBooleanMinShouldMatch.cs Wed Jul 18 19:55:17
2012
@@ -66,7 +66,7 @@ namespace Lucene.Net.Search
 					if (c[i].Occur == Occur.SHOULD)
 						opt++;
 				}
-				q.SetMinimumNumberShouldMatch(rnd.Next(opt + 2));
+				q.MinimumNumberShouldMatch = rnd.Next(opt + 2);
 			}
 		}
 		
@@ -127,7 +127,7 @@ namespace Lucene.Net.Search
 			{
 				q.Add(new TermQuery(new Term("data", "" + i)), Occur.SHOULD); //false, false);
 			}
-			q.SetMinimumNumberShouldMatch(2); // match at least two of 4
+			q.MinimumNumberShouldMatch = 2; // match at least two of 4
 			VerifyNrHits(q, 2);
 		}
 		
@@ -142,7 +142,7 @@ namespace Lucene.Net.Search
 			q.Add(new TermQuery(new Term("data", "4")), Occur.SHOULD); //false, false);
 			q.Add(new TermQuery(new Term("data", "3")), Occur.SHOULD); //false, false);
 			
-			q.SetMinimumNumberShouldMatch(2); // 2 of 3 optional 
+			q.MinimumNumberShouldMatch = 2; // 2 of 3 optional 
 			
 			VerifyNrHits(q, 5);
 		}
@@ -159,7 +159,7 @@ namespace Lucene.Net.Search
 			q.Add(new TermQuery(new Term("data", "4")), Occur.SHOULD); //false, false);
 			q.Add(new TermQuery(new Term("data", "3")), Occur.SHOULD); //false, false);
 			
-			q.SetMinimumNumberShouldMatch(2); // 2 of 3 optional 
+			q.MinimumNumberShouldMatch = 2; // 2 of 3 optional 
 			
 			VerifyNrHits(q, 5);
 		}
@@ -174,8 +174,8 @@ namespace Lucene.Net.Search
 			q.Add(new TermQuery(new Term("data", "2")), Occur.SHOULD); //false, false);
 			q.Add(new TermQuery(new Term("data", "3")), Occur.MUST_NOT); //false, true );
 			q.Add(new TermQuery(new Term("data", "4")), Occur.SHOULD); //false, false);
-			
-			q.SetMinimumNumberShouldMatch(2); // 2 of 3 optional 
+
+            q.MinimumNumberShouldMatch = 2; // 2 of 3 optional 
 			
 			VerifyNrHits(q, 1);
 		}
@@ -192,7 +192,7 @@ namespace Lucene.Net.Search
 			q.Add(new TermQuery(new Term("data", "4")), Occur.SHOULD); //false, false);
 			q.Add(new TermQuery(new Term("data", "C")), Occur.MUST_NOT); //false, true );
 			
-			q.SetMinimumNumberShouldMatch(2); // 2 of 3 optional 
+			q.MinimumNumberShouldMatch = 2; // 2 of 3 optional 
 			
 			VerifyNrHits(q, 1);
 		}
@@ -210,7 +210,7 @@ namespace Lucene.Net.Search
 			q.Add(new TermQuery(new Term("data", "2")), Occur.SHOULD); //false, false);
 			q.Add(new TermQuery(new Term("data", "1")), Occur.SHOULD); //false, false);
 			
-			q.SetMinimumNumberShouldMatch(3); // 3 of 4 optional 
+			q.MinimumNumberShouldMatch = 3; // 3 of 4 optional 
 			
 			VerifyNrHits(q, 1);
 		}
@@ -229,7 +229,7 @@ namespace Lucene.Net.Search
 			q.Add(new TermQuery(new Term("data", "2")), Occur.SHOULD); //false, false);
 			q.Add(new TermQuery(new Term("data", "1")), Occur.SHOULD); //false, false);
 			
-			q.SetMinimumNumberShouldMatch(3); // 3 of 4 optional 
+			q.MinimumNumberShouldMatch = 3; // 3 of 4 optional 
 			
 			VerifyNrHits(q, 1);
 		}
@@ -248,7 +248,7 @@ namespace Lucene.Net.Search
 			q.Add(new TermQuery(new Term("data", "1")), Occur.SHOULD); //false, false);
 			q.Add(new TermQuery(new Term("data", "C")), Occur.MUST_NOT); //false, true );
 			
-			q.SetMinimumNumberShouldMatch(3); // 3 of 4 optional 
+			q.MinimumNumberShouldMatch = 3; // 3 of 4 optional 
 			
 			VerifyNrHits(q, 1);
 		}
@@ -267,8 +267,8 @@ namespace Lucene.Net.Search
 			q.Add(new TermQuery(new Term("data", "2")), Occur.SHOULD); //false, false);
 			q.Add(new TermQuery(new Term("data", "1")), Occur.SHOULD); //false, false);
 			q.Add(new TermQuery(new Term("data", "C")), Occur.MUST_NOT); //false, true );
-			
-			q.SetMinimumNumberShouldMatch(3); // 3 of 4 optional 
+
+            q.MinimumNumberShouldMatch = 3; // 3 of 4 optional 
 			
 			VerifyNrHits(q, 1);
 		}
@@ -287,8 +287,8 @@ namespace Lucene.Net.Search
 			q.Add(new TermQuery(new Term("data", "2")), Occur.SHOULD); //false, false);
 			q.Add(new TermQuery(new Term("data", "1")), Occur.SHOULD); //false, false);
 			q.Add(new TermQuery(new Term("data", "C")), Occur.MUST_NOT); //false, true );
-			
-			q.SetMinimumNumberShouldMatch(90); // 90 of 4 optional ?!?!?!
+
+            q.MinimumNumberShouldMatch = 90; // 90 of 4 optional ?!?!?!
 			
 			VerifyNrHits(q, 0);
 		}
@@ -304,7 +304,7 @@ namespace Lucene.Net.Search
 			q.Add(new TermQuery(new Term("data", "3")), Occur.MUST); //true,  false);
 			q.Add(new TermQuery(new Term("data", "2")), Occur.SHOULD); //false, false);
 			
-			q.SetMinimumNumberShouldMatch(2); // 2 of 2 optional 
+			q.MinimumNumberShouldMatch = 2; // 2 of 2 optional 
 			
 			VerifyNrHits(q, 1);
 		}
@@ -319,7 +319,7 @@ namespace Lucene.Net.Search
 			q.Add(new TermQuery(new Term("data", "3")), Occur.SHOULD); //false, false);
 			q.Add(new TermQuery(new Term("data", "2")), Occur.MUST); //true,  false);
 			
-			q.SetMinimumNumberShouldMatch(1); // 1 of 1 optional 
+			q.MinimumNumberShouldMatch = 1; // 1 of 1 optional 
 			
 			VerifyNrHits(q, 1);
 		}
@@ -333,7 +333,7 @@ namespace Lucene.Net.Search
 			q.Add(new TermQuery(new Term("all", "all")), Occur.MUST); //true,  false);
 			q.Add(new TermQuery(new Term("data", "2")), Occur.MUST); //true,  false);
 			
-			q.SetMinimumNumberShouldMatch(1); // 1 of 0 optional 
+			q.MinimumNumberShouldMatch = 1; // 1 of 0 optional 
 			
 			VerifyNrHits(q, 0);
 		}
@@ -346,7 +346,7 @@ namespace Lucene.Net.Search
 			BooleanQuery q = new BooleanQuery();
 			q.Add(new TermQuery(new Term("all", "all")), Occur.MUST); //true,  false);
 			
-			q.SetMinimumNumberShouldMatch(1); // 1 of 0 optional 
+			q.MinimumNumberShouldMatch = 1; // 1 of 0 optional 
 			
 			VerifyNrHits(q, 0);
 		}

Modified: incubator/lucene.net/trunk/test/core/Search/TestComplexExplanations.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Search/TestComplexExplanations.cs?rev=1363077&r1=1363076&r2=1363077&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Search/TestComplexExplanations.cs (original)
+++ incubator/lucene.net/trunk/test/core/Search/TestComplexExplanations.cs Wed Jul 18 19:55:17
2012
@@ -97,7 +97,7 @@ namespace Lucene.Net.Search
 			q.Add(dm, Occur.SHOULD);
 			
 			BooleanQuery b = new BooleanQuery();
-			b.SetMinimumNumberShouldMatch(2);
+			b.MinimumNumberShouldMatch = 2;
 			b.Add(Snear("w1", "w2", 1, true), Occur.SHOULD);
 			b.Add(Snear("w2", "w3", 1, true), Occur.SHOULD);
 			b.Add(Snear("w1", "w3", 3, true), Occur.SHOULD);
@@ -140,7 +140,7 @@ namespace Lucene.Net.Search
 			q.Add(dm, Occur.SHOULD);
 			
 			BooleanQuery b = new BooleanQuery();
-			b.SetMinimumNumberShouldMatch(2);
+			b.MinimumNumberShouldMatch = 2;
 			b.Add(Snear("w1", "w2", 1, true), Occur.SHOULD);
 			b.Add(Snear("w2", "w3", 1, true), Occur.SHOULD);
 			b.Add(Snear("w1", "w3", 3, true), Occur.SHOULD);

Modified: incubator/lucene.net/trunk/test/core/Search/TestSimpleExplanations.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Search/TestSimpleExplanations.cs?rev=1363077&r1=1363076&r2=1363077&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Search/TestSimpleExplanations.cs (original)
+++ incubator/lucene.net/trunk/test/core/Search/TestSimpleExplanations.cs Wed Jul 18 19:55:17
2012
@@ -390,7 +390,7 @@ namespace Lucene.Net.Search
 		public virtual void  TestBQ20()
 		{
 			BooleanQuery q = new BooleanQuery();
-			q.SetMinimumNumberShouldMatch(2);
+			q.MinimumNumberShouldMatch = 2;
 			q.Add(qp.Parse("QQQQQ"), Occur.SHOULD);
 			q.Add(qp.Parse("yy"), Occur.SHOULD);
 			q.Add(qp.Parse("zz"), Occur.SHOULD);

Modified: incubator/lucene.net/trunk/test/core/Search/TestSort.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Search/TestSort.cs?rev=1363077&r1=1363076&r2=1363077&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Search/TestSort.cs (original)
+++ incubator/lucene.net/trunk/test/core/Search/TestSort.cs Wed Jul 18 19:55:17 2012
@@ -1083,7 +1083,7 @@ namespace Lucene.Net.Search
 			bq.Add(new MatchAllDocsQuery(), Occur.SHOULD);
 			// Set minNrShouldMatch to 1 so that BQ will not optimize rewrite to return
 			// the clause instead of BQ.
-			bq.SetMinimumNumberShouldMatch(1);
+			bq.MinimumNumberShouldMatch = 1;
 
             for (int i = 0; i < sort.Length; i++)
             {

Modified: incubator/lucene.net/trunk/test/core/Search/TestTopScoreDocCollector.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/test/core/Search/TestTopScoreDocCollector.cs?rev=1363077&r1=1363076&r2=1363077&view=diff
==============================================================================
--- incubator/lucene.net/trunk/test/core/Search/TestTopScoreDocCollector.cs (original)
+++ incubator/lucene.net/trunk/test/core/Search/TestTopScoreDocCollector.cs Wed Jul 18 19:55:17
2012
@@ -65,7 +65,7 @@ namespace Lucene.Net.Search
             bq.Add(new MatchAllDocsQuery(), Occur.SHOULD);
             // Set minNrShouldMatch to 1 so that BQ will not optimize rewrite to return
             // the clause instead of BQ.
-            bq.SetMinimumNumberShouldMatch(1);
+            bq.MinimumNumberShouldMatch = 1;
             IndexSearcher searcher = new IndexSearcher(dir, true);
             for (int i = 0; i < inOrder.Length; i++)
             {



Mime
View raw message