add check indexid for update or insert