On Wed, May 20, 2009 at 3:27 PM, Shai Erera <ser...@gmail.com> 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
constructor?

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.

-Yonik
http://www.lucidimagination.com

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

Reply via email to