moreFields.add(SearchManager.makeField("_valid", "-1", true, true));
} else {
String isValid = "1";
for (MetadataValidation vi : validationInfo) {
String type = vi.getId().getValidationType();
MetadataValidationStatus status = vi.getStatus();
if (status == MetadataValidationStatus.INVALID) {
isValid = "0";
}
moreFields.add(SearchManager.makeField("_valid_" + type, status.getCode(), true, true));
}
moreFields.add(SearchManager.makeField("_valid", isValid, true, true));
}
searchMan.index(schemaMan.getSchemaDir(schema), md, metadataId, moreFields, metadataType, root, forceRefreshReaders);
} catch (Exception x) {