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;}
public override int DoLogic(){string docID = doc.Get(DocMaker.ID_FIELD);if (docID == null){throw new InvalidOperationException("document must define the docid field");}IndexWriter iw = RunData.IndexWriter;iw.UpdateDocument(new Term(DocMaker.ID_FIELD, docID), doc);return 1;}