Full Text Searching  «Prev  Next»
Lesson 5 Implementing full-text searching
Objective Practice implementing full-text searching.

Implementing full-text Searching

Once you have created your full-text indexes, you are ready to start using them in your queries. There are some special commands built into Transact-SQL that are specifically used in full-text searching. These are the special commands:

COMMAND ACTION
CONTAINS Allows you to search for specific words or phrases within the column(s) defined in the full-text index
FREETEXT Searches for multiple, less precise words, phrases, or sentences. The full-text search engine extracts the important words out of the words.
CONTAINSTABLE Specified in the FROM clause of a query, used as a table name that contains specific words and phrases. The CONTAINSTABLE command returns two columns of values, Key and Rank. Key is the value for the key column in the index. This was specified when the index was created. Rank is the ranking of the search results.
FREETEXTTABLE Specified in the FROM clause of a query, used as a table name that contains less precise words, phrases, or sentences. The FREETEXTTABLE command returns two columns of values, Key and Rank. Key is the value for the key column in the index. This was specified when the index was created. Rank is the ranking of the search results.

Let us look at some examples of the various commands in the SlideShow below. In each situation, the value in the Notes text column in the Employees table for EmployeeID 101 will be the following:

1) SQL Queries 1 2) SQL Queries 2 3) SQL Queries 3 4) SQL Queries 4
Free Text - Query
NINAH: change to 2 of the graphics in the flipbook: queries_030fb.gif and queries_04fb.gif- will come from Joward.
In the next lesson, we will review the information covered in this module.

Implement FullText Searching - Exercise

Click the Exercise link below on the left to practice creating a free-text query.
Implement FullText Searching - Exercise