lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitry Serebrennikov <dmit...@earthlink.net>
Subject Re: Indexing and Duplication
Date Thu, 21 Mar 2002 17:10:21 GMT
>
>
>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:lucene-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-user-help@jakarta.apache.org>


Mime
View raw message