FTS3 and FTS4 are SQLite virtual table modules that allows users to perform full-text searches on a set of documents.
The basic idea is to have a virtual FTS table along a register table.
The virtual table holds the values that are used when searching and sorting as well as an identifier to link the register table.
Facts
- Queries perform much faster when indexes are used.
- Indexes are ignored when SQLite LIKE operator is used.
- Virtual tables require more space compared to regular tables.
- It takes more time to insert a record in a virtual table.
- Always consider
explain query plan
to determine whether your queries aren’t going to work slowly. - FTS does not support suffix search, only prefix.
Links
https://www.sqlite.org/fts3.html
https://lab.getbase.com/killer-search-on-android-part-1
http://stackoverflow.com/questions/29815248/full-text-search-example-in-android
Add Comment