无法在SOLR Highlight中返回受限文本

时间:2019-02-25 12:48:12

标签: solr

我的solr文档包含以下信息:

{
    "rid":0,
    "resourceName":"cd05",
    "metadata":"[u'org.apache.tika.parser.DefaultParser', u'org.apache.tika.parser.txt.TXTParser']",
    "content":"\n\n\n\n\n\n\n\n\nFurthermore , as an encouragement to revisionist thinking , it manifestly is fair to admit that any fraternity has a constitutional right to refuse to accept persons it dislikes . The Unitarian clergy were an exclusive club of cultivated gentlemen -- as the term was then understood in the Back Bay -- and Parker was definitely not a gentleman , either in theology or in manners . Ezra Stiles Gannett , an honorable representative of the sanhedrin , I see not how a miracle proves a doctrine '' .\n",
    "_version_":1626177165603110912
}

我正在搜索内容,并想使用Solr的突出显示功能。我的搜索字符串是http://localhost:8983/solr/core_name/select?hl.fragsize=10&hl.fl=content&hl=on&indent=on&q=content:*fair\%20to\%20admit*&wt=json。尽管提供了fragsize作为参数,但高亮显示了整个content。我只想要附近的10个字符,而不是全文。

我该如何实现?

0 个答案:

没有答案