lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Piotr Dobrowolski (JIRA)" <j...@apache.org>
Subject [jira] Created: (LUCENENET-12) Multisearcher - CreateWieght null exception
Date Sat, 05 Aug 2006 14:53:15 GMT
Multisearcher - CreateWieght null exception
-------------------------------------------

                 Key: LUCENENET-12
                 URL: http://issues.apache.org/jira/browse/LUCENENET-12
             Project: Lucene.Net
          Issue Type: Bug
            Reporter: Piotr Dobrowolski


There is a bug in CreateWieght method.

System.Collections.IEnumerator e = terms.GetEnumerator();
while (e.MoveNext())
      allTermsArray[index++] = e.Current as Term;

Enumerator returns KeyValuePairs, not terms so all elements of resulting array are null. This
code should probably look like this:

System.Collections.IEnumerator e = terms.Keys.GetEnumerator();
            while (e.MoveNext())
                allTermsArray[index++] = e.Current as Term;

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message