Fuzzy search box widget with `Shiny` in R? Fuzzy search box widget with `Shiny` in R? elasticsearch elasticsearch

Fuzzy search box widget with `Shiny` in R?


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.


If you are using selectInput(), then you can set the parameter "choices" to a vector, and the contents of that vector will appear as the user types. The problem with this is that the user cannot select anything that is not contained in the vector.

UI:

selectInput(    "reference_name", label = h3("Selection"), choices = vector_of_search_possibilities, selectize = TRUE, selected = "Alabama"  )

SERVER:reference this object using

input$reference_name