Refactor how results are obtained from a search
Make wp_to_es_args static