You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Daniel Penning <dp...@gamona.de> on 2013/05/06 13:32:55 UTC
updating/deleting uncomitted documents
Hi
If a Document is updated multiple times in one transaction it may end up
with old versions not getting deleted, depending on when the IndexWriter
got flushed. I couln't find an details about this behaviour in the
documentation. Is this the expected behaviour and will forcing a flush
by opening/reopening a NRT-Reader still allow deletion of uncommited
Documents in future versions of Lucene?
Daniel
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: updating/deleting uncomitted documents
Posted by Daniel Penning <dp...@gamona.de>.
I'm sorry, there was a bug in my test case which caused deleted
documents to be shown as live documents.
Am 06.05.2013 13:36, schrieb Michael McCandless:
> On Mon, May 6, 2013 at 7:32 AM, Daniel Penning <dp...@gamona.de> wrote:
>
>> If a Document is updated multiple times in one transaction it may end up
>> with old versions not getting deleted, depending on when the IndexWriter got
>> flushed.
> Hmm that should not be the case.
>
> If you use updateDocument, and the Term you pass to it matches the
> previous document(s) you had added, then you should at any time only
> ever see the one [latest version] of the document visible in a
> near-real-time reader.
>
> Do you have a test case showing the issue...?
>
> Mike McCandless
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org
Re: updating/deleting uncomitted documents
Posted by Michael McCandless <lu...@mikemccandless.com>.
On Mon, May 6, 2013 at 7:32 AM, Daniel Penning <dp...@gamona.de> wrote:
> If a Document is updated multiple times in one transaction it may end up
> with old versions not getting deleted, depending on when the IndexWriter got
> flushed.
Hmm that should not be the case.
If you use updateDocument, and the Term you pass to it matches the
previous document(s) you had added, then you should at any time only
ever see the one [latest version] of the document visible in a
near-real-time reader.
Do you have a test case showing the issue...?
Mike McCandless
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org