Awesomplete auto complete data-list


#1

I’ve seen the amazing, tiny open source search auto-completion script awesomplete, which also has been used on kirby-site and i have been wondering what’s the best way to feed it with a list of keywords and phrases (best to pull it from content) without overloading everything and keep it smooth.

e.g. i imagine running though all pages and split it into seperate strings would require quite the processing power. so i have been wondering if there’s any good practice to get most out of it. to give the best user experience…


#2

I think there are two options (if you don’t want to define them manually through tags etc.):

  • use a keyword extractor, e.g. https://github.com/Richdark/RAKE-PHP
  • build your data list over time from what people are actually typing into your search form (and evaluate this against your search results), i.e. if the search yields a result, add it to your data list.

After all, you don’t really want every stupid word in your texts as a data-list keyword.


#3

yeah, for the simple way out i have actually implemented a tags field where i specify the autocompletion,

maybe somewhat it’s possible to force a specific search query.

happy to hear more suggestions though.