Fix missing context in createSearchResultElements