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/04/24 16:21:05 UTC

[jira] [Created] (LUCENE-3044) thaiwordfilter uses attributesource.copyTo incorrectly

thaiwordfilter uses attributesource.copyTo incorrectly
------------------------------------------------------

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


The bug can be seen by https://builds.apache.org/hudson/job/Lucene-Solr-tests-only-3.x/7367/

It looks like the issue is this lazy initialization of the cloned token: if the tokenstream is reused
and the consumer is interested in a different set of attributes, it could be a problem.

one probably-probably-not-totally-correct fix would be to add 'clonedToken = null;' to reset(), at 
least it would solve this case?

--
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-3044) thaiwordfilter uses attributesource.copyTo incorrectly

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

Uwe Schindler commented on LUCENE-3044:
---------------------------------------

+1, thats the easiest to solve this.

> thaiwordfilter uses attributesource.copyTo incorrectly
> ------------------------------------------------------
>
>                 Key: LUCENE-3044
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3044
>             Project: Lucene - Java
>          Issue Type: Bug
>            Reporter: Robert Muir
>         Attachments: LUCENE-3044.patch
>
>
> The bug can be seen by https://builds.apache.org/hudson/job/Lucene-Solr-tests-only-3.x/7367/
> It looks like the issue is this lazy initialization of the cloned token: if the tokenstream is reused
> and the consumer is interested in a different set of attributes, it could be a problem.
> one probably-probably-not-totally-correct fix would be to add 'clonedToken = null;' to reset(), at 
> least it would solve this case?

--
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-3044) thaiwordfilter uses attributesource.copyTo incorrectly

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

Uwe Schindler commented on LUCENE-3044:
---------------------------------------

Yeah fix is correct for this TokenFilter. It should loose all state on reset!

> thaiwordfilter uses attributesource.copyTo incorrectly
> ------------------------------------------------------
>
>                 Key: LUCENE-3044
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3044
>             Project: Lucene - Java
>          Issue Type: Bug
>            Reporter: Robert Muir
>
> The bug can be seen by https://builds.apache.org/hudson/job/Lucene-Solr-tests-only-3.x/7367/
> It looks like the issue is this lazy initialization of the cloned token: if the tokenstream is reused
> and the consumer is interested in a different set of attributes, it could be a problem.
> one probably-probably-not-totally-correct fix would be to add 'clonedToken = null;' to reset(), at 
> least it would solve this case?

--
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-3044) thaiwordfilter uses attributesource.copyTo incorrectly

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

Robert Muir resolved LUCENE-3044.
---------------------------------

       Resolution: Fixed
    Fix Version/s: 4.0
                   3.2
         Assignee: Robert Muir

Committed revisions 1096334, 1096337 (3x)

> thaiwordfilter uses attributesource.copyTo incorrectly
> ------------------------------------------------------
>
>                 Key: LUCENE-3044
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3044
>             Project: Lucene - Java
>          Issue Type: Bug
>            Reporter: Robert Muir
>            Assignee: Robert Muir
>             Fix For: 3.2, 4.0
>
>         Attachments: LUCENE-3044.patch
>
>
> The bug can be seen by https://builds.apache.org/hudson/job/Lucene-Solr-tests-only-3.x/7367/
> It looks like the issue is this lazy initialization of the cloned token: if the tokenstream is reused
> and the consumer is interested in a different set of attributes, it could be a problem.
> one probably-probably-not-totally-correct fix would be to add 'clonedToken = null;' to reset(), at 
> least it would solve this case?

--
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-3044) thaiwordfilter uses attributesource.copyTo incorrectly

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

Robert Muir updated LUCENE-3044:
--------------------------------

    Attachment: LUCENE-3044.patch

here's a patch: i added an explicit test for this also.

> thaiwordfilter uses attributesource.copyTo incorrectly
> ------------------------------------------------------
>
>                 Key: LUCENE-3044
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3044
>             Project: Lucene - Java
>          Issue Type: Bug
>            Reporter: Robert Muir
>         Attachments: LUCENE-3044.patch
>
>
> The bug can be seen by https://builds.apache.org/hudson/job/Lucene-Solr-tests-only-3.x/7367/
> It looks like the issue is this lazy initialization of the cloned token: if the tokenstream is reused
> and the consumer is interested in a different set of attributes, it could be a problem.
> one probably-probably-not-totally-correct fix would be to add 'clonedToken = null;' to reset(), at 
> least it would solve this case?

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