lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shai Erera <>
Subject Adding clear() to Document
Date Wed, 20 May 2009 19:27:30 GMT
I noticed Document does not have a clear() method, to remove all the Fields
set on it. If we want to encourage the reuse of Document and Field, I think
it's a required method. We do have remove* versions, but no clear().

BTW, I noticed that Field's constructors check for null value and throw an
exception, however the setter methods don't. Shouldn't they also do these

I can create a patch which covers both, unless you have an objection.


View raw message