Simon Willison’s Weblog

Subscribe

Wednesday, 19th December 2018

Fast Autocomplete Search for Your Website (via) I wrote a tutorial for the 24 ways advent calendar on building fast autocomplete search for a website on top of Datasette and SQLite. I built the demo against 24 ways itself—I used wget to recursively fetch all 330 articles as HTML, then wrote code in a Jupyter notebook to extract the raw data from them (with BeautifulSoup) and load them into SQLite using my sqlite-utils Python library. I deployed the resulting database using Datasette, then wrote some vanilla JavaScript to implement autocomplete using fast SQL queries against the Datasette JSON API.

# 12:26 am / jupyter, 24-ways, sqlite, search, autocomplete, datasette, beautifulsoup

Fast Autocomplete Search for Your Website

Visit Fast Autocomplete Search for Your Website

Every website deserves a great search engine—but building a search engine can be a lot of work, and hosting it can quickly get expensive.

[... 4,159 words]

If you wrap your main content – that is, the stuff that isn’t navigation, logo and main header etc – in a

tag, a screen reader user can jump immediately to it using a keyboard shortcut. Imagine how useful that is – they don’t have to listen to all the content before it, or tab through it to get to the main meat of your page.

Bruce Lawson

# 1:07 pm / html, accessibility, bruce-lawson

2018 » December

MTWTFSS
     12
3456789
10111213141516
17181920212223
24252627282930
31