lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steffen Elberg Godskesen (Commented) (JIRA)" <>
Subject [jira] [Commented] (SOLR-2509) spellcheck: StringIndexOutOfBoundsException: String index out of range: -1
Date Wed, 16 Nov 2011 10:38:52 GMT


Steffen Elberg Godskesen commented on SOLR-2509:

We seem to be hitting this bug in in 4.0 also. I've attached the simplest (that I could come
up with) config, schema and document that enables me to reproduce the exception on the latest
nightly build (from

To reproduce:

# Start a Solr instance using the attached schema.xml and solrconfig.xml
# Add the attached document.xml to the index
# Query for hypenated-wotd with spellchecking on and collation on (e.g. http://localhost:8983/solr/select?&q=hypenated-wotd&spellcheck=true&spellcheck.collate=true)

This will log the following exception (very similar to the one above, but included for completeness)

Nov 16, 2011 11:18:33 AM org.apache.solr.core.SolrCore execute
INFO: [] webapp=/solr path=/select params={spellcheck.collate=true&spellcheck=true&q=hypenated-wotd}
hits=0 status=500 QTime=34 
Nov 16, 2011 11:18:33 AM org.apache.solr.common.SolrException log
SEVERE: java.lang.StringIndexOutOfBoundsException: String index out of range: -4
	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(
	at org.apache.solr.servlet.SolrDispatchFilter.execute(
	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(
	at org.mortbay.jetty.servlet.ServletHandler.handle(
	at org.mortbay.jetty.servlet.SessionHandler.handle(
	at org.mortbay.jetty.handler.ContextHandler.handle(
	at org.mortbay.jetty.webapp.WebAppContext.handle(
	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(
	at org.mortbay.jetty.handler.HandlerCollection.handle(
	at org.mortbay.jetty.handler.HandlerWrapper.handle(
	at org.mortbay.jetty.Server.handle(
	at org.mortbay.jetty.HttpConnection.handleRequest(
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(
	at org.mortbay.jetty.HttpParser.parseNext(
	at org.mortbay.jetty.HttpParser.parseAvailable(
	at org.mortbay.jetty.HttpConnection.handle(
	at org.mortbay.thread.QueuedThreadPool$
> spellcheck: StringIndexOutOfBoundsException: String index out of range: -1
> --------------------------------------------------------------------------
>                 Key: SOLR-2509
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 3.1
>         Environment: Debian Lenny
> JAVA Version "1.6.0_20"
>            Reporter: Thomas Gambier
>            Priority: Blocker
>         Attachments: document.xml, schema.xml, solrconfig.xml
> Hi,
> I'm a french user of SOLR and i've encountered a problem since i've installed SOLR 3.1.
> I've got an error with this query : 
> cle_frbr:"LYSROUGE1149-73190"
> I've tested to escape the minus char and the query worked :
> cle_frbr:"LYSROUGE1149(BACKSLASH)-73190"
> But, strange fact, if i change one letter in my query it works :
> cle_frbr:"LASROUGE1149-73190"
> I've tested the same query on SOLR 1.4 and it works !
> Can someone test the query on next line on a 3.1 SOLR version and tell me if he have
the same problem ? 
> yourfield:"LYSROUGE1149-73190"
> Where do the problem come from ?
> Thank you by advance for your help.
> Tom

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