Problem Solr

Hi, I have a problem when I Query Solr matches the results, but when I turn on selection based on the results of this query, the highlight does not work.

My request

+ Content: "item 503"

The content is of the text type, and one important thing in the text element 503 is displayed as "element 503 (c)", can open the parentheses at the end create a problem ?? please, help

here stands out the section in SolrSonfig.xml

<highlighting> <!-- Configure the standard fragmenter --> <!-- This could most likely be commented out in the "default" case --> <fragmenter name="gap" class="org.apache.solr.highlight.GapFragmenter" default="true"> <lst name="defaults"> <int name="hl.fragsize">100</int> </lst> </fragmenter> <!-- A regular-expression-based fragmenter (fi, for sentence extraction) --> <fragmenter name="regex" class="org.apache.solr.highlight.RegexFragmenter"> <lst name="defaults"> <!-- slightly smaller fragsizes work better because of slop --> <int name="hl.fragsize">70</int> <!-- allow 50% slop on fragment sizes --> <float name="hl.regex.slop">0.5</float> <!-- a basic sentence pattern --> <str name="hl.regex.pattern">[-\w ,/\n\"']{20,200}</str> </lst> </fragmenter> <!-- Configure the standard formatter --> <formatter name="html" class="org.apache.solr.highlight.HtmlFormatter" default="true"> <lst name="defaults"> <str name="hl.simple.pre"><![CDATA[<em>]]></str> <str name="hl.simple.post"><![CDATA[</em>]]></str> </lst> </formatter> </highlighting> and here is fieldtype definition in schema.xml <fieldtype name="text" class="solr.TextField"> <analyzer> <tokenizer class="solr.StandardTokenizerFactory" luceneMatchVersion="LUCENE_29"/> <filter class="solr.StandardFilterFactory"/> <!-- <filter class="solr.LowerCaseFilterFactory"/> <filter class="solr.StopFilterFactory" luceneMatchVersion="LUCENE_29"/> <filter class="solr.EnglishPorterFilterFactory"/>--> </analyzer> </fieldtype> and here is field definition <field name="Contents" type="text" indexed="true" stored="true" /> 

Relations Asan.

+3
source share
1 answer

Have you also tried to store the term "vectors"? If you use a fast vector marker (which, in my opinion, Solr can by default), you will need those.

+1
source

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


All Articles