}
if (id.isEmpty()) {
throw new IllegalArgumentException("The parsed Representation id MUST NOT be empty!");
}
SolrServer server = getServer();
FieldMapper fieldMapper = getFieldMapper();
SolrDocument doc;
long start = System.currentTimeMillis();
try {
doc = getSolrDocument(server,fieldMapper,id);
} catch (SolrServerException e) {
throw new YardException("Error while getting SolrDocument for id" + id, e);
} catch (IOException e) {
throw new YardException("Unable to access SolrServer", e);
}
long retrieve = System.currentTimeMillis();
Representation rep;
if (doc != null) {
// create an Representation for the Doc! retrieve
log.debug(String.format("Create Representation %s from SolrDocument",
doc.getFirstValue(fieldMapper.getDocumentIdField())));
rep = createRepresentation(fieldMapper,doc, null);
} else {
rep = null;
}
long create = System.currentTimeMillis();