1

我在 solr 中有一个名为“全文”的字段,它有超过 50,000 个字符。我想突出显示该字段的搜索关键字。我已经设定

 f.Fulltext.hl.snippets=30
    f.Fulltext.hl.fragsize =50000
    h1.MaxAnalyzedChars = 100000;

我面临的问题是,“全文”字段中的整个文档要么没有突出显示,要么没有完全生成。它只生成部分文档。对于所有其他领域,突出显示效果很好。我认为由于该字段的字符太多,它不起作用?谁能帮我解决这个问题?

提前致谢

4

2 回答 2

4

Your setting of f.Fulltext.hl.fragsize=50000 is limiting the size of the highlighting snippet to only 50,000 characters and you have stated that your field is longer than 50,000 characters. In order to get the results that you are looking for, you should set f.Fulltext.hl.fragsize=0 (indicating unlimited) along with your hl.maxAnalyzedChars=100000. See the hl.maxAnalyzedChars reference on the Solr Wiki.

Please note that the above will work only with the original Highlighter. If you are using the FastVectorHighlighter, you should see the notes for hl.fragSize reference on the Solr wiki.

于 2013-03-04T12:11:28.557 回答
1

参数区分大小写。

h1.MaxAnalyzedChars //won't work

hl.maxAnalyzedChars //will (also there was a typo: hl instead of h1...)

环境

hl.maxAnalyzedChars=-1

将显示无限。

于 2015-05-12T08:13:01.517 回答