Hi,

>> 1  indexWriter.deleteDocuments(query); // same for terms arg
>> 2  if (indexWriter.hasUncommittedChanges()) {
>> 3     indexWriter.commit();
>> 4  }
>
> hasUncommittedChanges will return true if you deleted (by Term or
> Query), even if that Term or Query matches no documents.

Mhm, this is surprising (in a negative sense). So is there any way to
know if these deletions have actually affected any documents? How
about indexWorker.hasDeletions()? Contracts of these methods are not
documented well enough and I don't feel too confident to make
independent decisions just by looking at the source code :-(

m.

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

Reply via email to