Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Lucene 在 IndexWriter 上有一个 UpdateDocument 方法,它将删除现有文档并添加一个新文档。与显式调用 DeleteDocuments 然后调用 AddDocument 相比,使用此方法有什么好处吗?
原子性。update是原子的,而delete+add是单独的、孤立的调用。
update
delete
add