Refactors main get_links function with new elasticsearch top_hits feature