Full text search application (2)

zhaozj2021-02-11  231

Contains Syntax We usually use Contains in the WHERE clause, just like this: select * from table_name where contacts (fulltext_column, 'search contents'). We learn through examples, assume that there are tables students, where address is a full text retrieval. 1. Query the address in Beijing Select Student_ID, Student_nameFrom StudentSwhere Contains (address, 'beijing') Remark: Beijing is a word, which is enclosed in single quotes. 2. Query the address in Hebei Province Select Student_ID, Student_nameFrom StudentSwhere Contains (address, '"Heibei Province") Remark: Hebei Province is a phrase, which is also enclosed in single quotes. 3. Query the address in Hebei Province or Beijing Select Student_ID, Student_nameFrom StudentSwhere Contains (address, '"Heibei Province" OR BEIJING') Remark: You can specify a logical operator (including both, and not, or). 4. There Query 'Nanjing Road' word address SELECT student_id, student_nameFROM studentsWHERE CONTAINS (address, 'nanjing NEAR road') remark: The above query returns a 'nanjing road', 'nanjing east road', 'nanjing west road' The address of the words. A NEAR B, indicating that the conditions are: a close to B. 5. Query the address of 'Lake' started SELECT Student_ID, Student_NameFrom StudentSwhere Contains (address, '"hu *") Remark: The above query will return the address containing the words of' huBei ',' Hunan 'and other words. Remember is *, not%. 6. Similar weighted query Select Student_ID, Student_NameFrom StudentSwhere Contains (address, 'isabout, county wright (.4))') Remark: isabout is the keyword for this query, and Weight specifies a mesh Number of 0 to 1, similar coefficient (my understanding). Indicates that different conditions have different focuses. 7. Single query Select Student_ID, Student_nameFrom StudentSwhere Contains (address, 'formsof (Inflectional, street)') Remark: The query will return the address containing the words of 'Street', 'Streets'. For the verbs, it will return to its different timings, such as: Dry, will return DRY, DRIED, DRYING, and more. All the above examples use English, do not use Chinese because some inquiry methods are not supported, and my computer is English system

Pay: Questioning "Full Text Retrieval 1": 5. Update the process of full text indexing than the regular index, and it is not as updated by the database system as a regular index. You can update it immediately 9. If you contain NOISE Words in the query, an error will be raised and these Noise Words should be removed in the application. No, you will filter out NOISE WORD when you queries, and only the content of the query is all NOISE Words, there will be an error full text search application (1)

转载请注明原文地址:https://www.9cbs.com/read-4206.html

New Post(0)