lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Teague James" <>
Subject Solr 6.0 Highlighting Not Working
Date Mon, 24 Oct 2016 15:15:38 GMT
Can someone please help me troubleshoot my Solr 6.0 highlighting issue? I
have a production Solr 4.9.0 unit configured to highlight responses and it
has worked for a long time now without issues. I have recently been testing
Solr 6.0 and have been unable to get highlighting to work. I used my 4.9
configuration as a guide when configuring my 6.0 machine. Here are the
primary configs:

In my  query requestHandler I have the following:
<str name="hl">on</str>
<str name="hl.fl">text</str>
<str name="hl.encoder">html</str>
<str name="hl.simple.pre">&lt;b&gt;</str>
<str name="">&lt;/b&gt;</str>

It is worth noting here that the documentation in the wiki says
hl.simple.pre and both accept the following:
<str name="hl.simple.pre"><em></str>
<str name=""></em></str>
Using this config in 6.0 causes the core to malfunction at startup throwing
an error that essentially says that an XML statement was not closed. I had
to add the escaped characters just to get the solrconfig to load! Why? That
isn't documented anywhere I looked. It makes me wonder if this is the source
of the problems with highlighting since it works in my 4.9 implementation
without escaping. Is there something wrong with 6's ability to parse XML?

I upload documents using cURL:
curl http://localhost:8983/solr/[CORENAME]/update?commit=true -H
"Content-Type:text/xml" --data-binary '<add><doc><field
name="id">7518</field><field name="observation">TEST02. This is the second

When I search using a browser:

The response I get is:
<result name="response" numFound="1" start="0" maxScore="2.2499826"> <doc>
<str name="id">7518</str> <str name="observation"> TEST02. This is the
second test.
<arr name="text">
TEST02. This is the second test.
<long name="_version_">1548827202660859904</long>
<float name="score">2.2499826</float>
<lst name="highlighting">
<lst name="7518"/>

Note that nothing appears in the highlight section. Why?

Any help would be appreciated - thanks!


View raw message