lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Trejkaz <>
Subject Re: DocValue update methods don't appear to throw exception if the document doesn't exist
Date Tue, 04 Jul 2017 21:53:27 GMT
On Tue, 4 Jul 2017 at 22:39, Joe Ye <> 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.)


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