switch (docType) {
case "trec":
Properties properties = new Properties();
properties.setProperty(PropertyBasedDocumentFactory.MetadataKeys.ENCODING, "UTF-8");
final TRECDocumentFactory documentFactory = new TRECDocumentFactory(properties);
collection = new TRECDocumentCollection(files,
documentFactory, SegmentedDocumentCollection.DEFAULT_BUFFER_SIZE, compression, metadataFile);
break;