lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aro...@apache.org
Subject svn commit: r439676 - /incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Spans/SpanWeight.cs
Date Sat, 02 Sep 2006 22:30:36 GMT
Author: aroush
Date: Sat Sep  2 15:30:36 2006
New Revision: 439676

URL: http://svn.apache.org/viewvc?rev=439676&view=rev
Log:
Must move elements in Hashtable to ArrayList before passing the collection to the Idf() function.

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

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Spans/SpanWeight.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Search/Spans/SpanWeight.cs?rev=439676&r1=439675&r2=439676&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Spans/SpanWeight.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Spans/SpanWeight.cs Sat Sep  2 15:30:36
2006
@@ -46,7 +46,9 @@
             terms = new System.Collections.Hashtable();
             query.ExtractTerms(terms);
 			
-			idf = this.query.GetSimilarity(searcher).Idf(terms, searcher);
+            System.Collections.ArrayList tmp = new System.Collections.ArrayList(terms.Values);
+
+			idf = this.query.GetSimilarity(searcher).Idf(tmp, searcher);
 		}
 		
 		public virtual Query GetQuery()
@@ -87,7 +89,8 @@
 			System.Collections.IEnumerator i = terms.GetEnumerator();
 			while (i.MoveNext())
 			{
-				Term term = (Term) i.Current;
+                System.Collections.DictionaryEntry tmp = (System.Collections.DictionaryEntry)
i.Current;
+				Term term = (Term) tmp.Key;
 				docFreqs.Append(term.Text());
 				docFreqs.Append("=");
 				docFreqs.Append(reader.DocFreq(term));



Mime
View raw message