hossman opened a new issue, #12431: URL: https://github.com/apache/lucene/issues/12431
### Description Summary of mailing list thread... https://lists.apache.org/list.html?java-u...@lucene.apache.org * Using `UnifiedHighlighter` w/ `DefaultPassageFormatter` * Highlighting fields that use `setStoreTermVectors(true)` + `setStoreTermVectorOffsets(true)` * but do *NOT* use `setStoreTermVectorPositions(true)` * `IndexOutOfBoundsException` can occur in `DefaultPassageFormatter` -> `StringBuilder` when query and field includes multiple terms * Problem caused by `TermVectorOffsetStrategy` producing `Passage` instances where matches are not in order (by start offset) * Not clear from `Passage` API if this is allowed * `DefaultPassageFormatter` does not expect this (only the possibility that end/start will overlap) * Problem started happening "by default" in 9.0 due to LUCENE-9431 * #362 * Known workarounds: * Index Time Option: Add `setStoreTermVectorPositions(true)` to fields you wish to highlight that already use `setStoreTermVectors(true)` * Alternative Query Time Option: Subclass `UnifiedHighlighter` to override `getFlags(String)` and remove `HighlightFlag.WEIGHT_MATCHES` from the set returned by `super.getFlags(field)` Test patch demonstrating problem in above linked mailing list thread ### Version and environment details _No response_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org