Full-Text Search for SQL 7 is very similar to the Index Server retrieval method.
Contains
And, or, not
Logical expressions can be easily used in contains
Example:
Select username from member where contains (UserInfo, ' "Writer" and "Carpenter")
Select username from member where contains (UserInfo, ' "Writer" OR "Carpenter")
Select username from member where contains (UserInfo, ' "Writer" and not "Carpenter")
NEAR
This is a keyword that is not in the normal logical expression, meaning it is very simple, that is to find the nearest two words
Example:
Select content from Microsoftrecord where contains (content, ' "Bill Gates" NEAR "Paul Allen")
This means finding the full text containing Bill Gates and Paul Allen, and two words are not far apart.
Formsof inflectional
This function can look up various forms of words, such as past tense, plural, verb form, noun form, etc. But it's no use to Chinese.
Example:
SELECT ProductName from the products WHERE CONTAINS (ProductName, ' formsof (inflectional, dry) ')
*
This feature can look up the prefix of a word, but it is not useful for Chinese
Example:
SELECT ProductName from the products WHERE CONTAINS (ProductName, ' dis* ')
Isabout WEIGHT
This feature can give different weights to different conditions in a composite query to determine the order of the returned recordset
SELECT CategoryName, Description from Categories WHERE CONTAINS (Description, ' isabout spread weight (. 8), sauces weight (. 4), relishes weight (. 2))
The value of the weight can be from 0.0 to 1.0
ContainsTable
It is used in the same way as contains, and this is no longer repeated here. To mention is that it returns a table for you to query further, not a query condition.
FreeText
If you use this method, then the query will use the word segmentation technology to achieve fuzzy query, and filter out some non-keywords, more similar to the contains in the formsof, but there is no support for Chinese
Example:
SELECT CategoryName from Categories WHERE FREETEXT (Description, ' sweetest candy bread and dry meat ')
Freetexttable
The difference between it and FREETEXT is the same as that of contains and containstable.
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.