You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by di...@apache.org on 2011/04/25 18:17:38 UTC
[Lucene.Net] svn commit: r1096507 [3/3] - in
/incubator/lucene.net/branches/Lucene.Net_2_9_4g: src/core/
src/core/Document/ src/core/Index/ src/core/Search/
src/core/Search/Function/ src/core/Search/Payloads/ src/core/Search/Spans/
src/core/Store/ src/core/Util/ te...
Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestSegmentReader.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestSegmentReader.cs?rev=1096507&r1=1096506&r2=1096507&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestSegmentReader.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestSegmentReader.cs Mon Apr 25 16:17:36 2011
@@ -79,7 +79,7 @@ namespace Lucene.Net.Index
//There are 2 unstored fields on the document that are not preserved across writing
Assert.IsTrue(DocHelper.NumFields(result) == DocHelper.NumFields(testDoc) - DocHelper.unstored.Count);
- System.Collections.IList fields = result.GetFields();
+ System.Collections.Generic.IList<Fieldable> fields = result.GetFields();
for (System.Collections.IEnumerator iter = fields.GetEnumerator(); iter.MoveNext(); )
{
Fieldable field = (Fieldable) iter.Current;
Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestStressIndexing2.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestStressIndexing2.cs?rev=1096507&r1=1096506&r2=1096507&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestStressIndexing2.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Index/TestStressIndexing2.cs Mon Apr 25 16:17:36 2011
@@ -33,13 +33,13 @@ namespace Lucene.Net.Index
[TestFixture]
public class TestStressIndexing2:LuceneTestCase
{
- internal class AnonymousClassComparator : System.Collections.IComparer
+ internal class AnonymousClassComparator : System.Collections.Generic.IComparer<Fieldable>
{
- public virtual int Compare(System.Object o1, System.Object o2)
- {
- return String.CompareOrdinal(((Fieldable) o1).Name(), ((Fieldable) o2).Name());
- }
- }
+ public int Compare(Fieldable x, Fieldable y)
+ {
+ return String.CompareOrdinal(x.Name(),y.Name());
+ }
+ }
internal static int maxFields = 4;
internal static int bigFieldSize = 10;
internal static bool sameFieldOrder = false;
@@ -142,7 +142,7 @@ namespace Lucene.Net.Index
internal static Term idTerm = new Term("id", "");
internal IndexingThread[] threads;
- internal static System.Collections.IComparer fieldNameComparator;
+ internal static System.Collections.Generic.IComparer<Fieldable> fieldNameComparator;
// This test avoids using any extra synchronization in the multiple
// indexing threads to test that IndexWriter does correctly synchronize
@@ -276,7 +276,7 @@ namespace Lucene.Net.Index
while (iter.MoveNext())
{
Document d = (Document) iter.Current;
- System.Collections.ArrayList fields = new System.Collections.ArrayList();
+ System.Collections.Generic.List<Fieldable> fields = new System.Collections.Generic.List<Fieldable>();
fields.AddRange(d.GetFields());
// put fields in same order each time
//{{Lucene.Net-2.9.1}} No, don't change the order of the fields
@@ -475,8 +475,8 @@ namespace Lucene.Net.Index
public static void VerifyEquals(Document d1, Document d2)
{
- System.Collections.IList ff1 = d1.GetFields();
- System.Collections.IList ff2 = d2.GetFields();
+ System.Collections.Generic.IList<Lucene.Net.Documents.Fieldable> ff1 = d1.GetFields();
+ System.Collections.Generic.IList<Lucene.Net.Documents.Fieldable> ff2 = d2.GetFields();
SupportClass.CollectionsHelper.Sort(ff1, fieldNameComparator);
SupportClass.CollectionsHelper.Sort(ff2, fieldNameComparator);
@@ -672,8 +672,8 @@ namespace Lucene.Net.Index
public virtual void IndexDoc()
{
Document d = new Document();
-
- System.Collections.ArrayList fields = new System.Collections.ArrayList();
+
+ System.Collections.Generic.IList<Fieldable> fields = new System.Collections.Generic.List<Fieldable>();
System.String idString = GetIdString();
Field idField = new Field(Lucene.Net.Index.TestStressIndexing2.idTerm.Field(), idString, Field.Store.YES, Field.Index.NOT_ANALYZED_NO_NORMS);
fields.Add(idField);
Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/Payloads/TestPayloadNearQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/Payloads/TestPayloadNearQuery.cs?rev=1096507&r1=1096506&r2=1096507&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/Payloads/TestPayloadNearQuery.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/Payloads/TestPayloadNearQuery.cs Mon Apr 25 16:17:36 2011
@@ -320,7 +320,7 @@ namespace Lucene.Net.Search.Payloads
return 1;
}
// idf used for phrase queries
- public override float Idf(System.Collections.ICollection terms, Searcher searcher)
+ public override float Idf(System.Collections.Generic.IList<Term> terms, Searcher searcher)
{
return 1;
}
Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/Spans/TestFieldMaskingSpanQuery.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/Spans/TestFieldMaskingSpanQuery.cs?rev=1096507&r1=1096506&r2=1096507&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/Spans/TestFieldMaskingSpanQuery.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/Spans/TestFieldMaskingSpanQuery.cs Mon Apr 25 16:17:36 2011
@@ -151,7 +151,7 @@ namespace Lucene.Net.Search.Spans
QueryUtils.CheckEqual(q, qr);
- System.Collections.Hashtable set_Renamed = new System.Collections.Hashtable();
+ SupportClass.Set<Term> set_Renamed = new SupportClass.Set<Term>();
qr.ExtractTerms(set_Renamed);
Assert.AreEqual(2, set_Renamed.Count);
}
Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestSimilarity.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestSimilarity.cs?rev=1096507&r1=1096506&r2=1096507&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestSimilarity.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestSimilarity.cs Mon Apr 25 16:17:36 2011
@@ -209,7 +209,7 @@ namespace Lucene.Net.Search
{
return 2.0f;
}
- public override float Idf(System.Collections.ICollection terms, Searcher searcher)
+ public override float Idf(System.Collections.Generic.IList<Term> terms, Searcher searcher)
{
return 1.0f;
}
Modified: incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestThreadSafe.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestThreadSafe.cs?rev=1096507&r1=1096506&r2=1096507&view=diff
==============================================================================
--- incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestThreadSafe.cs (original)
+++ incubator/lucene.net/branches/Lucene.Net_2_9_4g/test/core/Search/TestThreadSafe.cs Mon Apr 25 16:17:36 2011
@@ -136,8 +136,8 @@ namespace Lucene.Net.Search
{
// beware of deleted docs in the future
Document doc = ir.Document(rand.Next(ir.MaxDoc()), new AnonymousClassFieldSelector(this));
-
- System.Collections.IList fields = doc.GetFields();
+
+ System.Collections.Generic.IList<Fieldable> fields = doc.GetFields();
for (int i = 0; i < fields.Count; i++)
{
Fieldable f = (Fieldable) fields[i];