SlideShare a Scribd company logo
1 of 17
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

Intro to Deep Learning for Question Answering
Intro to Deep Learning for Question AnsweringIntro to Deep Learning for Question Answering
Intro to Deep Learning for Question AnsweringTraian Rebedea
 
Elasticsearch Tutorial | Getting Started with Elasticsearch | ELK Stack Train...
Elasticsearch Tutorial | Getting Started with Elasticsearch | ELK Stack Train...Elasticsearch Tutorial | Getting Started with Elasticsearch | ELK Stack Train...
Elasticsearch Tutorial | Getting Started with Elasticsearch | ELK Stack Train...Edureka!
 
Vector databases and neural search
Vector databases and neural searchVector databases and neural search
Vector databases and neural searchDmitry Kan
 
Vector Search for Data Scientists.pdf
Vector Search for Data Scientists.pdfVector Search for Data Scientists.pdf
Vector Search for Data Scientists.pdfConnorShorten2
 
Product Keynote: Denodo 8.0 - A Logical Data Fabric for the Intelligent Enter...
Product Keynote: Denodo 8.0 - A Logical Data Fabric for the Intelligent Enter...Product Keynote: Denodo 8.0 - A Logical Data Fabric for the Intelligent Enter...
Product Keynote: Denodo 8.0 - A Logical Data Fabric for the Intelligent Enter...Denodo
 
Introduction to elasticsearch
Introduction to elasticsearchIntroduction to elasticsearch
Introduction to elasticsearchhypto
 
Overview of the SPARQL-Generate language and latest developments
Overview of the SPARQL-Generate language and latest developmentsOverview of the SPARQL-Generate language and latest developments
Overview of the SPARQL-Generate language and latest developmentsMaxime Lefrançois
 
Introduction to Elasticsearch
Introduction to ElasticsearchIntroduction to Elasticsearch
Introduction to ElasticsearchIsmaeel Enjreny
 
Introduction to elasticsearch
Introduction to elasticsearchIntroduction to elasticsearch
Introduction to elasticsearchpmanvi
 
Linked Data and Knowledge Graphs -- Constructing and Understanding Knowledge ...
Linked Data and Knowledge Graphs -- Constructing and Understanding Knowledge ...Linked Data and Knowledge Graphs -- Constructing and Understanding Knowledge ...
Linked Data and Knowledge Graphs -- Constructing and Understanding Knowledge ...Jeff Z. Pan
 
MongoDB Aggregation Performance
MongoDB Aggregation PerformanceMongoDB Aggregation Performance
MongoDB Aggregation PerformanceMongoDB
 
Azure Data Factory for Azure Data Week
Azure Data Factory for Azure Data WeekAzure Data Factory for Azure Data Week
Azure Data Factory for Azure Data WeekMark Kromer
 
Introduction to NoSQL Databases
Introduction to NoSQL DatabasesIntroduction to NoSQL Databases
Introduction to NoSQL DatabasesDerek Stainer
 
Text analytics in social media
Text analytics in social mediaText analytics in social media
Text analytics in social mediaJeremiah Fadugba
 
Chap 1 general introduction of information retrieval
Chap 1  general introduction of information retrievalChap 1  general introduction of information retrieval
Chap 1 general introduction of information retrievalMalobe Lottin Cyrille Marcel
 
3 scenarios when to use MongoDB!
3 scenarios when to use MongoDB!3 scenarios when to use MongoDB!
3 scenarios when to use MongoDB!Edureka!
 
Introduction to Map-Reduce
Introduction to Map-ReduceIntroduction to Map-Reduce
Introduction to Map-ReduceBrendan Tierney
 

What's hot (20)

Intro to Deep Learning for Question Answering
Intro to Deep Learning for Question AnsweringIntro to Deep Learning for Question Answering
Intro to Deep Learning for Question Answering
 
Elasticsearch Tutorial | Getting Started with Elasticsearch | ELK Stack Train...
Elasticsearch Tutorial | Getting Started with Elasticsearch | ELK Stack Train...Elasticsearch Tutorial | Getting Started with Elasticsearch | ELK Stack Train...
Elasticsearch Tutorial | Getting Started with Elasticsearch | ELK Stack Train...
 
