LPS-32689 Extract creation of search context to an utility class