Add additional logging and reduce the size of the query generated for doc replication