SlideShare a Scribd company logo
MS SQL Server Full-Text Search
Prepared By: Bassam Diab
Date: 25-04-2019
Overview
• What is Full-Text Search?
• When will Full-text Search be best choice?
• Full-Text Search queries.
• How to Set up full-text search in MS SQL Server?
• Does the Entity Framework support Full-Text Search?
• MS SQL Server Index VS Search Platform (Solr and Elasticsearch).
• Questions.
What is full-Text Search?
 Full-Text Search lets users and applications run full-text queries against
character-based data in SQL Server tables or Indexed Views.
 APPLIES TO:
1. SQL Server (starting with 2008).
2. Azure SQL Database.
3. SQL Data Warehouse.
4. Parallel Data Warehouse.
What is full-Text Search?
 Full-text search architecture consists of the following processes:
1. The SQL Server process (sqlservr.exe).
2. The filter daemon host process (fdhost.exe).
 These two processes contain the components of the full-text search
architecture. These components and their relationships are summarized in
the following illustration.
Full-Text Search architecture
Full-Text Search queries VS LIKE
 Full-Text Search queries:
1. Powerful Features (thesaurus,stemmers,ranking).
2. Query can take only seconds or less against millions of rows of text data .
3. Used to query formatted binary data.
 Like predicate :
1. Works on character patterns only.
2. Query against millions of rows of text data can take minutes of unstructured text
data to return.
3. Cannot used to query formatted binary data.
Full-Text Search queries
 After columns have been added to a full-text index, users and applications
can run full-text queries on the text in the columns. These queries can search
for any of the following:
1. One or more specific words or phrases (simple term).
2. A word or a phrase where the words begin with specified text (prefix term).
3. Inflectional forms of a specific word (generation term).
4. Synonymous forms of a specific word (thesaurus).
5. Words or phrases using weighted values (weighted term).
Set up full-text search
 There are two basic steps to set up full-text search:
1. Create a full-text catalog.
2. Create a full-text index on tables or indexed view you want to search.
 Each full-text index must belong to a full-text catalog. You can create a
separate text catalog for each full-text index, or you can associate multiple
full-text indexes with a given catalog. A full-text catalog is a virtual object
and does not belong to any file group. The catalog is a logical concept that
refers to a group of full-text indexes.
Full-Text Predicates
 There is four predicates in the full-text search:
1. CONTAINSTABLE.
2. CONTAINS.
3. FREETEXTTABLE.
4. FREETEXT.
Full-Text Indexes – CONTAINSTABLE
• Returns a table of zero or one or more rows for the columns queried
containing precise or less precise matches to single words and phrases,
proximity of words within a distance of one another or weighted matches.
• Used in the FROM clause.
• Returns a relevance ranking value and full-text key in the result set.
Full-Text Indexes – CONTAINS
• Used in the WHERE clause of a query.
• Searches for precise or less precise matches to single words and phrases.
• Can search for the following:
1. Prefix of a word or phrase
2. A word that is inflectionally generated from another (i.e. drive, drives,
drove, driving, driven).
3. Synonyms of another word using a thesaurus.
Full-Text Indexes – FREETEXT
• Used in the WHERE clause of a query.
• Searches for values that match the meaning and not the exact wording of
the search criteria.
• Queries using FREETEXT are less precise than CONTAINS.
• Matches are generated if any term or form of any term is found.
Full-Text Indexes – FREETEXTTABLE
• Used in the FROM clause of a query like CONTAINSTABLE .
• Uses the same search conditions as FREETEXT.
• It adds a rank and key value for each row.
Does the Entity Framework support Full-Text
Search?
 Out of the box Entity Framework does not support Full Text Search. To do Full
