lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r718036 - in /incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Spans: SpanNearQuery.cs SpanOrQuery.cs
Date Sun, 16 Nov 2008 14:26:54 GMT
Author: digy
Date: Sun Nov 16 06:26:54 2008
New Revision: 718036

URL: http://svn.apache.org/viewvc?rev=718036&view=rev
Log:
LUCENENET-159 (Lucene.Net.Search.Spans.SpanOrQuery)

Modified:
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Spans/SpanNearQuery.cs
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Spans/SpanOrQuery.cs

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Spans/SpanNearQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/Spans/SpanNearQuery.cs?rev=718036&r1=718035&r2=718036&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Spans/SpanNearQuery.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Spans/SpanNearQuery.cs Sun Nov 16
06:26:54 2008
@@ -126,11 +126,9 @@
 			{
 				SpanQuery clause = (SpanQuery) i.Current;
 				buffer.Append(clause.ToString(field));
-				if (i.MoveNext())
-				{
-					buffer.Append(", ");
-				}
+				buffer.Append(", ");
 			}
+            if (clauses.Count > 0) buffer.Length -= 2;
 			buffer.Append("], ");
 			buffer.Append(slop);
 			buffer.Append(", ");
@@ -221,4 +219,4 @@
 			return (int) result;
 		}
 	}
-}
\ No newline at end of file
+}

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Spans/SpanOrQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/Spans/SpanOrQuery.cs?rev=718036&r1=718035&r2=718036&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Spans/SpanOrQuery.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Spans/SpanOrQuery.cs Sun Nov 16 06:26:54
2008
@@ -233,11 +233,9 @@
 			{
 				SpanQuery clause = (SpanQuery) i.Current;
 				buffer.Append(clause.ToString(field));
-				if (i.MoveNext())
-				{
-					buffer.Append(", ");
-				}
+				buffer.Append(", ");
 			}
+            if(clauses.Count>0) buffer.Length -= 2;
 			buffer.Append("])");
 			buffer.Append(ToStringUtils.Boost(GetBoost()));
 			return buffer.ToString();
@@ -321,4 +319,4 @@
 			return new AnonymousClassSpans(reader, this);
 		}
 	}
-}
\ No newline at end of file
+}



Mime
View raw message