private String writeUpdateString ( Map < String , String > param ) { StringBuffer fieldStringBuffer = new StringBuffer ( ) ; for ( Entry < String , String > entry : param . entrySet ( ) ) { fieldStringBuffer . append ( "<field name=\"" ) . append ( entry . getKey ( ) ) . append ( "\">" ) . append ( StringEscapeUtils . escapeXml ( entry . getValue ( ) ) ) . append ( "</field>" ) ; } fieldStringBuffer . insert ( 0 , "<add><doc>" ) . append ( "</doc></add>" ) ; return fieldStringBuffer . toString ( ) ; }
Turn a a message into a Solr document