lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "dalius (JIRA)" <>
Subject [jira] [Created] (SOLR-3608) Spellcecker: String index out of range: -1
Date Mon, 09 Jul 2012 15:09:35 GMT
dalius created SOLR-3608:

             Summary: Spellcecker: String index out of range: -1
                 Key: SOLR-3608
             Project: Solr
          Issue Type: Bug
          Components: spellchecker
    Affects Versions: 3.6
         Environment: Ubuntu 11.10 x64
            Reporter: dalius

Spell check component throws StringIndexOutOfBoundsException on multiterm search.

Stack trace: 
SEVERE: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
	at java.lang.AbstractStringBuilder.replace(
	at java.lang.StringBuilder.replace(
	at org.apache.solr.spelling.SpellCheckCollator.getCollation(
	at org.apache.solr.spelling.SpellCheckCollator.collate(
	at org.apache.solr.handler.component.SpellCheckComponent.addCollationsToResponse(
	at org.apache.solr.handler.component.SpellCheckComponent.process(
	at org.apache.solr.handler.component.SearchHandler.handleRequestBody(
	at org.apache.solr.handler.RequestHandlerBase.handleRequest(
	at org.apache.solr.core.SolrCore.execute(


I have dug some debug info at org.apache.solr.spelling.SpellCheckCollator:69
      String collationQueryStr = getCollation(originalQuery, possibility.getCorrections());
originalQuery is "casa saja"
possibility is "rank=0     casa>cal (-1)     saja>sala (-1)     casa saja>casa de

The replace function fails on 3rd correction "casa saja>casa de (-1)". I hope this makes
any sense.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message