The document to remove must NOT have changed between indexing and removal,
otherwise the index will be corrupted.
This method requires passing the full document to be removed (not just the
ID), and immediately removes the document from the inverted index, allowing
memory to be released. A convenient alternative is discard,
which needs only the document ID, and has the same visible effect, but
delays cleaning up the index until the next vacuuming.
Removes the given document from the index.
The document to remove must NOT have changed between indexing and removal, otherwise the index will be corrupted.
This method requires passing the full document to be removed (not just the ID), and immediately removes the document from the inverted index, allowing memory to be released. A convenient alternative is discard, which needs only the document ID, and has the same visible effect, but delays cleaning up the index until the next vacuuming.