Fetchnotes / forge-sqlite

Native persistence for HTML5 iOS apps using Trigger.IO
4 stars 1 forks source link

Use SQLite Full Text Search for faster querying #2

Open ryngonzalez opened 10 years ago

ryngonzalez commented 10 years ago

Brent Simmons (Vesper) has been writing up his findings while working to bring sync to Vesper (all of @Fetchnotes/dev should be reading his illuminating posts, btw), and recently brought up full-text search in SQLite:

SQLite has full-text search (FTS) extensions. (I believe these are included with the on-the-system SQLite. If not, I’d have to compile my own SQLite and use that. Do-able.)

http://inessential.com/2014/03/29/unfrozen_cave_man_searching

FTS3 and FTS4 are SQLite virtual table modules that allows users to perform full-text searches on a set of documents. The most common (and effective) way to describe full-text searches is "what Google, Yahoo, and Bing do with documents placed on the World Wide Web". Users input a term, or series of terms, perhaps connected by a binary operator or grouped together into a phrase, and the full-text query system finds the set of documents that best matches those terms considering the operators and groupings the user has specified. This article describes the deployment and usage of FTS3 and FTS4.

https://www.sqlite.org/fts3.html

horak commented 10 years ago

Interesting stuff