HH-40214 add replace_root_node param to Doc.put