Full text Search in SQL

Query

Querying a full-text index is extremely fast and flexible. Because of the specialized index structure described above, it is very quick and easy to locate matches for particular search criteria.

SELECT ProductModelId, ProductName
FROM ProductModel
WHERE CONTAINS(CatalogDescription, ' " aluminum alloy " ')


USE Northwind;
SELECT FT_TBL.CategoryName
,FT_TBL.Description
,KEY_TBL.RANK
FROM dbo.Categories AS FT_TBL
INNER JOIN FREETEXTTABLE(dbo.Categories, Description,
'sweetest candy bread and dry meat') AS KEY_TBL
ON FT_TBL.CategoryID = KEY_TBL.[KEY];

score value, because they are predicates in the Transact-SQL language.

Rank values for full-text queries may be returned from CONTAINSTABLE
and FREETEXTTABLE full-text query clauses. CONTAINSTABLE and
FREETEXTTABLE behave like table-valued functions that return two
columns: a key column (which can be used to join to the full-text
indexed base table), and a rank column (which can be used to order
results by rank). The CONTAINS and FREETEXT clauses do not expose a

Comments

Popular posts from this blog

IBM FileNet: Bulk Processing using JavaScript

DB2 Date Time Functions

File Net Insert Document