Module 20 Working with Full-Text Indexes and Queries.

Slides:



Advertisements
Similar presentations
U.S. Government Language Requirements U.S. Government Language Requirements 7 September 2000 Everette Jordan Department of Defense
Advertisements

Module 3: Creating and Tuning Indexes. Planning Indexes Creating Indexes Optimizing Indexes.
Yemelia International Language Services Translations Translations Translations Interpreting InterpretingInterpreting Multi-lingual IT Presentations Multi-lingual.
Adaptxt® Enhanced Keyboards for Smartphones and Tablets: CUSTOM-MADE FOR OEM SUCCESS KeyPoint Technologies February 25, 2013.
Module 12: Auditing SQL Server Environments
Module 17 Tracing Access to SQL Server 2008 R2. Module Overview Capturing Activity using SQL Server Profiler Improving Performance with the Database Engine.
Connect with life Nauzad Kapadia Quartz Systems
NorCal OAUG Training Day, Pres 5.09John Peters, JRPJR, Inc.1 So you want Multiple Languages in your Oracle E-Business Suite John Peters JRPJR, Inc.
Ideal Lingua Translations Ideal Lingua Translations is a leading Translation Services Provider which offers:  Highest Quality Language Solutions 
Managing User Settings with Group Policy
Module 6 Implementing Table Structures in SQL Server ®2008 R2.
Clients for XProtect VMS What’s new presentation
1 Linguistic Resources needed by Nuance Jan Odijk Cocosda/Write Workshop.
Microsoft ® Official Course Interacting with the Search Service Microsoft SharePoint 2013 SharePoint Practice.
Introduction to Full-Text Searching in SQL Server 2012 Adolfo J. Socorro, Ph.D. IT Impact, Inc.
Linkkservicesworld LTD. SERVICES Translation English / Spanish / English Interpretation/ Full Professional Medical Support / Editing / Proofreading.
Module 9 Designing an XML Strategy. Module 9: Designing an XML Strategy Designing XML Storage Designing a Data Conversion Strategy Designing an XML Query.
Collecting Primary Language Information LINKED-DISC - provincial database system for early childhood intervention Services Herb Chan.
Module 13 Automating SQL Server 2008 R2 Management.
Module 17 Storing XML Data in SQL Server® 2008 R2.
UNLIMITED. SIMULTANEOUS. NO CHECK-OUT. eREFERENCE.
Advanced Google Searching June Liebert Director and Assistant Professor The John Marshall Law School “Do no harm” – the Google mantra.
Module 18 Monitoring SQL Server 2008 R2. Module Overview Monitoring Activity Capturing and Managing Performance Data Analyzing Collected Performance Data.
Survey on university students choosing a language course as an extra-curricular activity DIUS & AULC Department for Innovation Universities and Skills.
IBM Maximo Asset Management © 2007 IBM Corporation Tivoli Technical Exchange Calls Aug 31, Maximo - Multi-Language Capabilities Ritsuko Beuchert.
Integrated Full-Text Search (iFTS) in Microsoft SQL Server ® 2008 Fernando Azpeitia Lopez SQL Server Engine - Program Manager Microsoft ® Corporation.
Module 12 Handling Errors in T-SQL Code. Module Overview Understanding T-SQL Error Handling Implementing T-SQL Error Handling Implementing Structured.
Version 1.0. MCAD MCSD MCPD Enterprise SQL MCTS MCT Software/Web Development Consultant Cryptography/Digital Signature Consultant SQL Server 2005/2008R2/2012.
Module 8 Improving Performance through Nonclustered Indexes.
ADO.NET A2 Teacher Up skilling LECTURE 3. What’s to come today? ADO.NET What is ADO.NET? ADO.NET Objects SqlConnection SqlCommand SqlDataReader DataSet.
1 Translate and Translator Toolkit Universally accessible information through translation Jeff Chin Product Manager Michael Galvez Product Manager.
Module 19 Managing Multiple Servers. Module Overview Working with Multiple Servers Virtualizing SQL Server Deploying and Upgrading Data-Tier Applications.
Module 7 Reading SQL Server® 2008 R2 Execution Plans.
Module 9 Designing and Implementing Stored Procedures.
Module 9 Authenticating and Authorizing Users. Module Overview Authenticating Connections to SQL Server Authorizing Logins to Access Databases Authorization.
© 2006 IBM Corporation Flash Copy Solutions im Windows Umfeld TSM for Copy Services Wolfgang Hitzler Technical Sales Tivoli Storage Management
Module 8: Querying Full-Text Indexes. Overview Introduction to Microsoft Search Service Microsoft Search Service Components Getting Information About.
Module 5 Planning for SQL Server® 2008 R2 Indexing.
Module 14 Configuring Security for SQL Server Agent.
Video Podcast Localization Managing the Efficient Production of 1,000 Podcasts into a Variety of Languages.
Module 10 Administering and Configuring SharePoint Search.
1 Chapter Overview Preparing to Upgrade Performing a Version Upgrade from Microsoft SQL Server 7.0 Performing an Online Database Upgrade from SQL Server.
Module 15 Monitoring SQL Server 2008 R2 with Alerts and Notifications.
Content Mgmt Services eText Overview Digital Delivery Aug 7, 2012.
Full Text Search. Some Info  An optional component  Much faster and complex than the previous version  Allow you to search for words and tokens in.
Module 4 Designing and Implementing Views. Module Overview Introduction to Views Creating and Managing Views Performance Considerations for Views.
Module 3 Designing and Implementing Tables. Module Overview Designing Tables Working with Schemas Creating and Altering Tables.
Module 11 Authorizing Users to Access Resources. Module Overview Authorizing User Access to Objects Authorizing Users to Execute Code Configuring Permissions.
© 2009 AccuWeather, Inc. Proprietary1. 2 Weather content around the globe. Dan Ryan New Media Sales
Report Sharp-Shooter – is the most flexible reporting component for is the most flexible reporting component for.NET. The product provides a wide range.
Module 10 Merging Data and Passing Tables. Module Overview Using the MERGE Statement Implementing Table Types Using Table Types As Parameters.
Module 9: Using Advanced Techniques. Considerations for Querying Data Working with Data Types Cursors and Set-Based Queries Dynamic SQL Maintaining Query.
Analyzing Text with SQL Server 2014, R, AND Azure ML Dejan Sarka.
In this session, you will learn to: Create and manage views Implement a full-text search Implement batches Objectives.
F ACTORS TO G OOGLE A D S ENSE A PPROVAL By: Aarif Habeeb.
Tel: Fax: P.O. Box: 22392, Dubai - UAE
Beyond the Where Full Text Search Tips & Tricks Kris Hokanson.
Cisco Unified Attendant Consoles
Advanced Directives: What to Assess with Seniors
SQLSaturday Dnipro 2016 Azure Search Anton Boyko
Adam Koehler Index Speed Demons - How To Turbo-Charge Your Text Based Queries Using Full-Text Indexing.
Module 8: Querying Full-Text Indexes
Anton Boyko Microsoft azure mvp, mcp Microsoft Devops TE
Sales Presenter Available now
We Translate… You Market!!
Sales Presenter Available now
Oracle Supplier Management Solution Product Availability
Digital Asset Management Part 11: Access
COUNTRIES NATIONALITIES LANGUAGES.
Sales Presenter Available now Standard v Slim
Presentation transcript:

