/** * Validates that an "update" (add, commit or optimize) results in success. * * :TODO: currently only deals with one add/doc at a time, this will need changed if/when SOLR-2 is resolved * * @param xml The XML of the update * @return null if successful, otherwise the XML response to the update */ public String validateUpdate(String xml) throws SAXException { return checkUpdateStatus(xml, "0"); }
/** * Validates that an "update" (add, commit or optimize) results in success. * * :TODO: currently only deals with one add/doc at a time, this will need changed if/when SOLR-2 is resolved * * @param xml The XML of the update * @return null if successful, otherwise the XML response to the update */ public String validateErrorUpdate(String xml) throws SAXException { try { return checkUpdateStatus(xml, "1"); } catch (SolrException e) { // return ((SolrException)e).getMessage(); return null; // success } }