If you build your search with elastic search you can provide suggestions vases on hits (not on history) by using suggesters: https://www.elastic.co/guide/en/elasticsearch/reference/current/search-suggesters.html
Maybe this video helps on how to build search with elastic search in your Mendix app: https://www.mendix.com/videos/how-to-build-full-text-search-capabilities-into-your-mendix-app-with-elasticsearch/