Module 20 Working with Full-Text Indexes and Queries

Module Overview Introduction to Full-Text Indexing Implementing Full-Text Indexes in SQL Server Working with Full-Text Queries

Lesson 1: Introduction to Full-Text Indexing Discussion: The Need for More Flexible User Interaction Why LIKE Isn't Enough Fuzziness in Queries Demonstration 1A: Using Full-Text Queries

Discussion: The Need for More Flexible User Interaction Consider this search page: It’s hard to imagine anyone wanting separate fields, etc. yet this is exactly how we build most business applications today  Why? Ask yourself if you’d prefer an interface like this:

Why LIKE Isn't Enough We can try to build more flexible search using the T-SQL LIKE operator A search for somename named Lee returns Ashlee, Carolee, Colleen, Kathleen, Kaylee, Lee, Shirleen, etc. Substrings aren't words: a search for Pen returns pen, pencil, pendulum, penitentiary, open, etc. Searching for two words gets even more complicated: SELECT DISTINCT FirstName FROM Person.Person WHERE FirstName LIKE '%Lee%'; SELECT DISTINCT FirstName FROM Person.Person WHERE FirstName LIKE '%Lee%'; WHERE Details LIKE '%Fred%Terry%' OR Details LIKE '%Terry%Fred%' WHERE Details LIKE '%Fred%Terry%' OR Details LIKE '%Terry%Fred%'

