Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> 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

[1] http://stevehanov.ca/blog/?id=115

[2] https://en.wikipedia.org/wiki/Wikipedia:Size_of_Wikipedia



A version of [1] with the pictures working: https://web.archive.org/web/20120211141906/http://stevehanov...


Thanks for making me aware of a new data structure !




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: