Michael Busch wrote on 11/09/2006 09:56 AM:
>
>> This sounds good. Michael, I'd love to see your patch,
>>
>> Chuck
>
> Ok, I'll probably need a few days before I can submit it (have to code
> unit tests and check if it compiles with the current head), because
> I'm quite busy with other stuff right now. But you will get it soon :-)
I've just written my patch and will submit it too once it is fully
tested. I took this approach:
1. Add sizeInBytes() to RAMDirectory
2. Make flushRamSegments() plus new numRamDocs() and ramSizeInBytes()
public in IndexWriter
This does not provide the facility in IndexWriter, but it does provide a
nice api to manage this externally. I didn't do it in IndexWriter for
two reasons:
1. I use ParallelWriter, which has to manage this differently
2. There is no general mechanism in lucene to size documents. I use
have an interface for my readers in reader-valued fields to
support this.
In general, there are things the application knows that lucene doesn't
know that help to manage the size bounds
Chuck
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]