fix full-text indexing error, do not delete document before returning