You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Michael Henson (JIRA)" <ji...@apache.org> on 2009/02/05 03:49:59 UTC

[jira] Created: (SOLR-1005) DoubleMetaphone Filter Produces NullpointerException on zero-length token

DoubleMetaphone Filter Produces NullpointerException on zero-length token
-------------------------------------------------------------------------

                 Key: SOLR-1005
                 URL: https://issues.apache.org/jira/browse/SOLR-1005
             Project: Solr
          Issue Type: Bug
          Components: Analysis
    Affects Versions: 1.4
         Environment: jdk 1.6.10, tomcat 6.x
            Reporter: Michael Henson


If any token given to the DoubleMetaphoneFilter is empty (Token exists, 0 length), then the encoder will return null instead of a metaphone encoded string. The current code assumes that there will always be a valid object returned.

Proposed solution: Make sure 0-length tokens are skipped at the top branch where the code checks whether or not we have a Token object at all.


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


[jira] Resolved: (SOLR-1005) DoubleMetaphone Filter Produces NullpointerException on zero-length token

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

Otis Gospodnetic resolved SOLR-1005.
------------------------------------

    Resolution: Fixed
      Assignee: Otis Gospodnetic

Thanks Michael.

Committed revision 741721.


> DoubleMetaphone Filter Produces NullpointerException on zero-length token
> -------------------------------------------------------------------------
>
>                 Key: SOLR-1005
>                 URL: https://issues.apache.org/jira/browse/SOLR-1005
>             Project: Solr
>          Issue Type: Bug
>          Components: Analysis
>    Affects Versions: 1.4
>         Environment: jdk 1.6.10, tomcat 6.x
>            Reporter: Michael Henson
>            Assignee: Otis Gospodnetic
>         Attachments: solr-1005.zip
>
>
> If any token given to the DoubleMetaphoneFilter is empty (Token exists, 0 length), then the encoder will return null instead of a metaphone encoded string. The current code assumes that there will always be a valid object returned.
> Proposed solution: Make sure 0-length tokens are skipped at the top branch where the code checks whether or not we have a Token object at all.

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


[jira] Updated: (SOLR-1005) DoubleMetaphone Filter Produces NullpointerException on zero-length token

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

Michael Henson updated SOLR-1005:
---------------------------------

    Attachment: solr-1005.zip

Patch to skip 0-length tokens in the DoubleMetaphoneFilter.

> DoubleMetaphone Filter Produces NullpointerException on zero-length token
> -------------------------------------------------------------------------
>
>                 Key: SOLR-1005
>                 URL: https://issues.apache.org/jira/browse/SOLR-1005
>             Project: Solr
>          Issue Type: Bug
>          Components: Analysis
>    Affects Versions: 1.4
>         Environment: jdk 1.6.10, tomcat 6.x
>            Reporter: Michael Henson
>         Attachments: solr-1005.zip
>
>
> If any token given to the DoubleMetaphoneFilter is empty (Token exists, 0 length), then the encoder will return null instead of a metaphone encoded string. The current code assumes that there will always be a valid object returned.
> Proposed solution: Make sure 0-length tokens are skipped at the top branch where the code checks whether or not we have a Token object at all.

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