code: public void indexDocument(String docXML) throws Exception {
  
  		String xml = "<add>" + docXML + "</add>";
  		DirectXmlRequest xmlreq = new DirectXmlRequest("/update", xml);
  		server.request(xmlreq);
  	}
docs: Indexing API for document in xml format*