Hi Edwin,
You need to encode <br> as &lt;br&gt;

HTH,
Emir
--
Monitoring - Log Management - Alerting - Anomaly Detection
Solr & Elasticsearch Consulting Support Training - http://sematext.com/



> On 4 Jan 2018, at 10:59, Zheng Lin Edwin Yeo <edwinye...@gmail.com> wrote:
> 
> Hi,
> 
> I'm using Solr 7.2.0, and I'm trying to replace \n with <br> by using
> RegexReplaceProcessorFactory.
> 
> However, I could not get the below configuration in solrconfig.xml to be
> loaded.
> 
> <processor class="solr.RegexReplaceProcessorFactory">
>   <str name="fieldName">content</str>
>   <str name="pattern">\n  </str>
>   <str name="replacement"><br></str>
> </processor>
> 
> Understand that <br> is a special character. Can we do some escape sequence
> to it? I have tried
> \<br\>, but it does not work.
> 
> Below is the error message which I got.
> 
> Exception during parsing file:
> solrconfig.xml:org.xml.sax.SAXParseException; systemId:
> solrres:/solrconfig.xml; lineNumber: 1508; columnNumber: 36; The
> element type "br" must be terminated by the matching end-tag "</br>".
> 
> 
> Regards,
> Edwin

Reply via email to