lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Teague James" <teag...@insystechinc.com>
Subject Solr 6 Highlighting Not Working
Date Fri, 21 Oct 2016 19:50:30 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:

solrconfig.xml
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="hl.simple.post">&lt;/b&gt;</str>

It is worth noting here that the documentation in the wiki says
hl.simple.pre and hl.simple.post both accept the following:
<str name="hl.simple.pre"><em></str>
<str name="hl.simple.post"></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
test.</field></doc></add>'

When I search using a browser:
http://50.16.13.37:8983/solr/pp/query?indent=true&q=TEST04&wt=xml

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.
</str>
<arr name="text">
<str>
TEST02. This is the second test.
</str>
</arr>
<long name="_version_">1548827202660859904</long>
<float name="score">2.2499826</float>
</doc>
</result>
<lst name="highlighting">
<lst name="7518"/>
</lst>

Note that nothing appears in the highlight section. Why?


Mime
View raw message