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 Bill Bell <bi...@gmail.com> on 2012/04/28 03:50:35 UTC

Ampersand issue

We are indexing a simple XML field from SQL Server into Solr as a stored field. We have noticed that the &amp; is outputed as &amp;amp; when using wt=XML. When using wt=JSON we get the normal &amp;. If there a way to indicate that we don't want to encode the field since it is already XML when using wt=XML ?

Bill Bell
Sent from mobile


Re: Ampersand issue

Posted by Ryan McKinley <ry...@gmail.com>.
If your json value is &amp; the proper xml value is &amp;amp;

What is the value you are setting on the stored field?  is is & or &amp;?


On Mon, Apr 30, 2012 at 12:57 PM, William Bell <bi...@gmail.com> wrote:
> One idea was to wrap the field with CDATA. Or base64 encode it.
>
>
>
> On Fri, Apr 27, 2012 at 7:50 PM, Bill Bell <bi...@gmail.com> wrote:
>> We are indexing a simple XML field from SQL Server into Solr as a stored field. We have noticed that the &amp; is outputed as &amp;amp; when using wt=XML. When using wt=JSON we get the normal &amp;. If there a way to indicate that we don't want to encode the field since it is already XML when using wt=XML ?
>>
>> Bill Bell
>> Sent from mobile
>>
>
>
>
> --
> Bill Bell
> billnbell@gmail.com
> cell 720-256-8076

Re: Ampersand issue

Posted by William Bell <bi...@gmail.com>.
One idea was to wrap the field with CDATA. Or base64 encode it.



On Fri, Apr 27, 2012 at 7:50 PM, Bill Bell <bi...@gmail.com> wrote:
> We are indexing a simple XML field from SQL Server into Solr as a stored field. We have noticed that the &amp; is outputed as &amp;amp; when using wt=XML. When using wt=JSON we get the normal &amp;. If there a way to indicate that we don't want to encode the field since it is already XML when using wt=XML ?
>
> Bill Bell
> Sent from mobile
>



-- 
Bill Bell
billnbell@gmail.com
cell 720-256-8076