Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.9
-
None
-
New
Description
SimpleFragListBuilder would benefit from an additional constructor that takes in margin. Currently, the margin is defined as a constant, so to "implement" a FragListBuilder with a different margin, one has no choice but to copy and paste SimpleFragListBuilder into a new class that must be placed in the org.apache.lucene.search.vectorhighlight package due to accesses of package-protected fields in other classes.
If this change were made, the precondition check of the constructor's fragCharSize should probably be altered to ensure that it's less than max(1, margin*3) to allow for a margin of 0.