lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ulf Dittmer <>
Subject differences in deleting docs using IndexWriter and IndexModifier?
Date Fri, 18 Apr 2008 11:01:48 GMT
Hello all-

While adapting some code to use IndexWriter instead of
IndexModifier (as indicated by the deprecation
warnings), I stumbled upon an issue that I at first
thought was a bug, but I'm sure it's only because I
don't fully understand how Lucene works.

Basically, I'm using the deleteDocuments(Term) method,
which works as expected in IndexModifier, but which
-for the very same Term- doesn't find and delete a
document in IndexWriter.

I've looked at the source of
IndexWriter.deleteDocuments and
IndexModifier.deleteDocuments, but they seem to go
about deleting documents in very different ways, so it
wasn't obvious to me what's going on.

The source of a short program that exhibits this
behavior is at

I'd be grateful if someone could give me hint of
whether I'm using the API incorrectly, or what's going

Thanks in advance,

Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message