Text Search you have a number of options to get it working. You can get Full
Text Search working using a table valued function. The method does the Full
Text Search in a table valued function that returns an id list, the returned ids
can be used to filter the records from an actual table.
Full-Text VS Search Platform
Solr MS SQL Full-Text
Index auto Update No Yes
Store Data in Index Yes No
Location in Memory Yes No
Interface Yes SQL
Querying Multiple Columns Yes Yes
Custom Index documents
structure
Yes No
References
• https://docs.microsoft.com/en-us/sql/relational-databases/search/full-text-
search?view=sql-server-2017
• https://blog.sqlauthority.com/2008/09/05/sql-server-creating-full-text-
catalog-and-index/
• https://en.wikipedia.org/wiki/Full-text_search
Questions

More Related Content

What's hot (20)

PPT
Mysql ppt
Sanmuga Nathan
 
PPTX
Veeam新機能 徹底解説 Part 1:Oracle RMAN連携 ~運用変えずVeeamでらくらくバックアップ&リストア~
株式会社クライム
 
PPTX
Dbms and sqlpptx
thesupermanreturns
 
PPT
障害とオペミスに備える! ~Oracle Databaseのバックアップを考えよう~
Shinnosuke Akita
 
PPT
Oracle
Mayank Mittal
 
PPT
Earl Shaffer Oracle Performance Tuning pre12c 11g AWR uses
oramanc
 
PDF
db tech showcase 2019 SQL Server 2019 最新情報 - SQL Serverの進化をまとめてお届け!
Masayuki Ozawa
 
PPTX
Virtualization
Shivam Singh
 
PPTX
Part5 sql tune
Maria Colgan
 
PPTX
Oracle Tablespace - Basic
Eryk Budi Pratama
 
PDF
[Modern Cloud Day Tokyo 2019] オラクルコンサルが語る!事例でみていくOracle Cloud Infrastructure設...
オラクルエンジニア通信
 
PPT
Power systems virtualization with power kvm
solarisyougood
 
PDF
Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices
Markus Michalewicz
 
PPTX
What is Virtualization
Dhrupesh Kotadiya
 
PDF
Oracle Database Management - Backup/Recovery
Chien Chung Shen
 
PPT
Database Presentation
a9oolq8
 
PDF
Oracle APEX 기초 워크샵 - 실습 가이드 문서: Part 1 (1/2)
Taewan Kim
 
