You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Steffen Elberg Godskesen (Commented) (JIRA)" <ji...@apache.org> on 2011/11/16 11:38:52 UTC
[jira] [Commented] (SOLR-2509) spellcheck:
StringIndexOutOfBoundsException: String index out of range: -1
[ https://issues.apache.org/jira/browse/SOLR-2509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13151129#comment-13151129 ]
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 https://builds.apache.org/job/Solr-trunk/lastSuccessfulBuild/artifact/artifacts/apache-solr-4.0-2011-11-16_08-54-59.tgz)
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)
{noformat}
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(AbstractStringBuilder.java:797)
at java.lang.StringBuilder.replace(StringBuilder.java:271)
at org.apache.solr.spelling.SpellCheckCollator.getCollation(SpellCheckCollator.java:131)
at org.apache.solr.spelling.SpellCheckCollator.collate(SpellCheckCollator.java:70)
at org.apache.solr.handler.component.SpellCheckComponent.addCollationsToResponse(SpellCheckComponent.java:177)
at org.apache.solr.handler.component.SpellCheckComponent.process(SpellCheckComponent.java:154)
at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:194)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1475)
at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:353)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:248)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:928)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
{noformat}
> spellcheck: StringIndexOutOfBoundsException: String index out of range: -1
> --------------------------------------------------------------------------
>
> Key: SOLR-2509
> URL: https://issues.apache.org/jira/browse/SOLR-2509
> 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"
> *SEE COMMENTS BELOW*
> 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: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org