You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Robert Muir (JIRA)" <ji...@apache.org> on 2011/06/29 23:46:28 UTC

[jira] [Created] (LUCENE-3260) need a test that uses termsenum.seekExact() (which returns true), then calls next()

need a test that uses termsenum.seekExact() (which returns true), then calls next()
-----------------------------------------------------------------------------------

                 Key: LUCENE-3260
                 URL: https://issues.apache.org/jira/browse/LUCENE-3260
             Project: Lucene - Java
          Issue Type: Bug
            Reporter: Robert Muir


i tried to do some seekExact (where the result must exist) then next()ing in the faceting module,
and it seems like there could be a bug here.

I think we should add a test that mixes seekExact/seekCeil/next like this, to ensure that
if seekExact returns true, that the enum is properly positioned.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Assigned] (LUCENE-3260) need a test that uses termsenum.seekExact() (which returns true), then calls next()

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

Michael McCandless reassigned LUCENE-3260:
------------------------------------------

    Assignee: Michael McCandless

> need a test that uses termsenum.seekExact() (which returns true), then calls next()
> -----------------------------------------------------------------------------------
>
>                 Key: LUCENE-3260
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3260
>             Project: Lucene - Java
>          Issue Type: Bug
>            Reporter: Robert Muir
>            Assignee: Michael McCandless
>
> i tried to do some seekExact (where the result must exist) then next()ing in the faceting module,
> and it seems like there could be a bug here.
> I think we should add a test that mixes seekExact/seekCeil/next like this, to ensure that
> if seekExact returns true, that the enum is properly positioned.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (LUCENE-3260) need a test that uses termsenum.seekExact() (which returns true), then calls next()

Posted by "Shai Erera (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13057596#comment-13057596 ] 

Shai Erera commented on LUCENE-3260:
------------------------------------

Patch looks good Mike.

One minor comment, atLeast(200) means we'll always run at least 200 iterations. Did you do it only for capturing the bug? Robert and Simon have done a great job at speeding up tests, so perhaps we should have a lower value, like 10 here?

> need a test that uses termsenum.seekExact() (which returns true), then calls next()
> -----------------------------------------------------------------------------------
>
>                 Key: LUCENE-3260
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3260
>             Project: Lucene - Java
>          Issue Type: Bug
>            Reporter: Robert Muir
>            Assignee: Michael McCandless
>         Attachments: LUCENE-3260.patch
>
>
> i tried to do some seekExact (where the result must exist) then next()ing in the faceting module,
> and it seems like there could be a bug here.
> I think we should add a test that mixes seekExact/seekCeil/next like this, to ensure that
> if seekExact returns true, that the enum is properly positioned.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (LUCENE-3260) need a test that uses termsenum.seekExact() (which returns true), then calls next()

Posted by "Shai Erera (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13057896#comment-13057896 ] 

Shai Erera commented on LUCENE-3260:
------------------------------------

I see. Thanks for the clarification. +1 to commit.

> need a test that uses termsenum.seekExact() (which returns true), then calls next()
> -----------------------------------------------------------------------------------
>
>                 Key: LUCENE-3260
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3260
>             Project: Lucene - Java
>          Issue Type: Bug
>            Reporter: Robert Muir
>            Assignee: Michael McCandless
>         Attachments: LUCENE-3260.patch
>
>
> i tried to do some seekExact (where the result must exist) then next()ing in the faceting module,
> and it seems like there could be a bug here.
> I think we should add a test that mixes seekExact/seekCeil/next like this, to ensure that
> if seekExact returns true, that the enum is properly positioned.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Resolved] (LUCENE-3260) need a test that uses termsenum.seekExact() (which returns true), then calls next()

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

Michael McCandless resolved LUCENE-3260.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 4.0

> need a test that uses termsenum.seekExact() (which returns true), then calls next()
> -----------------------------------------------------------------------------------
>
>                 Key: LUCENE-3260
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3260
>             Project: Lucene - Java
>          Issue Type: Bug
>            Reporter: Robert Muir
>            Assignee: Michael McCandless
>             Fix For: 4.0
>
>         Attachments: LUCENE-3260.patch
>
>
> i tried to do some seekExact (where the result must exist) then next()ing in the faceting module,
> and it seems like there could be a bug here.
> I think we should add a test that mixes seekExact/seekCeil/next like this, to ensure that
> if seekExact returns true, that the enum is properly positioned.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Commented] (LUCENE-3260) need a test that uses termsenum.seekExact() (which returns true), then calls next()

Posted by "Michael McCandless (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/LUCENE-3260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13057778#comment-13057778 ] 

Michael McCandless commented on LUCENE-3260:
--------------------------------------------

Thanks Shai!

The 200+ iterations are exceptionally fast since they only do 1 TermsEnum op per iter (it's the indexing that'll be slow in this test -- for that I do numDocs = atLeast(10)).  Also, this bug only happens when seekExact is followed by next, only on certain terms, and only on a multi-seg index.  So it seems an OK investment of CPU for test coverage ;)

> need a test that uses termsenum.seekExact() (which returns true), then calls next()
> -----------------------------------------------------------------------------------
>
>                 Key: LUCENE-3260
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3260
>             Project: Lucene - Java
>          Issue Type: Bug
>            Reporter: Robert Muir
>            Assignee: Michael McCandless
>         Attachments: LUCENE-3260.patch
>
>
> i tried to do some seekExact (where the result must exist) then next()ing in the faceting module,
> and it seems like there could be a bug here.
> I think we should add a test that mixes seekExact/seekCeil/next like this, to ensure that
> if seekExact returns true, that the enum is properly positioned.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] [Updated] (LUCENE-3260) need a test that uses termsenum.seekExact() (which returns true), then calls next()

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

Michael McCandless updated LUCENE-3260:
---------------------------------------

    Attachment: LUCENE-3260.patch

Patch, w/ new test showing the issue in MTE when you next() after seekExact(), and w/ the fix for MTE.

I also removed unnecessary seek calls from LuceneTaxonomyWriter.

> need a test that uses termsenum.seekExact() (which returns true), then calls next()
> -----------------------------------------------------------------------------------
>
>                 Key: LUCENE-3260
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3260
>             Project: Lucene - Java
>          Issue Type: Bug
>            Reporter: Robert Muir
>            Assignee: Michael McCandless
>         Attachments: LUCENE-3260.patch
>
>
> i tried to do some seekExact (where the result must exist) then next()ing in the faceting module,
> and it seems like there could be a bug here.
> I think we should add a test that mixes seekExact/seekCeil/next like this, to ensure that
> if seekExact returns true, that the enum is properly positioned.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org