private void extract(final QueryKey queryKey,
                         final DocRef pipelineRef,
                         final Pipeline pipeline,
                         final Source source,
                         final SegmentInputStream segmentInputStream,
                         final long count) {
        if (source != null && segmentInputStream != null) {
            LOGGER.debug(() -> "Reading " + count + " segments from stream " + source.getMeta().getId());

            SearchProgressLog.increment(queryKey, SearchPhase.EXTRACTION_TASK_HANDLER_EXTRACT2);
            SearchProgressLog.add(queryKey, SearchPhase.EXTRACTION_TASK_HANDLER_EXTRACT2_EVENTS, count);

            try {
                // Here we need to reload the feed as this will get the related
                // objects Translation etc
                feedHolder.setFeedName(source.getMeta().getFeedName());

                // Set up the meta data holder.
                metaDataHolder.setMetaDataProvider(new StreamMetaDataProvider(metaHolder, pipelineStore));

                metaHolder.setMeta(source.getMeta());
                pipelineHolder.setPipeline(pipelineRef);

                final InputStream inputStream = new IgnoreCloseInputStream(segmentInputStream);

                // Get the encoding for the stream we are about to process.
                final String encoding = StreamUtil.DEFAULT_CHARSET_NAME;

                // Process the boundary.
                LOGGER.logDurationIfDebugEnabled(
                        () -> pipeline.process(inputStream, encoding),
                        () -> LogUtil.message("Processing pipeline {}, stream {}",
                                pipelineRef.getUuid(), source.getMeta().getId()));

            } catch (final TaskTerminatedException e) {
                // Ignore stopped pipeline exceptions as we are meant to get
                // these when a task is asked to stop prematurely.
                LOGGER.debug("Swallowing TaskTerminatedException");
            } catch (final RuntimeException e) {
                throw ExtractionException.wrap(e);
            }
        }
    }
We do this one by one
stroom-search/stroom-search-extraction/src/main/java/stroom/search/extraction/ExtractionTaskHandler.java