text: public int doLogic() throws Exception {final String docID = doc.get(DocMaker.ID_FIELD);if (docID == null) {throw new IllegalStateException("document must define the docid field");}final IndexWriter iw = getRunData().getIndexWriter();iw.updateDocument(new Term(DocMaker.ID_FIELD, docID), doc);return 1;}