lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Ye <yuanzhou...@gmail.com>
Subject Re: DocValue update methods don't appear to throw exception if the document doesn't exist
Date Thu, 06 Jul 2017 10:28:17 GMT
Thanks very much TX!

Regarding "But the updates don't actually occur during the call", could you
elaborate on this a bit more? So when would the actual update occur, by
which I mean persisting to disk? Is there a cache of a number of docValues
updates before committing to disk? If so, when happens if a crash occurs
before those updates are committed?

Many thanks,
Joe


On Tue, Jul 4, 2017 at 10:53 PM, Trejkaz <trejkaz@trypticon.org> wrote:

> On Tue, 4 Jul 2017 at 22:39, Joe Ye <yuanzhou.ye@gmail.com> wrote:
>
> > Hi,
> >
> > I'm using Lucene core 6.6.
> >
> > I noticed an issue that DocValue update methods
> > (indexWriter.updateNumericDocValue
> > & indexWriter.updateBinaryDocValue) don't appear to throw exception or
> > return any error code if the document doesn't exist. Is this
> intentional? I
> > don't want to check the existence of the document before each docValue
> > update.
>
>
> Given that they take Term or Query, that's what one would intuitively
> expect from such an API (it will match 0..n docs.)
>
> But the updates don't actually occur during the call, so there is no way
> for it to know how many updates will happen in advance anyway. (Otherwise
> it would be nice to know the number of docs it updated, like in JDBC.)
>
> TX
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message