Add indexing stage to downsampling pipeline.