simplifed SegmentProcessor::getFinalDoc