Full text search in Database
2011-03-17 14:55:52| 分类:
dbms
| 标签:
|举报
|字号大中小 订阅
Full-text search is applicable in a wide range of business scenarios such as e-businesses—searching for items on a web site; law firms—searching for case histories in a legal-data repository; or human resources departments—matching job descriptions with stored resumes. The basic administrative and development tasks of full-text search are equivalent regardless of business scenarios.
a). Specific words or phrase (simple term)
b). A word or a phrase begin with specified text (prefix term)
c). Inflectional forms of a specific word (generation term)
d). A word or phrase close to another word or phrase (proximity term)
Synonymous forms of a specific word (thesaurus)
The Full-Text Engine performs word breaking and, optionally, thesaurus expansions, stemming(conjugates verbs and performs inflectional expansions), and stopword (noise-word) processing(sometimes language-specific ).
At indexing time, these information is used to perform linguistic analysis on the textual data from a given table column.
Sqlite
1). CREATE VIRTUAL TABLE statement
2). One or more columns of fully indexed text
3). Insert rows into a full-text table in the same way as into an ordinary table with columns of type TEXT
4). Use 'MATCH' to perform a full-text search on a column in a full-text table
Mysql
1). Define FULLTEXT index on some columns
2). Search using MATCH and AGAINST statements
eg. SELECT headline, story FROM news WHERE MATCH (headline,story) AGAINST ('Hurricane');
SQLServer
1). Create a full-text index on one or more character-based columns in the table.
2). Provides a set of full-text predicates (CONTAINS and FREETEXT) and rowset-valued functions (CONTAINSTABLE and FREETEXTTABLE)
3). Seperate full-text catalog, track changes in the base table and its columns
评论这张
转发至微博
转发至微博
评论