3 ms·
> A trick that might help: create a separate SQLite table containing just the article titles to autocomplete against. Another one: build a directed-acyclic-wor
by ignoramous 5y ago
> A trick that might help: create a separate SQLite table containing just the article titles to autocomplete against.
Another one: build a directed-acyclic-word-graph [0][1] of just the page-titles and download it to browser's localStorage for prefix-based searches.
In our usage, ~5M entries take ~18MB. Wikipedia has ~6.3M articles [2].
[0] https://github.com/smhanov/dawg https://github.com/smhanov/dawg
[1] http://stevehanov.ca/blog/?id=115 http://stevehanov.ca/blog/?id=115
[2] https://en.wikipedia.org/wiki/Wikipedia:Size_of_Wikipedia https://en.wikipedia.org/wiki/Wikipedia:Size_of_Wikipedia