You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Cassandra Targett (JIRA)" <ji...@apache.org> on 2018/01/04 21:50:04 UTC

[jira] [Updated] (SOLR-3608) Spellchecker: String index out of range: -1

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

Cassandra Targett updated SOLR-3608:
------------------------------------
    Summary: Spellchecker: String index out of range: -1  (was: Spellcecker: String index out of range: -1)

> Spellchecker: String index out of range: -1
> -------------------------------------------
>
>                 Key: SOLR-3608
>                 URL: https://issues.apache.org/jira/browse/SOLR-3608
>             Project: Solr
>          Issue Type: Bug
>          Components: spellchecker
>    Affects Versions: 3.6, 4.0-ALPHA
>         Environment: Ubuntu 11.10 x64
> java version "1.7.0_05"
> Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
> Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode)
>            Reporter: dalius
>            Priority: Minor
>
> Spell check component throws StringIndexOutOfBoundsException on multiterm search.
> Stack trace: 
> {code}
> SEVERE: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
> 	at java.lang.AbstractStringBuilder.replace(AbstractStringBuilder.java:789)
> 	at java.lang.StringBuilder.replace(StringBuilder.java:266)
> 	at org.apache.solr.spelling.SpellCheckCollator.getCollation(SpellCheckCollator.java:128)
> 	at org.apache.solr.spelling.SpellCheckCollator.collate(SpellCheckCollator.java:69)
> 	at org.apache.solr.handler.component.SpellCheckComponent.addCollationsToResponse(SpellCheckComponent.java:179)
> 	at org.apache.solr.handler.component.SpellCheckComponent.process(SpellCheckComponent.java:156)
> 	at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:186)
> 	at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
> 	at org.apache.solr.core.SolrCore.execute(SolrCore.java:1376)
> ...
> {code}
> I have dug some debug info at org.apache.solr.spelling.SpellCheckCollator:69
> {code}
>       String collationQueryStr = getCollation(originalQuery, possibility.getCorrections());
> {code}
> originalQuery is "casa saja"
> possibility is "rank=0     casa>cal (-1)     saja>sala (-1)     casa saja>casa de (-1)"
> The replace function fails on 3rd correction "casa saja>casa de (-1)". I hope this makes any sense.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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