You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "James Dyer (JIRA)" <ji...@apache.org> on 2014/05/02 22:58:16 UTC

[jira] [Updated] (SOLR-5090) NPE in DirectSpellChecker with alternativeTermCount and mm.

     [ https://issues.apache.org/jira/browse/SOLR-5090?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Dyer updated SOLR-5090:
-----------------------------

    Attachment: SOLR-5090.patch

Here is a fix with a unit test scenario.  This ignores "spellcheck.alternativeTermCount" when set to zero as its absurd to ask spellcheckers to return zero suggestions for a word. (both DirectSpellChecker and the legacy IndexBasedSpellChecker choke on this scenario)

I plan to commit this in a few days.

> NPE in DirectSpellChecker with alternativeTermCount and mm.
> -----------------------------------------------------------
>
>                 Key: SOLR-5090
>                 URL: https://issues.apache.org/jira/browse/SOLR-5090
>             Project: Solr
>          Issue Type: Bug
>          Components: spellchecker
>    Affects Versions: 4.4
>         Environment: 4.4.0 1504776 - sarowe - 2013-07-19 02:58:35
>            Reporter: Markus Jelsma
>            Assignee: James Dyer
>             Fix For: 4.9, 5.0
>
>         Attachments: SOLR-5090.patch
>
>
> Query with three terms of which one is misspelled and spellcheck.alternativeTermCount=0&mm=3 yields the following NPE:
> {code}
> ERROR org.apache.solr.servlet.SolrDispatchFilter  – null:java.lang.NullPointerException
>         at org.apache.lucene.search.spell.DirectSpellChecker.suggestSimilar(DirectSpellChecker.java:422)
>         at org.apache.lucene.search.spell.DirectSpellChecker.suggestSimilar(DirectSpellChecker.java:355)
>         at org.apache.solr.spelling.DirectSolrSpellChecker.getSuggestions(DirectSolrSpellChecker.java:189)
>         at org.apache.solr.handler.component.SpellCheckComponent.process(SpellCheckComponent.java:188)
>         at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:208)
>         at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
>         at org.apache.solr.core.SolrCore.execute(SolrCore.java:1904)
>         at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:659)
>         at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:362)
>         at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:158
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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