20
k to edit Master title style TechNet goes virtual © Microsoft Corporation. All Rights Reserved. TechNet goes virtual Implementing Full- Text in SQL Server Steve Verschaeve

Implementing Full Text in SQL Server

Embed Size (px)

DESCRIPTION

Presented by Steve Verschaeve.

Citation preview

Page 1: Implementing Full Text in SQL Server

Click to edit Master title style

TechNet goes virtual© Microsoft Corporation.  All Rights Reserved.

TechNet goes virtual

Implementing Full-Text in SQL Server

Steve Verschaeve

Page 2: Implementing Full Text in SQL Server

Click to edit Master title style

TechNet goes virtual© Microsoft Corporation.  All Rights Reserved.

Who am I?

[email protected]@sql_lazywriterhttp://www.microsoft.com/belux/meet/

Page 3: Implementing Full Text in SQL Server

Click to edit Master title style

TechNet goes virtual© Microsoft Corporation.  All Rights Reserved.

Agenda

• History and Editions• What Can I Do with Full-Text Search?• Architecture and components• Linguistics• Setup• FTS from a DBA perspective• FTS from a DEV perspective• Upgrade from earlier versions

Page 4: Implementing Full Text in SQL Server

Click to edit Master title style

TechNet goes virtual© Microsoft Corporation.  All Rights Reserved.

History and Editions

• Since version 7.0• Major improvement in version 2008• Supported editions– Enterprise– Business Intelligence– Standard–Web– Express with Advanced Services

Page 5: Implementing Full Text in SQL Server

Click to edit Master title style

TechNet goes virtual© Microsoft Corporation.  All Rights Reserved.

What Can I Do with Full-Text Search?

Search terms Predicates Function

simple term CONTAINS and CONTAINSTABLE

FREETEXT and FREETEXTTABLE

prefix term CONTAINS and CONTAINSTABLE

generation term FREETEXT and FREETEXTTABLE

CONTAINS and CONTAINSTABLE

proximity term CONTAINSTABLE

thesaurus FREETEXT and FREETEXTTABLE

CONTAINS and CONTAINSTABLE

weighted term CONTAINSTABLE

• FTS Search Queries

Page 6: Implementing Full Text in SQL Server

Click to edit Master title style

TechNet goes virtual© Microsoft Corporation.  All Rights Reserved.

Architecture and components

• Full-Text engine• Filter Daemon host• Filter Daemon

Launcher• Full-Text index• Full-Text catalog

• Word breaker• Stemmer• Thesaurus• Filter• Population• Stopword• Stoplist

Page 7: Implementing Full Text in SQL Server

Click to edit Master title style

TechNet goes virtual© Microsoft Corporation.  All Rights Reserved.

Linguistics

• 50 languages (sys.fulltext_languages)• Each col is associated with LCID– Eg: LCID 1033 (U.S. English)– Eg: LCID 2057 (British English)

• Language specific components:–Word breakers and stemmers– Stoplists– Thesaurus files– Filters

Page 8: Implementing Full Text in SQL Server

Click to edit Master title style

TechNet goes virtual© Microsoft Corporation.  All Rights Reserved.

Setup:Install as a feature

Page 9: Implementing Full Text in SQL Server

Click to edit Master title style

TechNet goes virtual© Microsoft Corporation.  All Rights Reserved.

Setup: Instance level

Page 10: Implementing Full Text in SQL Server

Click to edit Master title style

TechNet goes virtual© Microsoft Corporation.  All Rights Reserved.

Setup on database level

Page 11: Implementing Full Text in SQL Server

Click to edit Master title style

TechNet goes virtual© Microsoft Corporation.  All Rights Reserved.

Demo: FTS from a DBA perspective

• Managing – Catalogs and Indexes– Stoplists– Filegroups– Crawling–Monitoring

Page 12: Implementing Full Text in SQL Server

Click to edit Master title style

TechNet goes virtual© Microsoft Corporation.  All Rights Reserved.

Demo: FTS from a DEV perspective

• Writing Full-Text Queries using– CONTAINS– CONTAINSTABLE– FREETEXT– FREETEXTABLE

Page 13: Implementing Full Text in SQL Server

Click to edit Master title style

TechNet goes virtual© Microsoft Corporation.  All Rights Reserved.

Upgrade from earlier versions

• No discontinued full-text search features, some have been deprecated

• Breaking Changes– Collation Changed for name Column in

sys.fulltext_languages

• Behavior Changes– New word breakers and stemmers

Page 14: Implementing Full Text in SQL Server

Click to edit Master title style

TechNet goes virtual© Microsoft Corporation.  All Rights Reserved.

Upgrade from earlier versions

• Upgrade paths– In-place upgrade– Detach & attach database– Backup and restore database– Copy Database Wizard

Page 15: Implementing Full Text in SQL Server

Click to edit Master title style

TechNet goes virtual© Microsoft Corporation.  All Rights Reserved.

Upgrade from earlier versions

• Upgrade options– Import indexed

data– Reset catalogs– Full population

Page 16: Implementing Full Text in SQL Server

Click to edit Master title style

TechNet goes virtual© Microsoft Corporation.  All Rights Reserved.

Upgrade from previous versions

• From 2005–Mismatches between query and full-text

index• Rebuild full-text catalog• Full population of full-text index

– Noise words replaced by stopwords–Modified noise words in 2005 are lost

Page 18: Implementing Full Text in SQL Server

Click to edit Master title style

TechNet goes virtual© Microsoft Corporation.  All Rights Reserved.

Important URLs

• TechNet Support Forums• Integrated Full-Text Search (OLTP)---a

Technical Reference Guide for Designing Mission-Critical OLTP Solutions

Page 19: Implementing Full Text in SQL Server

Click to edit Master title style

TechNet goes virtual© Microsoft Corporation.  All Rights Reserved.

Q&A

[email protected]

Page 20: Implementing Full Text in SQL Server

Click to edit Master title style

TechNet goes virtual© Microsoft Corporation.  All Rights Reserved.

Thank you