문제

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.fl=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?

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top