final List<SearchResult> list = new ArrayList<>();
final SimpleDateFormat fmt = new SimpleDateFormat("dd-MM-yyy");
final SimpleDateFormat fmtHour = new SimpleDateFormat("hh:mm:ss");
for (SolrDoc doc: resp.getResponse().getDocs()) {
final SearchResult sr = new SearchResult();
Date videoDate = doc.getVideodate();
if (videoDate == null) {
videoDate = new Date();
}
sr.setDate(fmt.format(videoDate));
sr.setId(doc.getId());
//sr.setImageUrl("thumbnail.spr?id=" + doc.getId());
sr.setImageUrl(doc.getEncodedthumbnail());
sr.setLanguage(doc.getLanguage());
sr.setNumView("" + doc.getNumberOfView());
sr.setPageUrl(doc.getPageurl());
sr.setTitle(doc.getTitle());
sr.setVideoLength(fmtHour.format(doc.getVideoLength()));
list.add(sr);
}
searchForm.setResult(list);