lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject svn commit: r1375265 - in /incubator/lucene.net/trunk/src: contrib/Spatial/Queries/SpatialArgs.cs contrib/Spatial/Queries/UnsupportedSpatialOperation.cs core/Search/ConstantScoreQuery.cs
Date Mon, 20 Aug 2012 21:54:52 GMT
Author: synhershko
Date: Mon Aug 20 21:54:52 2012
New Revision: 1375265

URL: http://svn.apache.org/viewvc?rev=1375265&view=rev
Log:
Minor

Modified:
    incubator/lucene.net/trunk/src/contrib/Spatial/Queries/SpatialArgs.cs
    incubator/lucene.net/trunk/src/contrib/Spatial/Queries/UnsupportedSpatialOperation.cs
    incubator/lucene.net/trunk/src/core/Search/ConstantScoreQuery.cs

Modified: incubator/lucene.net/trunk/src/contrib/Spatial/Queries/SpatialArgs.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/contrib/Spatial/Queries/SpatialArgs.cs?rev=1375265&r1=1375264&r2=1375265&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/contrib/Spatial/Queries/SpatialArgs.cs (original)
+++ incubator/lucene.net/trunk/src/contrib/Spatial/Queries/SpatialArgs.cs Mon Aug 20 21:54:52
2012
@@ -17,12 +17,12 @@
 
 using System;
 using System.Text;
-using Spatial4n.Core.Context;
 using Spatial4n.Core.Exceptions;
 using Spatial4n.Core.Shapes;
 
 namespace Spatial4n.Core.Exceptions
 {
+	[Serializable]
 	public class InvalidSpatialArgument : ArgumentException
 	{
 		public InvalidSpatialArgument(String reason)

Modified: incubator/lucene.net/trunk/src/contrib/Spatial/Queries/UnsupportedSpatialOperation.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/contrib/Spatial/Queries/UnsupportedSpatialOperation.cs?rev=1375265&r1=1375264&r2=1375265&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/contrib/Spatial/Queries/UnsupportedSpatialOperation.cs
(original)
+++ incubator/lucene.net/trunk/src/contrib/Spatial/Queries/UnsupportedSpatialOperation.cs
Mon Aug 20 21:54:52 2012
@@ -19,6 +19,7 @@ using System;
 
 namespace Lucene.Net.Spatial.Queries
 {
+	[Serializable]
 	public class UnsupportedSpatialOperation : InvalidOperationException
 	{
 		public UnsupportedSpatialOperation(SpatialOperation op) : base(op.GetName())

Modified: incubator/lucene.net/trunk/src/core/Search/ConstantScoreQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Search/ConstantScoreQuery.cs?rev=1375265&r1=1375264&r2=1375265&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Search/ConstantScoreQuery.cs (original)
+++ incubator/lucene.net/trunk/src/core/Search/ConstantScoreQuery.cs Mon Aug 20 21:54:52 2012
@@ -68,7 +68,7 @@ namespace Lucene.Net.Search
 				}
 				
 			}
-			private Similarity similarity;
+			private readonly Similarity similarity;
 			private float queryNorm;
 			private float queryWeight;
 			
@@ -108,10 +108,10 @@ namespace Lucene.Net.Search
 			public override Explanation Explain(IndexReader reader, int doc)
 			{
 				
-				ConstantScorer cs = new ConstantScorer(enclosingInstance, similarity, reader, this);
+				var cs = new ConstantScorer(enclosingInstance, similarity, reader, this);
 				bool exists = cs.docIdSetIterator.Advance(doc) == doc;
 				
-				ComplexExplanation result = new ComplexExplanation();
+				var result = new ComplexExplanation();
 				
 				if (exists)
 				{
@@ -202,9 +202,9 @@ namespace Lucene.Net.Search
 		}
 		
 		/// <summary>Prints a user-readable version of this query. </summary>
-		public override System.String ToString(System.String field)
+		public override System.String ToString(string field)
 		{
-			return "ConstantScore(" + internalFilter.ToString() + (Boost == 1.0?")":"^" + Boost);
+			return "ConstantScore(" + internalFilter + (Boost == 1.0?")":"^" + Boost);
 		}
 		
 		/// <summary>Returns true if <c>o</c> is equal to this. </summary>



Mime
View raw message