You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ar...@apache.org on 2006/09/03 00:30:36 UTC

svn commit: r439676 - /incubator/lucene.net/trunk/C#/src/Lucene.Net/Search/Spans/SpanWeight.cs

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));