tantivy-py
tantivy-py copied to clipboard
Add delete-by-query and deprecate delete_documents. fix #432 and #297
Quick recap: we're trying to solve the very confusing problem of delete_documents(<field>, <value>) not applying query parsing rules like tokenization to <value>. This is a bit of a footgun currently so we need to improve the dev experience here.
Based on my earlier work and thinking in #435, I think this is the best way to go:
- Add a new method
delete_documents_by_query(), which exposes thedelete_querymethod from tantivy - Add a new method name
delete_documents_by_term, which does the same things as whatdelete_documentsused to do. - Retain
delete_documents(), but make it a wrapper that callsdelete_documents_by_termand put a deprecation notice on the wrapper. Then we can look at removing the wrapper in a future version.