Why Lucene doesn't support any type of update to an existing document

后端 未结 1 1346
有刺的猬
有刺的猬 2021-01-05 04:10

My use case involves index a Lucene document, then on multiple future occasions add terms that point to this existing doc, that\'s without deleting and re-adding the entire

相关标签:
1条回答
  • 2021-01-05 04:49

    I do know that a document can not be truly updated. My question is why?

    Gili, editing a document will cause changes in the related terms postings and this is problematic due to to the terms posting-list structure. The posting-list is sorted and stored sequential in memory. Thus to add a document to a term's posting-list you have to give it a higher doc id this is done by deleting and re-index the entire document.

    0 讨论(0)
提交回复
热议问题