Fuzzy search box widget with `Shiny` in R?

elasticsearch, fuzzy-search, r, shiny

Solution

Maybe a combobox could be fed a list from stringdist() that would compare the input string against a known list and provide the items with the 10 items with the shortest string distance. Would probably be very inefficient with huge lists, but the algorithm is fairly fast when comparing against a short list.

One of the stringdist methods even compares based on how words are pronounced, not sure if that's useful.

Problem

Has anyone created or seen a Shiny app featuring search box widget giving contextual suggestions as you type, based on fuzzy matching? Bloomberg terminal uses it, Google uses it. One of the possible underlying technologies is called `elasticsearch.org` 's fuzzy query, with two R implementations: - `duncantl/RElasticSearch` - `ropensci/elastic` Search box filter coming with the basic `Shiny`'s datatable doesn't quite cut it. If this is something yet to be integrated with Shiny, any rough guide how to build it? I suspect it would be extremely useful on biggish tables (or documents) with lots of text, when you want to look for specific rows, without displaying the full table.

Original source