// Extract hits
log.debug("search hits passed to handlers: " + result.size());
searchResult = new ArrayList<SearchHit>();
for (Object o : result) {
SearchableEntity se = searchRegistry.getSearchableEntitiesByName().get(Hibernate.getClass(o).getName());
if (se != null) {
log.debug("extracting hit for indexed class: " + Hibernate.getClass(o).getName());
//noinspection unchecked
searchResult.add( se.getHandler().extractHit(mainQuery, o) );
}
}
log.debug("extracted search hits and final result: " + searchResult.size());