In Android, SQLite is used, and full-text retrieval is also supported. Because SQLite supports the FTS table (full-text search for short), For details, refer:
Http://www.sqlite.org/fts3.html#section_1, here we introduce the difference between fts3 and fts4,
Here, fts3 is actually an extension module of SQLite. It is a virtual table module that allows users to perform full-text retrieval. The following is a simple example:
Create virtual table enrondata1 using fts3 (content text );
You can see that an fts3 table is created using the above syntax. During retrieval, as described in the Manual:
Select count (*) from enrondata1 where content match 'linux ';/* 0.03 seconds */
Select count (*) from enrondata2 where content like '% Linux %';/* 22.5 seconds */
See? Match is used here, rather than the traditional like, and the efficiency is very high.
The following syntax is also supported:
Select * From words_fts where words_fts match 'description: company ';
Column name: the keyword to be searched for in this column.
You can also do this:
Select * From words_fts where words_fts match 'description: comp *'
Wildcard characters are supported.