Thanks for the report Nick,
could you open a JIRA bug for this?
Thanks,
-Yonik
On 2/15/07, nick19701 <[EMAIL PROTECTED]> wrote:
I have thousands of docs in my solr instance.
The following doc (maybe others) is causing exception everytime
highlight is turned on.
<doc>
<str name="topicTitle">
Best buy - Acer Aspire AS5610-2273 - $599. Windows vista, 1 GB RAM
</str>
</doc>
The exception is like this:
java.lang.StringIndexOutOfBoundsException: String index out of range: -52
at java.lang.String.substring(String.java:1768)
at
org.apache.lucene.search.highlight.Highlighter.getBestTextFragments(Highlighter.java:235)
at
org.apache.solr.util.HighlightingUtils.doHighlighting(HighlightingUtils.java:252)
at
org.apache.solr.request.StandardRequestHandler.handleRequest(StandardRequestHandler.java:161)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:587)
at org.apache.solr.servlet.SolrServlet.doGet(SolrServlet.java:92)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)
This exception only occurs when highlight is on and the above doc is in the
response.
So for example, these three requests all cause the exception:
hl=on&hl.fl=topicTitle&hl.fragsize=0&hl.simple.pre=<em>&hl.simple.post=</em>&q=topicTitle:best+buy;replies
desc&start=40&rows=10
hl=on&hl.fl=topicTitle&hl.fragsize=0&hl.simple.pre=<em>&hl.simple.post=</em>&q=topicTitle:acer;replies
desc&start=0&rows=10
hl=on&hl.fl=topicTitle&hl.fragsize=0&hl.simple.pre=<em>&hl.simple.post=</em>&q=topicTitle:vista;replies
desc&start=60&rows=10
Below is the field definition for topicTitle. What's so special about the
above doc?
<fieldtype name="text" class="solr.TextField" positionIncrementGap="100">
<analyzer type="index">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<!--in this example, we will only use synonyms at query time-->
<filter class="solr.SynonymFilterFactory"
synonyms="index_synonyms.txt" ignoreCase="true" expand="true"/>
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt"/>
<filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1" catenateWords="1"
catenateNumbers="1" catenateAll="0"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.EnglishPorterFilterFactory"
protected="protwords.txt"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
<analyzer type="query">
<tokenizer class="solr.WhitespaceTokenizerFactory"/>
<!--<filter class="solr.SynonymFilterFactory"
synonyms="synonyms.txt" ignoreCase="true" expand="true"/>-->
<filter class="solr.StopFilterFactory" ignoreCase="true"
words="stopwords.txt"/>
<filter class="solr.WordDelimiterFilterFactory"
generateWordParts="1" generateNumberParts="1" catenateWords="0"
catenateNumbers="0" catenateAll="0"/>
<filter class="solr.LowerCaseFilterFactory"/>
<filter class="solr.EnglishPorterFilterFactory"
protected="protwords.txt"/>
<filter class="solr.RemoveDuplicatesTokenFilterFactory"/>
</analyzer>
</fieldtype>
<field name="topicTitle" type="text" indexed="true" stored="true"/>
--
View this message in context:
http://www.nabble.com/highlight-exception-tf3234528.html#a8987980
Sent from the Solr - User mailing list archive at Nabble.com.