Vector databases and neural search
Vector databases and neural searchVector databases and neural search
Vector databases and neural search
 
Vector Search for Data Scientists.pdf
Vector Search for Data Scientists.pdfVector Search for Data Scientists.pdf
Vector Search for Data Scientists.pdf
 
Product Keynote: Denodo 8.0 - A Logical Data Fabric for the Intelligent Enter...
Product Keynote: Denodo 8.0 - A Logical Data Fabric for the Intelligent Enter...Product Keynote: Denodo 8.0 - A Logical Data Fabric for the Intelligent Enter...
Product Keynote: Denodo 8.0 - A Logical Data Fabric for the Intelligent Enter...
 
Introduction to elasticsearch
Introduction to elasticsearchIntroduction to elasticsearch
Introduction to elasticsearch
 
Overview of the SPARQL-Generate language and latest developments
Overview of the SPARQL-Generate language and latest developmentsOverview of the SPARQL-Generate language and latest developments
Overview of the SPARQL-Generate language and latest developments
 
Introduction to Elasticsearch
Introduction to ElasticsearchIntroduction to Elasticsearch
Introduction to Elasticsearch
 
Elasticsearch Introduction
Elasticsearch IntroductionElasticsearch Introduction
Elasticsearch Introduction
 
Introduction to elasticsearch
Introduction to elasticsearchIntroduction to elasticsearch
Introduction to elasticsearch
 
Linked Data and Knowledge Graphs -- Constructing and Understanding Knowledge ...
Linked Data and Knowledge Graphs -- Constructing and Understanding Knowledge ...Linked Data and Knowledge Graphs -- Constructing and Understanding Knowledge ...
Linked Data and Knowledge Graphs -- Constructing and Understanding Knowledge ...
 
MongoDB Aggregation Performance
MongoDB Aggregation PerformanceMongoDB Aggregation Performance
MongoDB Aggregation Performance
 
Azure Data Factory for Azure Data Week
Azure Data Factory for Azure Data WeekAzure Data Factory for Azure Data Week
Azure Data Factory for Azure Data Week
 
Elasticsearch
ElasticsearchElasticsearch
Elasticsearch
 
Introduction to NoSQL Databases
Introduction to NoSQL DatabasesIntroduction to NoSQL Databases
Introduction to NoSQL Databases
 
Text analytics in social media
Text analytics in social mediaText analytics in social media
Text analytics in social media
 
Pubmed Basics
Pubmed BasicsPubmed Basics
Pubmed Basics
 
Chap 1 general introduction of information retrieval
Chap 1  general introduction of information retrievalChap 1  general introduction of information retrieval
Chap 1 general introduction of information retrieval
 
3 scenarios when to use MongoDB!
3 scenarios when to use MongoDB!3 scenarios when to use MongoDB!
3 scenarios when to use MongoDB!
 
Introduction to Map-Reduce
Introduction to Map-ReduceIntroduction to Map-Reduce
Introduction to Map-Reduce
 

Similar to MS SQL Server Full-Text Search

Philly PHP: April '17 Elastic Search Introduction by Aditya Bhamidpati
Philly PHP: April '17 Elastic Search Introduction by Aditya BhamidpatiPhilly PHP: April '17 Elastic Search Introduction by Aditya Bhamidpati
Philly PHP: April '17 Elastic Search Introduction by Aditya BhamidpatiRobert Calcavecchia
 
Wanna search? Piece of cake!
Wanna search? Piece of cake!Wanna search? Piece of cake!
Wanna search? Piece of cake!Alex Kursov
 
Getting Started Of Elasticsearch
Getting Started Of ElasticsearchGetting Started Of Elasticsearch
Getting Started Of ElasticsearchMustafa Dağdelen
 
Preview of Custom Search Admin Tools
Preview of Custom Search Admin ToolsPreview of Custom Search Admin Tools
Preview of Custom Search Admin ToolsAxiell ALM
 
Elasticsearch for beginners
Elasticsearch for beginnersElasticsearch for beginners
Elasticsearch for beginnersNeil Baker
 
ElasticSearch Basic Introduction
ElasticSearch Basic IntroductionElasticSearch Basic Introduction
ElasticSearch Basic IntroductionMayur Rathod
 
