You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by "Piotr Dobrowolski (JIRA)" <ji...@apache.org> on 2006/08/05 16:53:15 UTC

[jira] Created: (LUCENENET-12) Multisearcher - CreateWieght null exception

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

        

[jira] Closed: (LUCENENET-12) Multisearcher - CreateWieght null exception

Posted by "George Aroush (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/LUCENENET-12?page=all ]

George Aroush closed LUCENENET-12.
----------------------------------


Fixed in Lucene.Net 1.9, 1.9.1 and 2.0

> 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
>         Assigned To: George Aroush
>
> 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

        

[jira] Resolved: (LUCENENET-12) Multisearcher - CreateWieght null exception

Posted by "George Aroush (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/LUCENENET-12?page=all ]

George Aroush resolved LUCENENET-12.
------------------------------------

    Resolution: Fixed

Fixed in Lucene.Net 1.9, 1.9.1 and 2.0

> 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
>         Assigned To: George Aroush
>
> 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

        

[jira] Commented: (LUCENENET-12) Multisearcher - CreateWieght null exception

Posted by "Ivan Gu?vinec (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/LUCENENET-12?page=comments#action_12428364 ] 
            
Ivan Gu?vinec commented on LUCENENET-12:
----------------------------------------

A patch attached to LUCENENET-13 also includes changes to MultiSearcher.CreateWeight()

> 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

        

[jira] Assigned: (LUCENENET-12) Multisearcher - CreateWieght null exception

Posted by "George Aroush (JIRA)" <ji...@apache.org>.
     [ http://issues.apache.org/jira/browse/LUCENENET-12?page=all ]

George Aroush reassigned LUCENENET-12:
--------------------------------------

    Assignee: George Aroush

> 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
>         Assigned To: George Aroush
>
> 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