You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by M Singh <ma...@yahoo.com> on 2011/07/14 22:28:07 UTC
How to use solr.PatternReplaceFilterFactory with ampersand in pattern
Hi:
I am using the solr.PatternReplaceFilterFactory with pattern as follows to
escape ampersand and $ signs:
<filter class="solr.PatternReplaceFilterFactory" pattern="(&)"
replacement="" />
I am getting error due to embedded ampersand
[Fatal Error] schema.xml:82:71: The entity name must immediately follow the '&'
in the entity reference.
Exception in thread "main" org.xml.sax.SAXParseException: The entity name must
immediately follow the '&' in the entity reference.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
Is there anyway to make it work ?
Appreciate your help.
Thanks.
Re: How to use solr.PatternReplaceFilterFactory with ampersand in pattern
Posted by M Singh <ma...@yahoo.com>.
That works. Thanks.
________________________________
From: Markus Jelsma <ma...@openindex.io>
To: solr-user@lucene.apache.org
Cc: M Singh <ma...@yahoo.com>
Sent: Thu, July 14, 2011 4:37:57 PM
Subject: Re: How to use solr.PatternReplaceFilterFactory with ampersand in
pattern
You're in XML so you must escape it properly with & etc.
> Hi:
>
> I am using the solr.PatternReplaceFilterFactory with pattern as follows to
> escape ampersand and $ signs:
>
> <filter class="solr.PatternReplaceFilterFactory" pattern="(&)"
> replacement="" />
>
> I am getting error due to embedded ampersand
>
> [Fatal Error] schema.xml:82:71: The entity name must immediately follow the
> '&' in the entity reference.
> Exception in thread "main" org.xml.sax.SAXParseException: The entity name
> must immediately follow the '&' in the entity reference.
> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>
>
> Is there anyway to make it work ?
>
> Appreciate your help.
>
> Thanks.
Re: How to use solr.PatternReplaceFilterFactory with ampersand in pattern
Posted by Markus Jelsma <ma...@openindex.io>.
You're in XML so you must escape it properly with & etc.
> Hi:
>
> I am using the solr.PatternReplaceFilterFactory with pattern as follows to
> escape ampersand and $ signs:
>
> <filter class="solr.PatternReplaceFilterFactory" pattern="(&)"
> replacement="" />
>
> I am getting error due to embedded ampersand
>
> [Fatal Error] schema.xml:82:71: The entity name must immediately follow the
> '&' in the entity reference.
> Exception in thread "main" org.xml.sax.SAXParseException: The entity name
> must immediately follow the '&' in the entity reference.
> at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
>
>
> Is there anyway to make it work ?
>
> Appreciate your help.
>
> Thanks.