Search explained T3DD15
Search explained T3DD15Search explained T3DD15
Search explained T3DD15Hans Höchtl
 
Intro to elasticsearch
Intro to elasticsearchIntro to elasticsearch
Intro to elasticsearchJoey Wen
 
Search stratgies ilt
Search stratgies iltSearch stratgies ilt
Search stratgies iltphoebeleung
 
Database and Research Matrix.pptx
Database and Research Matrix.pptxDatabase and Research Matrix.pptx
Database and Research Matrix.pptxRahulRoshan37
 
How to use selenium locators effectively for web automation.pdf
How to use selenium locators effectively for web automation.pdfHow to use selenium locators effectively for web automation.pdf
How to use selenium locators effectively for web automation.pdfpcloudy2
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentIJERD Editor
 
Database Terms Concepts2
Database Terms  Concepts2Database Terms  Concepts2
Database Terms Concepts2ejdmiller
 
Search page-with-elasticsearch-and-dot-net
Search page-with-elasticsearch-and-dot-netSearch page-with-elasticsearch-and-dot-net
Search page-with-elasticsearch-and-dot-netsonia merchant
 
Building A Search Page with Elasticsearch and .NET- II
Building A Search Page with Elasticsearch and .NET- IIBuilding A Search Page with Elasticsearch and .NET- II
Building A Search Page with Elasticsearch and .NET- IIPooja Gaikwad
 

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

Lucene basics
Lucene basicsLucene basics
Lucene basics
 
Philly PHP: April '17 Elastic Search Introduction by Aditya Bhamidpati
Philly PHP: April '17 Elastic Search Introduction by Aditya BhamidpatiPhilly PHP: April '17 Elastic Search Introduction by Aditya Bhamidpati
Philly PHP: April '17 Elastic Search Introduction by Aditya Bhamidpati
 
Wanna search? Piece of cake!
Wanna search? Piece of cake!Wanna search? Piece of cake!
Wanna search? Piece of cake!
 
Getting Started Of Elasticsearch
Getting Started Of ElasticsearchGetting Started Of Elasticsearch
Getting Started Of Elasticsearch
 
Preview of Custom Search Admin Tools
Preview of Custom Search Admin ToolsPreview of Custom Search Admin Tools
Preview of Custom Search Admin Tools
 
Searching in AtoM
Searching in AtoMSearching in AtoM
Searching in AtoM
 
Elasticsearch for beginners
Elasticsearch for beginnersElasticsearch for beginners
Elasticsearch for beginners
 
Lucene
LuceneLucene
Lucene
 
ElasticSearch Basic Introduction
ElasticSearch Basic IntroductionElasticSearch Basic Introduction
ElasticSearch Basic Introduction
 
Search explained T3DD15
Search explained T3DD15Search explained T3DD15
Search explained T3DD15
 
 
Intro to elasticsearch
Intro to elasticsearchIntro to elasticsearch
Intro to elasticsearch
 
Apex code (Salesforce)
Apex code (Salesforce)Apex code (Salesforce)
Apex code (Salesforce)
 
Search stratgies ilt
Search stratgies iltSearch stratgies ilt
Search stratgies ilt
 
Database and Research Matrix.pptx
Database and Research Matrix.pptxDatabase and Research Matrix.pptx
Database and Research Matrix.pptx
 
How to use selenium locators effectively for web automation.pdf
How to use selenium locators effectively for web automation.pdfHow to use selenium locators effectively for web automation.pdf
How to use selenium locators effectively for web automation.pdf
 
International Journal of Engineering Research and Development
International Journal of Engineering Research and DevelopmentInternational Journal of Engineering Research and Development
International Journal of Engineering Research and Development
 
Database Terms Concepts2
Database Terms  Concepts2Database Terms  Concepts2
Database Terms Concepts2
 
Search page-with-elasticsearch-and-dot-net
Search page-with-elasticsearch-and-dot-netSearch page-with-elasticsearch-and-dot-net
Search page-with-elasticsearch-and-dot-net
 
Building A Search Page with Elasticsearch and .NET- II
Building A Search Page with Elasticsearch and .NET- IIBuilding A Search Page with Elasticsearch and .NET- II
Building A Search Page with Elasticsearch and .NET- II
 

Recently uploaded

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 

Recently uploaded (20)

The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 

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