PDF
Oracle Database 11g,12cからのアップグレード対策とクラウド移行 (Oracle Cloudウェビナーシリーズ: 2021年7...
オラクルエンジニア通信
 
PPT
FDS (Sixth Edition) | C1 | Databases and Database Users
Harsh Verdhan Raj
 
PPTX
OOW15 - Online Patching with Oracle E-Business Suite 12.2
vasuballa
 
Mysql ppt
Sanmuga Nathan
 
Veeam新機能 徹底解説 Part 1:Oracle RMAN連携 ~運用変えずVeeamでらくらくバックアップ&リストア~
株式会社クライム
 
Dbms and sqlpptx
thesupermanreturns
 
障害とオペミスに備える! ~Oracle Databaseのバックアップを考えよう~
Shinnosuke Akita
 
Earl Shaffer Oracle Performance Tuning pre12c 11g AWR uses
oramanc
 
db tech showcase 2019 SQL Server 2019 最新情報 - SQL Serverの進化をまとめてお届け!
Masayuki Ozawa
 
Virtualization
Shivam Singh
 
Part5 sql tune
Maria Colgan
 
Oracle Tablespace - Basic
Eryk Budi Pratama
 
[Modern Cloud Day Tokyo 2019] オラクルコンサルが語る!事例でみていくOracle Cloud Infrastructure設...
オラクルエンジニア通信
 
Power systems virtualization with power kvm
solarisyougood
 
Oracle Real Application Clusters (RAC) 12c Rel. 2 - Operational Best Practices
Markus Michalewicz
 
What is Virtualization
Dhrupesh Kotadiya
 
Oracle Database Management - Backup/Recovery
Chien Chung Shen
 
Database Presentation
a9oolq8
 
Oracle APEX 기초 워크샵 - 실습 가이드 문서: Part 1 (1/2)
Taewan Kim
 
Oracle Database 11g,12cからのアップグレード対策とクラウド移行 (Oracle Cloudウェビナーシリーズ: 2021年7...
オラクルエンジニア通信
 
FDS (Sixth Edition) | C1 | Databases and Database Users
Harsh Verdhan Raj
 
OOW15 - Online Patching with Oracle E-Business Suite 12.2
vasuballa
 

Similar to MS SQL Server Full-Text Search (20)

PPT
Lucene basics
Nitin Pande
 
PPTX
Philly PHP: April '17 Elastic Search Introduction by Aditya Bhamidpati
Robert Calcavecchia
 
PPTX
Understanding How Search Works November 7 2024.pptx
Access Innovations, Inc.
 
PDF
Wanna search? Piece of cake!
Alex Kursov
 
PPTX
Getting Started Of Elasticsearch
Mustafa Dağdelen
 
PPTX
Preview of Custom Search Admin Tools
Axiell ALM
 
PPTX
Searching in AtoM
Artefactual Systems - AtoM
 
ODP
Elasticsearch for beginners
Neil Baker
 
PPTX
Eureka, I found it! - Special Libraries Association 2021 Presentation
Access Innovations, Inc.
 
PPTX
Lucene
Harshit Agarwal
 
PPTX
Module II.pptxh bnjkm,l.ftghyujkiolp[;'hjuikolp
vallepubalaji66
 
PPTX
ElasticSearch Basic Introduction
Mayur Rathod
 
PDF
Search explained T3DD15
Hans Höchtl
 
PPTX
Elastic search basic conceptes by gggg.pptx
gows88
 
PPTX
Intro to elasticsearch
Joey Wen
 
PPTX
01 IRS to upload the data according to the.pptx
tiggu56
 
PPTX
01 IRS-1 (1) document upload the link to
tiggu56
 
PPTX
Apex code (Salesforce)
Mohammed Safwat Abu Kwaik
 
PPTX
Search stratgies ilt
phoebeleung
 
Lucene basics
Nitin Pande
 
Philly PHP: April '17 Elastic Search Introduction by Aditya Bhamidpati
Robert Calcavecchia
 
Understanding How Search Works November 7 2024.pptx
Access Innovations, Inc.
 
Wanna search? Piece of cake!
Alex Kursov
 
Getting Started Of Elasticsearch
Mustafa Dağdelen
 
Preview of Custom Search Admin Tools
Axiell ALM
 
Searching in AtoM
Artefactual Systems - AtoM
 
Elasticsearch for beginners
Neil Baker
 
Eureka, I found it! - Special Libraries Association 2021 Presentation
Access Innovations, Inc.
 
Module II.pptxh bnjkm,l.ftghyujkiolp[;'hjuikolp
vallepubalaji66
 
ElasticSearch Basic Introduction
Mayur Rathod
 
Search explained T3DD15
Hans Höchtl
 
Elastic search basic conceptes by gggg.pptx
gows88
 
Intro to elasticsearch
Joey Wen
 
01 IRS to upload the data according to the.pptx
tiggu56
 
01 IRS-1 (1) document upload the link to
tiggu56
 
Apex code (Salesforce)
Mohammed Safwat Abu Kwaik
 
Search stratgies ilt
phoebeleung
 
Ad

Recently uploaded (20)

PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PDF
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
PDF
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PPTX
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
Bitcoin for Millennials podcast with Bram, Power Laws of Bitcoin
Stephen Perrenod
 
CIFDAQ Market Wrap for the week of 4th July 2025
CIFDAQ
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
"Autonomy of LLM Agents: Current State and Future Prospects", Oles` Petriv
Fwdays
 
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Safe Software
 
Ad

MS SQL Server Full-Text Search

  • 1. MS SQL Server Full-Text Search Prepared By: Bassam Diab Date: 25-04-2019
  • 2. Overview • What is Full-Text Search? • When will Full-text Search be best choice? • Full-Text Search queries. • How to Set up full-text search in MS SQL Server? • Does the Entity Framework support Full-Text Search? • MS SQL Server Index VS Search Platform (Solr and Elasticsearch). • Questions.
  • 3. What is full-Text Search?  Full-Text Search lets users and applications run full-text queries against character-based data in SQL Server tables or Indexed Views.  APPLIES TO: 1. SQL Server (starting with 2008). 2. Azure SQL Database. 3. SQL Data Warehouse. 4. Parallel Data Warehouse.
  • 4. What is full-Text Search?  Full-text search architecture consists of the following processes: 1. The SQL Server process (sqlservr.exe). 2. The filter daemon host process (fdhost.exe).  These two processes contain the components of the full-text search architecture. These components and their relationships are summarized in the following illustration.
  • 6. Full-Text Search queries VS LIKE  Full-Text Search queries: 1. Powerful Features (thesaurus,stemmers,ranking). 2. Query can take only seconds or less against millions of rows of text data . 3. Used to query formatted binary data.  Like predicate : 1. Works on character patterns only. 2. Query against millions of rows of text data can take minutes of unstructured text data to return. 3. Cannot used to query formatted binary data.
  • 7. Full-Text Search queries  After columns have been added to a full-text index, users and applications can run full-text queries on the text in the columns. These queries can search for any of the following: 1. One or more specific words or phrases (simple term). 2. A word or a phrase where the words begin with specified text (prefix term). 3. Inflectional forms of a specific word (generation term). 4. Synonymous forms of a specific word (thesaurus). 5. Words or phrases using weighted values (weighted term).
  • 8. Set up full-text search  There are two basic steps to set up full-text search: 1. Create a full-text catalog. 2. Create a full-text index on tables or indexed view you want to search.  Each full-text index must belong to a full-text catalog. You can create a separate text catalog for each full-text index, or you can associate multiple full-text indexes with a given catalog. A full-text catalog is a virtual object and does not belong to any file group. The catalog is a logical concept that refers to a group of full-text indexes.
  • 9. Full-Text Predicates  There is four predicates in the full-text search: 1. CONTAINSTABLE. 2. CONTAINS. 3. FREETEXTTABLE. 4. FREETEXT.
  • 10. Full-Text Indexes – CONTAINSTABLE • Returns a table of zero or one or more rows for the columns queried containing precise or less precise matches to single words and phrases, proximity of words within a distance of one another or weighted matches. • Used in the FROM clause. • Returns a relevance ranking value and full-text key in the result set.
  • 11. Full-Text Indexes – CONTAINS • Used in the WHERE clause of a query. • Searches for precise or less precise matches to single words and phrases. • Can search for the following: 1. Prefix of a word or phrase 2. A word that is inflectionally generated from another (i.e. drive, drives, drove, driving, driven). 3. Synonyms of another word using a thesaurus.
  • 12. Full-Text Indexes – FREETEXT • Used in the WHERE clause of a query. • Searches for values that match the meaning and not the exact wording of the search criteria. • Queries using FREETEXT are less precise than CONTAINS. • Matches are generated if any term or form of any term is found.
  • 13. Full-Text Indexes – FREETEXTTABLE • Used in the FROM clause of a query like CONTAINSTABLE . • Uses the same search conditions as FREETEXT. • It adds a rank and key value for each row.
  • 14. Does the Entity Framework support Full-Text Search?  Out of the box Entity Framework does not support Full Text Search. To do Full Text Search you have a number of options to get it working. You can get Full Text Search working using a table valued function. The method does the Full Text Search in a table valued function that returns an id list, the returned ids can be used to filter the records from an actual table.
  • 15. Full-Text VS Search Platform Solr MS SQL Full-Text Index auto Update No Yes Store Data in Index Yes No Location in Memory Yes No Interface Yes SQL Querying Multiple Columns Yes Yes Custom Index documents structure Yes No