wyymichael / paoding

Automatically exported from code.google.com/p/paoding
0 stars 0 forks source link

高亮时候出现程序错误 #32

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. 从检索结果获取到文本
2. 将文本进行加亮
3. 加亮的时候出现StringIndexOutOfBoundsException:index out of range: 
1340

What is the expected output? What do you see instead?

Please use labels and text to provide additional information.

文本的长度是1339,最后一行是"项大型活动;多次在学校运动
会获奖",抛出1340问
题:
java.lang.StringIndexOutOfBoundsException: String index out of range: 1340
    java.lang.String.substring(String.java:1765)
    org.apache.lucene.search.highlight.Highlighter.getBestTextFragments
(Highlighter.java:274)
    org.apache.lucene.search.highlight.Highlighter.getBestFragments(Hig
hlighter.java:177)
    org.apache.lucene.search.highlight.Highlighter.getBestFragments(Hig
hlighter.java:463)
    com.sitech.se

Original issue reported on code.google.com by qieqie.wang on 13 May 2009 at 3:30