Full-text search in SQLite

Source: Internet
Author: User

Thanks to Comrade Scott Hess of Google, SQLite also launched the full-text search function.

SQLite creates a virtual table to split the input text into B trees based on rules such as spaces and punctuation. This improves the search speed.

How to use this function and how to use it in terms of performance can be further studied.

 

Here I will report on my research results:

1. The full-text search of SQLite is roughly divided into words by space. IfArticleIf the word "ASDF" exists, you will not want to use "SD" to find the content, because it is organized by words as a unit;

 

2. Since it is space-based word segmentation, Chinese characters are naturally not supported, unless you separate each word in an article with spaces or punctuation marks;

 

3. SQLite provides a customizable lexical analyzer. For detailed usage, see the document;

 

4. for more information about Porter, see the source code file "fts3_porter.c". Multiple word shapes of a word are unified into one basic word according to the Basic English specifications, with semantic support.

 

To sum up, we have not provided true semantic word segmentation, so it is up to you to make great efforts.

Link to the official website for full-text search:Http://www.sqlite.org/fts3.html

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.