add delete document and replace document api and some test