Fuzziness in Queries IT Professionals tend to like to work in an exact and precise way End users prefer flexible and fuzzy search capabilities You might be able to find substrings in T-SQL but how would you find:  the word Kathleen near the word bicycle?  the word Client when the search term was Customer?  the words Driving or Drove when the search term was Drive?  rows relating to Attempts to Improve Solar Energy Efficiency?

Demonstration 1A: Using Full-Text Queries In this demonstration you will see why full-text indexing is important for creating advanced and flexible user interfaces

Lesson 2: Implementing Full-Text Indexes in SQL Server Discussion: Search-related Options Full-Text Search in SQL Server Core Components of Full-Text Search Language Support and Supported Word Breakers Implementing Full-Text Indexes Demonstration 2A: Implementing Full-Text Indexes

Discussion: Search-related Options Which forms of search are you familiar with?  Bing?  Search in the operating system?  Search in Outlook?  Full-text search in earlier versions of SQL Server?  Other search engines?

Full-Text Search in SQL Server Search allows full-text queries against character-based data stored in SQL Server  char, varchar, nchar, nvarchar  text, ntext, image  xml  varbinary(max) Indexes  are created on the tables containing the character-based data  are stored in the database along with other data  allows columns to be written in many languages  can query with simple words or phrases  can rank results via table-valued functions

Core Components of Full-Text Search Which of these components are likely to be specific to a language?

Language Support and Supported Word Breakers Arabic Bengali Brazilian British English Bulgarian Canadian English Catalan Chinese (Simplified) Chinese (Traditional) Chinese (Hong Kong) Chinese (Macau) Chinese (Singapore) Croatian Danish Dutch English French German Gujarati Hebrew Hindi Icelandic Indonesian Italian Japanese Korean Latvian Lithuanian Malay - Malaysia Malayalam Marathi Neutral Norwegian Polish Portuguese Punjabi Romanian Russian Serbian (Cryllic) Serbian (Latin) Slovak Slovenian Spanish Swedish Tamil Telugu Thai Turkish Ukrainian Urdu Vietnamese Query sys.fulltext_languages to see the current list

Implementing Full-Text Indexes Steps to implement full-text indexing: Must have a table with character-based data Create a full-text catalog (if none already) Create a full-text index on the table Populate the index Query the index using full-text predicates or TVFs

Demonstration 2A: Implementing Full-Text Indexes In this demonstration you will see how to create a full-text catalog how to create a full-text index how to check when a full-text index is fully populated

Lesson 3: Working with Full-Text Queries CONTAINS Queries FREETEXT Queries Table Functions and Ranking Results Thesaurus Stopwords and Stoplists SQL Server Management of Full-Text Demonstration 3A: Working with Full-Text Queries

