You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by "Iliev Andrei (JIRA)" <ji...@apache.org> on 2008/08/25 19:11:44 UTC

[jira] Created: (LUCENENET-146) BUG in segmenttermpositionvector.cs (similar to LUCENENET-145)

BUG in segmenttermpositionvector.cs (similar to LUCENENET-145)
--------------------------------------------------------------

                 Key: LUCENENET-146
                 URL: https://issues.apache.org/jira/browse/LUCENENET-146
             Project: Lucene.Net
          Issue Type: Bug
            Reporter: Iliev Andrei
            Priority: Critical


Bad conversion from java source code (see  LUCENENET-145). For multiple dimention array .length in java returns the number of dimensions. In c# .Length - returns the total number of elements in all dimensions.

Class SegmentTermPositionVector : SegmentTermVector, TermPositionVector

protected internal TermVectorOffsetInfo[][] offsets; //<-2 dim array
1) public virtual TermVectorOffsetInfo[] GetOffsets(int index)
wrong:
if (index >= 0 && index < offsets.Length)
correct:
if (index >= 0 && index < offsets.GetLength(0))
2) public virtual int[] GetTermPositions(int index)
wrong code:
if (index >= 0 && index < positions.Length)
correct:
if (index >= 0 && index < positions.GetLength(0))


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (LUCENENET-146) BUG in segmenttermpositionvector.cs (similar to LUCENENET-145)

Posted by "Iliev Andrei (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENENET-146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Iliev Andrei resolved LUCENENET-146.
------------------------------------

    Resolution: Fixed

see the patch

> BUG in segmenttermpositionvector.cs (similar to LUCENENET-145)
> --------------------------------------------------------------
>
>                 Key: LUCENENET-146
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-146
>             Project: Lucene.Net
>          Issue Type: Bug
>            Reporter: Iliev Andrei
>            Priority: Critical
>         Attachments: SegmentTermPositionVector.patch
>
>   Original Estimate: 0.17h
>  Remaining Estimate: 0.17h
>
> Bad conversion from java source code (see  LUCENENET-145). For multiple dimention array .length in java returns the number of dimensions. In c# .Length - returns the total number of elements in all dimensions.
> Class SegmentTermPositionVector : SegmentTermVector, TermPositionVector
> protected internal TermVectorOffsetInfo[][] offsets; //<-2 dim array
> 1) public virtual TermVectorOffsetInfo[] GetOffsets(int index)
> wrong:
> if (index >= 0 && index < offsets.Length)
> correct:
> if (index >= 0 && index < offsets.GetLength(0))
> 2) public virtual int[] GetTermPositions(int index)
> wrong code:
> if (index >= 0 && index < positions.Length)
> correct:
> if (index >= 0 && index < positions.GetLength(0))

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (LUCENENET-146) BUG in segmenttermpositionvector.cs (similar to LUCENENET-145)

Posted by "Iliev Andrei (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENENET-146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Iliev Andrei closed LUCENENET-146.
----------------------------------


> BUG in segmenttermpositionvector.cs (similar to LUCENENET-145)
> --------------------------------------------------------------
>
>                 Key: LUCENENET-146
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-146
>             Project: Lucene.Net
>          Issue Type: Bug
>            Reporter: Iliev Andrei
>            Priority: Critical
>         Attachments: SegmentTermPositionVector.patch
>
>   Original Estimate: 0.17h
>  Remaining Estimate: 0.17h
>
> Bad conversion from java source code (see  LUCENENET-145). For multiple dimention array .length in java returns the number of dimensions. In c# .Length - returns the total number of elements in all dimensions.
> Class SegmentTermPositionVector : SegmentTermVector, TermPositionVector
> protected internal TermVectorOffsetInfo[][] offsets; //<-2 dim array
> 1) public virtual TermVectorOffsetInfo[] GetOffsets(int index)
> wrong:
> if (index >= 0 && index < offsets.Length)
> correct:
> if (index >= 0 && index < offsets.GetLength(0))
> 2) public virtual int[] GetTermPositions(int index)
> wrong code:
> if (index >= 0 && index < positions.Length)
> correct:
> if (index >= 0 && index < positions.GetLength(0))

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (LUCENENET-146) BUG in segmenttermpositionvector.cs (similar to LUCENENET-145)

Posted by "Digy (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENENET-146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12647966#action_12647966 ] 

Digy commented on LUCENENET-146:
--------------------------------

Patch applied.
DIGY

> BUG in segmenttermpositionvector.cs (similar to LUCENENET-145)
> --------------------------------------------------------------
>
>                 Key: LUCENENET-146
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-146
>             Project: Lucene.Net
>          Issue Type: Bug
>            Reporter: Iliev Andrei
>            Priority: Critical
>         Attachments: SegmentTermPositionVector.patch
>
>   Original Estimate: 0.17h
>  Remaining Estimate: 0.17h
>
> Bad conversion from java source code (see  LUCENENET-145). For multiple dimention array .length in java returns the number of dimensions. In c# .Length - returns the total number of elements in all dimensions.
> Class SegmentTermPositionVector : SegmentTermVector, TermPositionVector
> protected internal TermVectorOffsetInfo[][] offsets; //<-2 dim array
> 1) public virtual TermVectorOffsetInfo[] GetOffsets(int index)
> wrong:
> if (index >= 0 && index < offsets.Length)
> correct:
> if (index >= 0 && index < offsets.GetLength(0))
> 2) public virtual int[] GetTermPositions(int index)
> wrong code:
> if (index >= 0 && index < positions.Length)
> correct:
> if (index >= 0 && index < positions.GetLength(0))

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (LUCENENET-146) BUG in segmenttermpositionvector.cs (similar to LUCENENET-145)

Posted by "Iliev Andrei (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/LUCENENET-146?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Iliev Andrei updated LUCENENET-146:
-----------------------------------

    Attachment: SegmentTermPositionVector.patch

Patch  for SegmentTermPositionVector.cs  attached

> BUG in segmenttermpositionvector.cs (similar to LUCENENET-145)
> --------------------------------------------------------------
>
>                 Key: LUCENENET-146
>                 URL: https://issues.apache.org/jira/browse/LUCENENET-146
>             Project: Lucene.Net
>          Issue Type: Bug
>            Reporter: Iliev Andrei
>            Priority: Critical
>         Attachments: SegmentTermPositionVector.patch
>
>   Original Estimate: 0.17h
>  Remaining Estimate: 0.17h
>
> Bad conversion from java source code (see  LUCENENET-145). For multiple dimention array .length in java returns the number of dimensions. In c# .Length - returns the total number of elements in all dimensions.
> Class SegmentTermPositionVector : SegmentTermVector, TermPositionVector
> protected internal TermVectorOffsetInfo[][] offsets; //<-2 dim array
> 1) public virtual TermVectorOffsetInfo[] GetOffsets(int index)
> wrong:
> if (index >= 0 && index < offsets.Length)
> correct:
> if (index >= 0 && index < offsets.GetLength(0))
> 2) public virtual int[] GetTermPositions(int index)
> wrong code:
> if (index >= 0 && index < positions.Length)
> correct:
> if (index >= 0 && index < positions.GetLength(0))

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.