Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TASK] Prevent word truncation with enabled resultsHighlighting #4114

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@


<requestHandler name="/select" class="solr.SearchHandler">
<str name="hl.usePhraseHighlighter">false</str>
<str name="hl.useFastVectorHighlighter">true</str>
<str name="hl.boundaryScanner">breakIterator</str>

<lst name="defaults">
<str name="defType">edismax</str>
<str name="echoParams">explicit</str>
Expand Down Expand Up @@ -467,6 +471,24 @@
<str name="hl.tag.post"><![CDATA[</b>]]></str>
</lst>
</fragmentsBuilder>

<boundaryScanner name="default" default="false" class="solr.highlight.SimpleBoundaryScanner">
<lst name="defaults">
<str name="hl.bs.maxScan">10</str>
<str name="hl.bs.chars">.,!? &#9;&#10;&#13;</str>
</lst>
</boundaryScanner>

<boundaryScanner name="breakIterator" default="true" class="solr.highlight.BreakIteratorBoundaryScanner">
<lst name="defaults">
<!-- type should be one of CHARACTER, WORD(default), LINE and SENTENCE -->
<str name="hl.bs.type">SENTENCE</str>
<!-- language and country are used when constructing Locale object. -->
<!-- And the Locale object will be used when getting instance of BreakIterator -->
<str name="hl.bs.language">${hl.bs.language}</str>
<str name="hl.bs.country">${hl.bs.country}</str>
</lst>
</boundaryScanner>
</highlighting>
</searchComponent>

Expand Down
2 changes: 2 additions & 0 deletions Resources/Private/Solr/cores/english/core.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ configSet=ext_solr_13_0_0
schema=english/schema.xml
name=core_en
dataDir=../../data/english
hl.bs.language=en
hl.bs.country=US
2 changes: 2 additions & 0 deletions Resources/Private/Solr/cores/german/core.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ configSet=ext_solr_13_0_0
schema=german/schema.xml
name=core_de
dataDir=../../data/german
hl.bs.language=de
hl.bs.country=DE