use of com.odysseusinc.arachne.portal.model.solr.SolrCollection in project ArachneCentralAPI by OHDSI.
the class BaseSolrServiceImpl method indexBySolr.
@Override
public void indexBySolr(final List<? extends SolrEntity> entities) {
try {
final Map<SolrCollection, List<SolrEntity>> entitiesGroupByCollection = entities.stream().collect(Collectors.groupingBy(SolrEntity::getCollection));
entitiesGroupByCollection.forEach((key, value) -> putDocuments(key.getName(), value.stream().map(this::getValuesByEntity).collect(Collectors.toList())));
} catch (final Exception e) {
throw new SolrException(e);
}
}
Aggregations