making search work again with the api/elastic search

edited