lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Høydahl (JIRA) <j...@apache.org>
Subject [jira] [Commented] (LUCENE-6093) BlendedInfixSuggester throws NullPointerException if there were discarded trailing characters in the query
Date Wed, 18 Feb 2015 14:26:12 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-6093?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14325917#comment-14325917
] 

Jan Høydahl commented on LUCENE-6093:
-------------------------------------

I'll backport this to 4.10 branch

> BlendedInfixSuggester throws NullPointerException if there were discarded trailing characters
in the query
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: LUCENE-6093
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6093
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/spellchecker
>    Affects Versions: 4.10.2
>         Environment: Any environment
>            Reporter: Andrei Filimonov
>            Assignee: Jan Høydahl
>            Priority: Critical
>             Fix For: 4.10.4, 5.0, Trunk, 5.1
>
>         Attachments: LUCENE-6093.patch
>
>
> BlendedInfixSuggester throws NullPointerException if there were discarded trailing characters
(e.g. whitespace or special character) in the query.
> The problem seems to be in the createCoefficient method that fails to check if prefixToken
parameter is null. AnalyzingInfixSuggester sets prefixToken to null in the described case
and passes it to BlendedInfixSuggester. On the side not even if BlendedInfixSuggester is changed
to handle this creates a problem to calculate the weights as prefixToken is null and cannot
be used. I would be better to have AnalyzingInfixSuggester to always set prefixToken to lastToken.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message