[
https://issues.apache.org/jira/browse/SOLR-16885?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17741739#comment-17741739
]
Chris M. Hostetter commented on SOLR-16885:
-------------------------------------------
Root cause is [Lucene issue #
12431|https://github.com/apache/lucene/issues/12431] which changed some default
behavior from the {{UnifiedHighlighter}} Starting in 9.0
There is not likely a fix in Solr.
(I created this ticket mainly for tracking purposes and to assist Solr users in
searching for this type of problem and how to fix if via schema changes)
> Highlighter IndexOutOfBoundsException using termVectors
> -------------------------------------------------------
>
> Key: SOLR-16885
> URL: https://issues.apache.org/jira/browse/SOLR-16885
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Components: highlighter
> Affects Versions: 9.0
> Reporter: Chris M. Hostetter
> Priority: Major
>
> Beginning with Solr 9.0, schemas + data + queries that could be indexed &
> queried & highlighted in 8.x may throw exceptions that look like this when
> highlighting queries with multiple terms ...
> {noformat}
> java.lang.IndexOutOfBoundsException: start 8, end 7, length 16
> at java.lang.AbstractStringBuilder.checkRange(Unknown Source) ~[?:?]
> at java.lang.AbstractStringBuilder.append(Unknown Source) ~[?:?]
> at java.lang.StringBuilder.append(Unknown Source) ~[?:?]
> at
> org.apache.lucene.search.uhighlight.DefaultPassageFormatter.append(DefaultPassageFormatter.java:133)
> ~[?:?]
> at
> org.apache.lucene.search.uhighlight.DefaultPassageFormatter.format(DefaultPassageFormatter.java:84)
> ~[?:?]
> at
> org.apache.lucene.search.uhighlight.DefaultPassageFormatter.format(DefaultPassageFormatter.java:25)
> ~[?:?]
> at
> org.apache.lucene.search.uhighlight.FieldHighlighter.highlightFieldForDoc(FieldHighlighter.java:94)
> ~[?:?]
> at
> org.apache.lucene.search.uhighlight.UnifiedHighlighter.highlightFieldsAsObjects(UnifiedHighlighter.java:954)
> ~[?:?]
> at
> org.apache.lucene.search.uhighlight.UnifiedHighlighter.highlightFields(UnifiedHighlighter.java:824)
> ~[?:?]
> at
> org.apache.solr.highlight.UnifiedSolrHighlighter.doHighlighting(UnifiedSolrHighlighter.java:165)
> ~[?:?]
> {noformat}
> This problem can happen when the field has {{termVectors="true"
> termOffsets="true" }} but does *NOT* have {{termPositions="true"}}
> Workaround is to update these fieldtypes to include {{termPositions="true"}}
> and re-index all data.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]