}
public void indexMetFile(File file, boolean delete)
throws InstantiationException, FileNotFoundException, IOException,
SolrServerException {
SerializableMetadata metadata = new SerializableMetadata("UTF-8", false);
metadata.loadMetadataFromXmlStream(new FileInputStream(file));
if (delete) {
server.deleteById(metadata.getMetadata("CAS." + CoreMetKeys.PRODUCT_ID));
}
server.add(this.getSolrDocument(metadata));
}