Reindexing. If I want to add new fields or change existing fields in the index I need to go through all documents of the index.
On Wed, Jun 3, 2015 at 4:46 PM, Robert Muir <rcm...@gmail.com> wrote: > 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 > > -- Anton Zenkov | Senior Software Developer Crimson Hexagon 155 Seaport Boulevard Boston, MA 02210 @zenant | @crimsonhexagon | O: (617) 547-1072 | Email: azen...@crimsonhexagon.com