Hi, I am trying to delete some documents from my index by posting XML-messages to the solr. The unique key for the documents in my index is their url. The XML messages look like this:
<delete><query>url:"http://example.com/path/file"</query></delete> For simple urls everything works fine, but if the url contains an '&' like this: <delete><query>url:"http://example.com/path/file?a=foo&b=bar"</query></delete> an error occurs because the XML is not valid: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character '=' (code 61); expected a semi-colon after the reference for entity 'b' Escaping '&' by using '&' does not help, because the query <delete><query>url:"http://example.com/path/file?a=foo&b=bar"</query></delete> does not match the url in my index. How do I need to escape or encode the url in the XML message? Thank you! Jens
signature.asc
Description: Message signed with OpenPGP using GPGMail