Re: CDATA response is coming with lt: instead of
It seems this is done in XML(Response)Writer: XML.escapeAttributeValue(stylesheet, writer); I suppose this is valid according with XML escaping rules, but it's just a thought of mine because I don't know so strictly those rules. I see the character is being escaped so what you get is coheren (I mean, I think it's not a mistake) Did you try with another response writer (e.g. JSON)? On 04/21/2015 03:46 PM, mesenthil1 wrote: We are using DIH for indexing XML files. As part of the xml we have xml enclosed with CDATA. It is getting indexed but in response the CDATA content is coming as decoded terms instead of symbols. Example: /Feed file: / add doc field name=id123/field field name=description_tabc pqr xyz/field * field name=images_t![CDATA[Imagesimageuri/images/series/chiunks/flipbooksflipbook30_640x480.jpg/uri/image/Images]]/field/b /doc /add XML response:(curl and browser view source) ?xml version=1.0 encoding=UTF-8? response result name=response numFound=1 start=0 doc str name=id123/str str name=description_tabc pqr xyz/str bstr name=images_tlt;Imagesgt; lt;imagegt; lt;urigt;/images/series/chiunks/flipbooksflipbook30_640x480.jpglt;/urigt; lt;/imagegt; lt;/Imagesgt; /str/b /doc /result /response Instead, we are looking to get the response as well within CDATA as below ?xml version=1.0 encoding=UTF-8? response result name=response numFound=1 start=0 doc str name=id123/str str name=description_tabc pqr xyz/str bstr name=images_t![CDATA[Imagesimageuri/images/series/chiunks/flipbooksflipbook30_640x480.jpg/uri/image/Images ]]/b /str /doc /result /response Can anyone please help me if this is possible? Thanks, Senthil -- View this message in context: http://lucene.472066.n3.nabble.com/CDATA-response-is-coming-with-lt-instead-of-tp4201271.html Sent from the Solr - User mailing list archive at Nabble.com.
CDATA response is coming with lt: instead of
We are using DIH for indexing XML files. As part of the xml we have xml enclosed with CDATA. It is getting indexed but in response the CDATA content is coming as decoded terms instead of symbols. Example: /Feed file: / add doc field name=id123/field field name=description_tabc pqr xyz/field * field name=images_t![CDATA[Imagesimageuri/images/series/chiunks/flipbooksflipbook30_640x480.jpg/uri/image/Images]]/field/b /doc /add XML response:(curl and browser view source) ?xml version=1.0 encoding=UTF-8? response result name=response numFound=1 start=0 doc str name=id123/str str name=description_tabc pqr xyz/str bstr name=images_tlt;Imagesgt; lt;imagegt; lt;urigt;/images/series/chiunks/flipbooksflipbook30_640x480.jpglt;/urigt; lt;/imagegt; lt;/Imagesgt; /str/b /doc /result /response Instead, we are looking to get the response as well within CDATA as below ?xml version=1.0 encoding=UTF-8? response result name=response numFound=1 start=0 doc str name=id123/str str name=description_tabc pqr xyz/str bstr name=images_t![CDATA[Imagesimageuri/images/series/chiunks/flipbooksflipbook30_640x480.jpg/uri/image/Images ]]/b /str /doc /result /response Can anyone please help me if this is possible? Thanks, Senthil -- View this message in context: http://lucene.472066.n3.nabble.com/CDATA-response-is-coming-with-lt-instead-of-tp4201271.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: CDATA response is coming with lt: instead of
Thanks. For wt=json, it is bringing the results properly. I understand the reason for getting this in lt;. As our solr client is expecting this to be like within CDATA, I am looking for a way to achieve this. -- View this message in context: http://lucene.472066.n3.nabble.com/CDATA-response-is-coming-with-lt-instead-of-tp4201271p4201281.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: CDATA response is coming with lt: instead of
Escaped entities and CDATA sections are two syntaxes for the same thing. After these two are parsed, they are exactly the same XML information. If your client can only handle one of the two syntaxes, they are not actually using XML. This is not a bug. Your client appears misguided. wunder Walter Underwood wun...@wunderwood.org http://observer.wunderwood.org/ (my blog) On Apr 21, 2015, at 7:10 AM, mesenthil1 senthilkumar.arumu...@viacomcontractor.com wrote: Thanks. For wt=json, it is bringing the results properly. I understand the reason for getting this in lt;. As our solr client is expecting this to be like within CDATA, I am looking for a way to achieve this. -- View this message in context: http://lucene.472066.n3.nabble.com/CDATA-response-is-coming-with-lt-instead-of-tp4201271p4201281.html Sent from the Solr - User mailing list archive at Nabble.com.
Re: CDATA response is coming with lt: instead of
On Tue, Apr 21, 2015 at 9:46 AM, mesenthil1 senthilkumar.arumu...@viacomcontractor.com wrote: We are using DIH for indexing XML files. As part of the xml we have xml enclosed with CDATA. It is getting indexed but in response the CDATA content is coming as decoded terms instead of symbols. Your problem is ambiguous since we can't tell what is data, and what is markup (transfer syntax). If you were to index this same data using JSON, what would you pass? Is it this: Imagesimageuri... Or is it this? ![CDATA[Imagesimageuri... If it's the former, you're already set - it's working that way now. If it's the latter, then if you index that in XML you will need to escape it like any other XML value. Otherwise the XML parser will remove the CDATA stuff before it gets to the indexing part of Solr. -Yonik