@Override
public Task handle(final Task task) throws Fail {
Index index = indexes.index(task.namespace().bucket(Type.DOCUMENT));
Assert.nonNull(task);
try {
final TsvJsonWriter tsvWriter = new TsvJsonWriter(writer(fs, task, inputFilename(task)));
for (final Document doc : index.find(task.query())) tsvWriter.write(doc);
tsvWriter.close();
final Writer parametersWriter = writer(fs, task, parametersFilename(task));
parametersWriter.write(task.transform().parametersJson());
parametersWriter.close();
}