lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yonik Seeley <>
Subject Re: Adding clear() to Document
Date Wed, 20 May 2009 20:01:34 GMT
On Wed, May 20, 2009 at 3:27 PM, Shai Erera <> wrote:
> I noticed Document does not have a clear() method, to remove all the Fields
> set on it.

Document's state is so simple (a List and a boost), reuse doesn't seem worth it.
What if, instead, we allowed the List to be passed into via Document's

To put it into perspective, the Document object then becomes lighter
weight than the String object (provided the user is caching the List
of fields).  And really, I think caching the list of fields is even
overboard for pretty much all of the applications out there - I doubt
it would ever be significant given how much relative work is needed to
index a document.


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

View raw message