Solr backlight

I saw this post here , it explains well how to show the highlighted result, but for me it will not work ...

I get lst with highlight and all, but the text in this is much smaller compared to the original answer without highlighting ...

How to combine content highlighting with source result set in php?

+3
source share
2 answers

Try hl.fragsize to increase the size of the selection returned by Solr.

+7
source

I would recommend using a non-standard marker to get much better results. Find in your solrconfig.xml file for your RequestHandler:

<requestHandler name="/select" class="solr.SearchHandler">

and add the following:

<str name="hl.usePhraseHighlighter">false</str>
<str name="hl.useFastVectorHighlighter">true</str>
<str name="hl.boundaryScanner">breakIterator</str>

Highlighter.

<searchComponent class="solr.HighlightComponent" name="highlight">

:

<boundaryScanner name="default" default="false" class="solr.highlight.SimpleBoundaryScanner">

, "default = false". BoundaryScanner, , :

<boundaryScanner name="breakIterator" default="true" class="solr.highlight.BreakIteratorBoundaryScanner">

"SENTENCE":

<str name="hl.bs.type">SENTENCE</str>

.

!

Awww - schema.xml. , , :

termVectors="true" termPositions="true" termOffsets="true"
+6

Source: https://habr.com/ru/post/1795449/


All Articles