/** * Proxy to the original next() call, but estimates the overhead of * loading the next term. */ @Override public BytesRef next() throws IOException { BytesRef term = termsEnum.next(); if (term == null && this.flushBuffer != 0) { // We have reached the end of the termsEnum, flush the buffer flush(); } else { this.flushBuffer += estimator.bytesPerValue(term); if (this.flushBuffer >= FLUSH_BUFFER_SIZE) { flush(); } } return term; }
/** * Proxy to the original next() call, but estimates the overhead of * loading the next term. */ @Override public BytesRef next() throws IOException { BytesRef term = termsEnum.next(); if (term == null && this.flushBuffer != 0) { // We have reached the end of the termsEnum, flush the buffer flush(); } else { this.flushBuffer += estimator.bytesPerValue(term); if (this.flushBuffer >= FLUSH_BUFFER_SIZE) { flush(); } } return term; }
/** * Proxy to the original next() call, but estimates the overhead of * loading the next term. */ @Override public BytesRef next() throws IOException { BytesRef term = termsEnum.next(); if (term == null && this.flushBuffer != 0) { // We have reached the end of the termsEnum, flush the buffer flush(); } else { this.flushBuffer += estimator.bytesPerValue(term); if (this.flushBuffer >= FLUSH_BUFFER_SIZE) { flush(); } } return term; }
/** * Proxy to the original next() call, but estimates the overhead of * loading the next term. */ @Override public BytesRef next() throws IOException { BytesRef term = termsEnum.next(); if (term == null && this.flushBuffer != 0) { // We have reached the end of the termsEnum, flush the buffer flush(); } else { this.flushBuffer += estimator.bytesPerValue(term); if (this.flushBuffer >= FLUSH_BUFFER_SIZE) { flush(); } } return term; }
/** * Proxy to the original next() call, but estimates the overhead of * loading the next term. */ @Override public BytesRef next() throws IOException { BytesRef term = termsEnum.next(); if (term == null && this.flushBuffer != 0) { // We have reached the end of the termsEnum, flush the buffer flush(); } else { this.flushBuffer += estimator.bytesPerValue(term); if (this.flushBuffer >= FLUSH_BUFFER_SIZE) { flush(); } } return term; }