add_docid function

Set the docid for multi-document objects