lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aro...@apache.org
Subject svn commit: r418911 - /incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/ParallelReader.cs
Date Tue, 04 Jul 2006 04:18:15 GMT
Author: aroush
Date: Mon Jul  3 21:18:12 2006
New Revision: 418911

URL: http://svn.apache.org/viewvc?rev=418911&view=rev
Log: (empty)

Modified:
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/ParallelReader.cs

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/ParallelReader.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Index/ParallelReader.cs?rev=418911&r1=418910&r2=418911&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/ParallelReader.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/ParallelReader.cs Mon Jul  3 21:18:12
2006
@@ -271,11 +271,13 @@
 			{
 				IndexReader reader = ((IndexReader) readers[i]);
 				System.Collections.ICollection names = reader.GetFieldNames(indexed);
-                foreach (object item in names)
+                for (System.Collections.IEnumerator iterator = names.GetEnumerator(); iterator.MoveNext();
)
                 {
-                    if (fieldSet.ContainsKey(item) == false)
+                    System.Collections.DictionaryEntry fi = (System.Collections.DictionaryEntry)
iterator.Current;
+                    System.String s = fi.Key.ToString();
+                    if (fieldSet.ContainsKey(s) == false)
                     {
-                        fieldSet.Add(item, item);
+                        fieldSet.Add(s, s);
                     }
                 }
 			}
@@ -289,11 +291,13 @@
 			{
 				IndexReader reader = ((IndexReader) readers[i]);
 				System.Collections.ICollection names = reader.GetIndexedFieldNames(tvSpec);
-                foreach (object item in names)
+                for (System.Collections.IEnumerator iterator = names.GetEnumerator(); iterator.MoveNext();
)
                 {
-                    if (fieldSet.ContainsKey(item) == false)
+                    System.Collections.DictionaryEntry fi = (System.Collections.DictionaryEntry)
iterator.Current;
+                    System.String s = fi.Key.ToString();
+                    if (fieldSet.ContainsKey(s) == false)
                     {
-                        fieldSet.Add(item, item);
+                        fieldSet.Add(s, s);
                     }
                 }
             }
@@ -302,20 +306,22 @@
 		
 		public override System.Collections.ICollection GetFieldNames(IndexReader.FieldOption fieldNames)
 		{
-			System.Collections.Hashtable fieldSet = new System.Collections.Hashtable();
-			for (int i = 0; i < readers.Count; i++)
-			{
-				IndexReader reader = ((IndexReader) readers[i]);
-				System.Collections.ICollection names = reader.GetFieldNames(fieldNames);
-                foreach (object item in names)
+            System.Collections.Hashtable fieldSet = new System.Collections.Hashtable();
+            for (int i = 0; i < readers.Count; i++)
+            {
+                IndexReader reader = ((IndexReader) readers[i]);
+                System.Collections.ICollection names = reader.GetFieldNames(fieldNames);
+                for (System.Collections.IEnumerator iterator = names.GetEnumerator(); iterator.MoveNext();
)
                 {
-                    if (fieldSet.ContainsKey(item) == false)
+                    System.Collections.DictionaryEntry fi = (System.Collections.DictionaryEntry)
iterator.Current;
+                    System.String s = fi.Key.ToString();
+                    if (fieldSet.ContainsKey(s) == false)
                     {
-                        fieldSet.Add(item, item);
+                        fieldSet.Add(s, s);
                     }
                 }
             }
-			return fieldSet;
+            return fieldSet;
 		}
 		
 		private class ParallelTermEnum : TermEnum



Mime
View raw message