Implementation of full text search on Android
Chris Yang
Posted on October 28, 2017
Plan A: Use Lucene
- Lucene http://lucene.apache.org/
The recommended version is 4.7 with Java 6 .
Plan B: Use SQLite FTS3/FTS4
- SQLite FTS3 and FTS4 Extensions http://www.sqlite.org/fts3.html
1. Introduction to FTS3 and FTS4
1.1. Differences between FTS3 and FTS4
1.2. Creating and Destroying FTS Tables
1.3. Populating FTS Tables
1.4. Simple FTS Queries
1.5. Summary
2. Compiling and Enabling FTS3 and FTS4
3. Full-text Index Queries
3.1. Set Operations Using The Enhanced Query Syntax
3.2. Set Operations Using The Standard Query Syntax
4. Auxiliary Functions - Snippet, Offsets and Matchinfo
4.1. The Offsets Function
4.2. The Snippet Function
4.3. The Matchinfo Function
5. Fts4aux - Direct Access to the Full-Text Index
6. FTS4 Options
6.1. The compress= and uncompress= options
6.2. The content= option
6.2.1. Contentless FTS4 Tables
6.2.2. External Content FTS4 Tables
6.3. The languageid= option
6.4. The matchinfo= option
6.5. The notindexed= option
6.6. The prefix= option
7. Special Commands For FTS3 and FTS4
7.1. The "optimize" command
7.2. The "rebuild" command
7.3. The "integrity-check" command
7.4. The "merge=X,Y" command
7.5. The "automerge=N" command
8. Tokenizers
8.1. Custom (Application Defined) Tokenizers
8.2. Querying Tokenizers
9. Data Structures
9.1. Shadow Tables
9.2. Variable Length Integer (varint) Format
9.3. Segment B-Tree Format
9.3.1. Segment B-Tree Leaf Nodes
9.3.2. Segment B-Tree Interior Nodes
9.4. Doclist Format
Appendix A: Search Application Tips
- Adding Search Functionality https://developer.android.com/training/search/index.html
2.1 Setting Up the Search Interface
Learn how to add a search interface to your app and how to configure an activity to handle search queries.2.2 Storing and Searching for Data
Learn a simple way to store and search for data in a SQLite virtual database table.2.3 Remaining Backward Compatible
Learn how to keep search features backward compatible with older devices.
- Full text search example in Android https://stackoverflow.com/questions/29815248/full-text-search-example-in-android
💖 💪 🙅 🚩
Chris Yang
Posted on October 28, 2017
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.