<Doctype HTML public-wcdtd XHTML stricten httpwwwworgtrxhtmldtdxhtml-strictdtd>
Full-text search is a computer program that scans every word in an article and creates an index for each word to indicate the number and position of the word in the article. When a user queries a Word Table Based on the created index, it is similar to the process of searching words in a dictionary. A full-text retrieval system is a software system established based on the full-text retrieval theory to provide full-text retrieval services.
Contains:
The contains statement is used to search for a word or phrase in all or specified columns of a table. The prefix of a word or phrase is similar to that of a word; A derived word of a word; a repeated word.
The syntax format of the contains statement is:
Contains ({Column | *}), <contains_search_condition>)
Column is a search column. When "*" is used, it indicates that all full-text index columns in the table are searched.
Contains_search_condition describes the search content of the contains statement. Its Syntax format is:
{<Simple_term> | <prefix_term> | <proximity_term> | <generation_term> | <weighted_term >}[ {and | and not | or} <contains_search_condition>}] [... n]
The simple_term and prefix_term parameters are briefly described below:
Simple_term is the word or phrase searched by the contains statement. When searching for a phrase, double quotation marks must be used as the delimiter. The format is:
{'Word' | "phrase "}
Prefix_term indicates the prefix of the word or phrase searched by the contains statement. The format is:
{"Word *" | "phrase *"}
For example, the following statement retrieves the name of a book containing the "Database" or "computer" string and Its annotation information in the title column and Notes column of the book table:
Select title, notes
From book
Where contains (tilte, 'database') or contains (notes, 'database ')
Or contains (title, 'computer ') or contains (notes, 'computer ')
Freetext
The freetext statement is used to search for a free text string in all or specified columns of a table and return data rows matching the string. Therefore, the freetext statement is also called a free full-text query.
The syntax format of the freetext statement is: freetext ({Column | *}, 'freetext _ string ')
Column is the column to be searched. If "*" is used, all full-text index columns in the table are searched. The freetext_string parameter indicates the searched free text format string.
For example, the following statement uses the freetext statement to search data rows in the book table that contain the "craft" and "mechanical" strings. Note that the SQL syntax name divides the string into two words for search:
# Database Technology