Solr结果不会突出显示特定单词

时间:2014-01-03 06:39:21

标签: solr

我们在我们的应用程序中使用solr作为搜索引擎。 为了突出显示,我们依赖于solr结果。

查询传递给solr以突出显示

hl.q=AddressLine1%3a(Puthanmadhom)+PartyNameBusiness%3a(Puthanmadhom)+AddressState%3a(All)+&q.op=OR&hl=true&hl.fl=*&hl.requireFieldMatch=true&hl.simple.pre=%3cb%3e&hl.simple.post=%3c%2fb%3e

这里的单词“Puthanmadhom”未在solr结果中突出显示。但几乎所有其他的话都很好。甚至“Puthanmad”也正确地突出显示。

欢迎任何可能的失败原因。

谢谢, VARUN

1 个答案:

答案 0 :(得分:1)

hl.q=AddressLine1%3a(Puthanmadhom)+PartyNameBusiness%3a(Puthanmadhom)+AddressState%3a(All)+&q.op=OR&hl=true&hl.fl=*&hl.requireFieldMatch=true&hl.simple.pre=%3cb%3e&hl.simple.post=%3c%2fb%3e

此查询字符串在“...(全部)+& q.op ...”之后被一个额外的空格打破。更改为“...(全部)& q.op ...”,它应该可以正常工作。

相关问题