开发者

How to get Highlighting response for all fields with SolR

开发者 https://www.devze.com 2023-01-25 17:49 出处:网络
hi all: I have a document with two fields, name and text, the content of them are same. but when I use highlighting query, the response only return one field which is in parameter q.

hi all:

I have a document with two fields, name and text, the content of them are same.

but when I use highlighting query, the response only return one field which is in parameter q.

eg:

htp://127.0.0.1:8983/solr/select/?q=name:sony&hl=true&hl.f开发者_如何学Pythonl=name,text

this only return name in highlighting response

htp://127.0.0.1:8983/solr/select/?q=text:sony&hl=true&hl.fl=name,text

this only return text in highlighting response

I want to get all field with highlighting, is the hl.fl useless?

thanks in advance for any help.


What you have should work. The one thing that stands out to me is the name of the other field you have is 'text' I would try changing the name of that field and try this again. That just looks like a word you might not want to use cause it could be reserved somewhere along the lines.

Can you do a q=text:sony

?

Does it give the same result?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号