Fixed incorrect variables, and implement simple fuzzy search for ES

@ardnet let's remove this line, then we'll be good to merge - thanks!