The full-text retrieval method of SQL 7 is similar to that of Index Server.
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 found in a common logical expression. It means it is very simple, that is, to find the two words that are close to each other.
Example:
Select Content from microsoftrecord where contains (content, '"Bill Gates" near "Paul Allen "')
This means that the full text contains Bill Gates and Paul Allen, and the two words are not far apart.
Formsof inflectional
This function can be used to search for various forms of words, such as the forward, plural, verb, and Noun Forms. Unfortunately, it is useless for Chinese.
Example:
Select productname from products where contains (productname, 'formsof (inflectional, dry )')
*
This function can be used to search for the prefix of a word, but it is useless for Chinese characters.
Example:
Select productname from products where contains (productname, '"Dis *"')
Isabout weight
This function gives different weights to different conditions in composite queries to determine the order of returned record sets.
Select categoryname, description from categories where contains (description, 'isabout spread weight (. 8), sauces weight (. 4), relishes weight (. 2 ))')
The weight value ranges from 0.0 to 1.0.
Containstable
Its usage is basically the same as that of contains, so we will not repeat it here. It should be noted that it returns a table for further query, rather than a query condition.
Freetext
If this method is used, the Word Segmentation technology will be used for fuzzy query during query, and some non-keywords will be filtered out, which is similar to formsof in contains. Unfortunately, there is no support for Chinese characters.
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 between contains and containstable.