Highlighting issue with quoted queries in Solr - fragment not returned

萝らか妹 提交于 2019-12-13 18:27:29

问题


This is very curious. Highlighting works fine in every other case, but there's this one case it doesn't return any fragments. My document is as follows (fieldType text_en):

Abu Yahya Suhaib bin Sinan (May Allah be pleased with him) reported that: The Messenger of Allah (PBUH) said, "How wonderful is the case of a believer; there is good for him in everything and this applies only to a believer. If prosperity attends him, he expresses gratitude to Allah and that is good for him; and if adversity befalls him, he endures it patiently and that is better for him".[Muslim].

My query is

"wonderful is the case of a believer"

Solr finds the document to return alright, but the highlighting component of the return value doesn't contain the text of the document. It has a field for the primary key of the document (like always) but nothing deeper than that.

If I remove the last word, everything works properly. If I remove the last word from the quotes and place it outside, it works. It even works with a longer (different) string in quotes. It just doesn't work for this!

How do I begin debugging this?

I don't have any highlighting setup in schema.xml and here are the parameters I'm passing as part of he query: &hl=true&hl.fl=hadithText&hl.snippets=50&hl.fragsize=2500&hl.mergeContiguous=true&defType=edismax&mm=3<-1%205<-2&hl.usePhraseHighlighter=true

来源:https://stackoverflow.com/questions/12232302/highlighting-issue-with-quoted-queries-in-solr-fragment-not-returned

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!