use of eu.europeana.indexing.solr.SolrDocumentPopulator in project metis-framework by europeana.
the class FullBeanPublisher method publishToSolr.
private void publishToSolr(RdfWrapper rdf, FullBeanImpl fullBean) throws IndexingException {
// Create Solr document.
final SolrDocumentPopulator documentPopulator = new SolrDocumentPopulator();
final SolrInputDocument document = new SolrInputDocument();
documentPopulator.populateWithProperties(document, fullBean);
documentPopulator.populateWithFacets(document, rdf);
// Save Solr document.
try {
solrServer.add(document);
} catch (IOException e) {
throw new IndexerRelatedIndexingException(SOLR_SERVER_PUBLISH_ERROR, e);
} catch (SolrServerException | RuntimeException e) {
throw new RecordRelatedIndexingException(SOLR_SERVER_PUBLISH_ERROR, e);
}
}
Aggregations