The breakIterator boundary scanner scans term boundaries by considering the language (hl.bs.language) and boundary type (hl.bs.type) and provides expected, accurate, and complete output without any loss of characters. It is used most often. To implement the breakIterator boundary scanner, we need to add the following code snippet to the highlighting section in the solrconfig.xml file:
<boundaryScanner name="breakIterator" class="solr.highlight.BreakIteratorBoundaryScanner">
<lst name="defaults">
<str name="hl.bs.type">WORD</str>
<str name="hl.bs.language">en</str>
<str name="hl.bs.country">US</str>
</lst>
</boundaryScanner>
Possible values for the hl.bs.type parameter are WORD, LINE, SENTENCE, and CHARACTER.