Simon Willnauer commented on LUCENE-8198:

> Why wouldn't a user use IndexWriter.updateDocValue for this?

I assume you mean handle deletes yourself. I explored this as well and there 
were several issues about that like the overhead on disk, the problem that such 
an update is not atomic (I agree we can add additional API to the IW like 
_updateDocument(Term, String field, long docValue, Document doc)_ and the user 
needs to handle deletes in the seacher themself which is quite tricky. I agree 
it's doable. I took this route as an alternative and I found that transparency, 
simplicity and how contained the change is quite appealing. We basically 
already has all stuff in the IW needed for this since we reapply deleted docs 
if a source reader of a merge changes while it's merging and it has 0-impact if 
you don't use it.

> Add ability to persist deletes across merges
> --------------------------------------------
>                 Key: LUCENE-8198
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8198
>             Project: Lucene - Core
>          Issue Type: Improvement
>    Affects Versions: 7.3, master (8.0)
>            Reporter: Simon Willnauer
>            Assignee: Simon Willnauer
>            Priority: Major
>         Attachments: LUCENE-8198.patch
> This allows conditionally persist deletes on a per document basis to prevent 
> them from being merged away. This expert feature is useful to maintain 
> history of documents in the index where otherwise a duplicate storage 
> mechanism would be needed. For instance features like CouchDBs changes API 
> can be build on top of persistent deletes. While using persistent deletes has 
> a considerably small overhead at merge time or when deletes applied to fully 
> deleted segments, there is no impact if persistent deletes are unused.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to