lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r1059418 - /lucene/lucene.net/trunk/C#/src/Lucene.Net/Search/Spans/SpanOrQuery.cs
Date Sat, 15 Jan 2011 21:49:43 GMT
Author: digy
Date: Sat Jan 15 21:49:43 2011
New Revision: 1059418

URL: http://svn.apache.org/viewvc?rev=1059418&view=rev
Log:
[LUCENENET-376] (trunk) Ver.2.9.2 SpanOrQuery.ToString() bug

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

Modified: lucene/lucene.net/trunk/C#/src/Lucene.Net/Search/Spans/SpanOrQuery.cs
URL: http://svn.apache.org/viewvc/lucene/lucene.net/trunk/C%23/src/Lucene.Net/Search/Spans/SpanOrQuery.cs?rev=1059418&r1=1059417&r2=1059418&view=diff
==============================================================================
--- lucene/lucene.net/trunk/C#/src/Lucene.Net/Search/Spans/SpanOrQuery.cs (original)
+++ lucene/lucene.net/trunk/C#/src/Lucene.Net/Search/Spans/SpanOrQuery.cs Sat Jan 15 21:49:43
2011
@@ -270,14 +270,16 @@ namespace Lucene.Net.Search.Spans
 			System.Text.StringBuilder buffer = new System.Text.StringBuilder();
 			buffer.Append("spanOr([");
 			System.Collections.IEnumerator i = clauses.GetEnumerator();
+            int j = 0;
 			while (i.MoveNext())
 			{
+                j++;
 				SpanQuery clause = (SpanQuery) i.Current;
 				buffer.Append(clause.ToString(field));
-				if (i.MoveNext())
-				{
-					buffer.Append(", ");
-				}
+                if (j < clauses.Count)
+                {
+                    buffer.Append(", ");
+                }
 			}
 			buffer.Append("])");
 			buffer.Append(ToStringUtils.Boost(GetBoost()));



Mime
View raw message