Since an IndexReader can't know what indexInterval was used and that each segment could have a different indexInterval, wouldn't it be better too have a parameter that sets an average indexInterval that should be used? The fraction you talk about could then be calculated by the IndexReader per segment.
Or the other way around: the maximum number of index entries that should be stored. The IndexReader can check if all indexes will fit, and if not, calculate how many should be skipped per segment to get a good coverage. Luc -----Original Message----- From: Doug Cutting [mailto:[EMAIL PROTECTED] Sent: maandag 14 november 2005 18:19 To: java-user@lucene.apache.org Subject: Re: Memory Usage Marvin Humphrey wrote: > You *can't* set it on the reader end. If you could set it, the reader > would get out of sync and break. The value is set per-segment at write > time, and the reader has to be able to adapt on the fly. It would actually not be too hard to change things so that there was such a parameter that could be set on an IndexReader. It would determine the fraction of entries in the .tii file that are kept in RAM. So if the parameter were, e.g., 10, then only every tenth entry in the .tii file would be kept in RAM, equivalent to 10x the indexInterval used. Doug --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]