Try
<str name="hl.simple.pre">&lt;em&gt;</str>
or
<str name="hl.simple.pre"><![CDATA[<em>]]></str>

The bare < and > confuse the XML parsing.

Best
Erick

On Mon, Jul 13, 2015 at 9:19 AM, Paden <rumsey...@gmail.com> wrote:
> Hello,
>
> I'm trying to get some Solr highlighting going but I've run into a small
> problem. When I set the pre and post tags with my own custom tag I get an
> XML error
>
> XML Parsing Error: mismatched tag. Expected: </em>.
> Location:
> file:///home/paden/Downloads/solr-5.1.0/server/solr/Testcore2/conf/solrconfig.xml
> Line Number 476, Column 40:       <str name="hl.simple.pre"><em></str>
>
> I've seen it done like this on a lot of the other sites and I'm not sure if
> I'm missing an escape character or something. Just to emphasize that I did
> set a POST tag I put it right after the pre in solrconfig.xml like so
>
> <str name="hl.simple.pre"><em></str>
> <str name="hl.simple.post"></em></str>
>
> What am I doing wrong here?
>
>
>
> --
> View this message in context: 
> http://lucene.472066.n3.nabble.com/Highlighting-pre-and-post-tags-not-working-tp4217090.html
> Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to