Question

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.

Was it helpful?

Solution

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?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top