CONTAINS Queries SELECT MessageID,Description FROM dbo.Messages WHERE CONTAINS(Description,'filing') ORDER BY MessageID; SELECT MessageID,Description FROM dbo.Messages WHERE CONTAINS(Description,'file AND NOT boundary') ORDER BY MessageID; SELECT MessageID,Description FROM dbo.Messages WHERE CONTAINS(Description,'filing') ORDER BY MessageID; SELECT MessageID,Description FROM dbo.Messages WHERE CONTAINS(Description,'file AND NOT boundary') ORDER BY MessageID; Searches for words Can use operators  AND, OR, AND NOT Can use proximity (NEAR), inflectional, and thesaurus forms

FREETEXT Queries SELECT MessageID,Description FROM dbo.Messages WHERE FREETEXT(Description, 'statement was terminated') ORDER BY MessageID; SELECT MessageID,Description FROM dbo.Messages WHERE FREETEXT(Description, 'statement was terminated') ORDER BY MessageID; Are used to search for values that match the meaning, not just the wording Internally assign each term a weight and then find matches Work on a single table but can work with joins of multiple tables in a FROM clause

Table Functions and Ranking Results SELECT m.MessageID,m.Description,ft.RANK FROM dbo.Messages AS m INNER JOIN FREETEXTTABLE(dbo.Messages,Description, 'statement was terminated') AS ft ON m.MessageID = ft.[KEY] ORDER BY ft.RANK DESC; SELECT m.MessageID,m.Description,ft.RANK FROM dbo.Messages AS m INNER JOIN FREETEXTTABLE(dbo.Messages,Description, 'statement was terminated') AS ft ON m.MessageID = ft.[KEY] ORDER BY ft.RANK DESC; Table-valued function versions of CONTAINS and FREETEXT provide ranking of relevance  CONTAINSTABLE  FREETEXTTABLE KEY and RANK columns are provided by the functions

Thesaurus 0 user operator developer NT5 W2K Windows user operator developer NT5 W2K Windows 2000 Allows searching for words other than those specified Provides Replacements and Expansions Is implemented as an XML file at the SQL Server instance level

Stopwords and Stoplists SELECT * FROM sys.fulltext_system_stopwords WHERE language_id = 1033; CREATE FULLTEXT STOPLIST CompanyNames; ALTER FULLTEXT STOPLIST CompanyNames ADD 'Microsoft' LANGUAGE 1033; SELECT * FROM sys.fulltext_system_stopwords WHERE language_id = 1033; CREATE FULLTEXT STOPLIST CompanyNames; ALTER FULLTEXT STOPLIST CompanyNames ADD 'Microsoft' LANGUAGE 1033; Not all words in any language are useful in an index Company names, etc. are often in every document and often useless to index sys.fulltext_system_stopwords shows the built-in stopwords by language Stoplists can be created manually Words in Stoplists are not indexed by iFTS

SQL Server Management of Full-Text Full-text indexes live within the database  Inexes are backed up and/or restored along with the database  ALTER INDEX REORGANIZE can be used to defragment a full-text index  ALTER FULLTEXT CATALOG REORGANIZE causes a master merge of the full-text indexes in the catalog sys.dm_fts_parser and other DMVs are useful for troubleshooting sys.fulltext_document_types shows indexable document types

Demonstration 3A: Working with Full-Text Queries In this demonstration, you will see how to: query a full-text index locate the built-in stopwords create a stoplist and add a value to it check the parsing of text by the full-text engine

Lab 20: Working with Full -Text Indexes and Queries Exercise 1: Implement a full-text index Exercise 2: Implement a stoplist Challenge Exercise 3: Create a stored procedure to implement a full-text search (Only if time permits) Logon information Estimated time: 45 minutes

Lab Scenario Users have been complaining about the limited querying ability provided in the marketing system. You are intending to use full-text indexing to address these complaints. You will implement a full-text index on the Marketing.ProductDescription table to improve this situation. You will implement a stoplist to avoid excessive unnecessary index size. If you have time, your manager would like you to help provide a more natural interface for your users. This will involve creating a new stored procedure.

Lab Review What sorts of values would be useful in stoplists? What sorts of values would be useful in a thesaurus?

Module Review and Takeaways Review Questions Best Practices

Course Evaluation