On Wed, Jun 3, 2015 at 4:00 PM, Anton Zenkov <azen...@crimsonhexagon.com> wrote:

>
> for (int i = 0; i < leafReader.maxDoc(); i++) {
>     DocumentStoredFieldVisitor visitor = new DocumentStoredFieldVisitor();
>     fieldsReader.visitDocument(i, visitor);
>     visitor.getDocument();
>
> }
>
> }
>
> I was wondering if there is better way of doing this and if there are plans
> to make access to the faster document loading through some API. Should I
> try to come up with a patch for this?
>
> Thanks!
> Anton

I agree its slow, but what process other than merging really needs to
loop through all documents and read their stored fields? For merging,
having a 64KB buffer around doesn't impact users, because there is
just one thread and its short-lived. Keeping around 64KB ram
per-segment per-thread in general seems too heavy IMO.

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

Reply via email to