> > >This seems like a silly question, but will keeping hold of Document objects >cause me to run into "Too many files open" problems? If each document object >has a Field.Text which contains a Reader, and the Reader isn't closed till >the document is indexed, would this be an issue? Is the memory consumed by >Document objects directly proportional to the size of the object the Reader >reads? > >Thanks. > >Regards, >Kelvin > Yes, I think if the Reader is a regular FileReader that has been opened, it would consume the file handle. On the other hand, if it is just a String or a StringReader it would consume memory equal (probably greater) to the size of the data. One way to fix this is to create your own Reader class, say DelayedReader, which does not open a file upon creation, but only upon the first read. That would help safe the file handles.
Dmitry -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>