SlideShare una empresa de Scribd logo
1 de 10
Descargar para leer sin conexión
SQLite full-text search
      extension
FTS3 and FTS4
• Allows to create special virtual tables with a
  built-in full-text index
• Consumes more space
Table of 500 000 rows
            FTS3                     Ordinary table
• CREATE VIRTUAL TABLE        • CREATE TABLE
  table1 USING fts3(content     table2(content TEXT); /*
  TEXT);                        Ordinary table */
  /* FTS3 table */
                              • SELECT count(*) FROM
• SELECT count(*) FROM          table2 WHERE content LIKE
  table1 WHERE content          '%linux%';
  MATCH 'linux';                /* 22.5 seconds */
  /* 0.03 seconds */
Creating tables
• CREATE VIRTUAL TABLE users USING fts3(
•     USER_ID INTEGER PRIMARY KEY AUTOINCREMENT,
•     NAME TEXT NOT NULL,
•     PHONE INTEGER NOT NULL,
•     UNIQUE (USER_ID) ON CONFLICT REPLACE, tokenize=porter
• )
Deleting tables
• CREATE VIRTUAL TABLE data USING fts3();
• DROP TABLE data;
Populating FTS Tables
• Regular INSERT, UPDATE, DELETE are used
• Contains hidden ‘rowid’ column
Triggers
• CREATE TRIGGER TRIGGER_INSERT_USER AFTER INSERT ON
  USER BEGIN INSERT INTO USER_SEARCH_TABLE
• VALUES(new.user_id, new.user_name); END;

• CREATE TRIGGER TRIGGER_INSERT_USER AFTER UPDATE ON
  USER BEGIN UPDATE USER_SEARCH_TABLE SET
  user_name=new.user_name where user_id=old.user_id; END;
Queries
• Query by rowid
• SELECT * FROM user WHERE rowid = 15;
• Full-text query
• SELECT * FROM SEARCH_USER_DATA
  WHERE SEARCH_USER_DATA MATCH ‘starcraft';
Full-text Index Queries
• Token or token prefix queries
   SELECT * FROM docs WHERE docs MATCH 'linux';
   SELECT * FROM docs WHERE docs MATCH 'lin*';
• Phrase queries.
SELECT * FROM docs WHERE docs MATCH '"linux applications"';
SELECT * FROM docs WHERE docs MATCH '"lin* app*"';
• NEAR queries.
• SELECT * FROM users WHERE users MATCH ‘android NEAR starcraft';
• SELECT * FROM users WHERE users MATCH ‘android NEAR/5 starcraft';
Tokenizers
• Tokenizer is a set of rules for extracting terms from a
  document
• Default value is ‘simple’
• Simple: converts to lower case, splitting by alphanumeric+’_’
• Porter: simple + converts to common English root.
• ICU: country specific (tokenize=icu th_TH for Turkey)
• Custom implementation

Más contenido relacionado

Destacado

Continuous integration for androids
Continuous integration for androidsContinuous integration for androids
Continuous integration for androidsKirill Zotin
 
Continuous Integration for your Android projects
Continuous Integration for your Android projectsContinuous Integration for your Android projects
Continuous Integration for your Android projectsSergii Zhuk
 
Automate your build on Android with Jenkins
Automate your build on Android with JenkinsAutomate your build on Android with Jenkins
Automate your build on Android with JenkinsBeMyApp
 
Automated Testing and Continuous Integration for Mobile Apps: Jenkins & Cloud...
Automated Testing and Continuous Integration for Mobile Apps: Jenkins & Cloud...Automated Testing and Continuous Integration for Mobile Apps: Jenkins & Cloud...
Automated Testing and Continuous Integration for Mobile Apps: Jenkins & Cloud...SOASTA
 
Continuous integration for Android
Continuous integration for AndroidContinuous integration for Android
Continuous integration for AndroidPlatty Soft
 
Achieving 100% mobile test coverage perfecto mobile
Achieving 100% mobile test coverage perfecto mobileAchieving 100% mobile test coverage perfecto mobile
Achieving 100% mobile test coverage perfecto mobilePerfecto Mobile
 
L'integration continue pour tous
L'integration continue pour tousL'integration continue pour tous
L'integration continue pour tousAurelien Navarre
 
Intégration Continue pour Android
Intégration Continue pour AndroidIntégration Continue pour Android
Intégration Continue pour AndroidSalma ES-Salmani
 
Android Continuous Integration and Automation - Enrique Lopez Manas, Sixt
Android Continuous Integration and Automation - Enrique Lopez Manas, SixtAndroid Continuous Integration and Automation - Enrique Lopez Manas, Sixt
Android Continuous Integration and Automation - Enrique Lopez Manas, SixtDroidConTLV
 
Continuous Integration for Mobile App Testing
Continuous Integration for Mobile App TestingContinuous Integration for Mobile App Testing
Continuous Integration for Mobile App TestingInfostretch
 

Destacado (11)

Continuous integration for androids
Continuous integration for androidsContinuous integration for androids
Continuous integration for androids
 
Continuous Integration for your Android projects
Continuous Integration for your Android projectsContinuous Integration for your Android projects
Continuous Integration for your Android projects
 
Automate your build on Android with Jenkins
Automate your build on Android with JenkinsAutomate your build on Android with Jenkins
Automate your build on Android with Jenkins
 
Automated Testing and Continuous Integration for Mobile Apps: Jenkins & Cloud...
Automated Testing and Continuous Integration for Mobile Apps: Jenkins & Cloud...Automated Testing and Continuous Integration for Mobile Apps: Jenkins & Cloud...
Automated Testing and Continuous Integration for Mobile Apps: Jenkins & Cloud...
 
Continuous integration for Android
Continuous integration for AndroidContinuous integration for Android
Continuous integration for Android
 
Achieving 100% mobile test coverage perfecto mobile
Achieving 100% mobile test coverage perfecto mobileAchieving 100% mobile test coverage perfecto mobile
Achieving 100% mobile test coverage perfecto mobile
 
L'integration continue pour tous
L'integration continue pour tousL'integration continue pour tous
L'integration continue pour tous
 
Ci for-android-apps
Ci for-android-appsCi for-android-apps
Ci for-android-apps
 
Intégration Continue pour Android
Intégration Continue pour AndroidIntégration Continue pour Android
Intégration Continue pour Android
 
Android Continuous Integration and Automation - Enrique Lopez Manas, Sixt
Android Continuous Integration and Automation - Enrique Lopez Manas, SixtAndroid Continuous Integration and Automation - Enrique Lopez Manas, Sixt
Android Continuous Integration and Automation - Enrique Lopez Manas, Sixt
 
Continuous Integration for Mobile App Testing
Continuous Integration for Mobile App TestingContinuous Integration for Mobile App Testing
Continuous Integration for Mobile App Testing
 

Similar a SQLite

Database design and error handling
Database design and error handlingDatabase design and error handling
Database design and error handlinghamsa nandhini
 
Troubleshooting MySQL Performance
Troubleshooting MySQL PerformanceTroubleshooting MySQL Performance
Troubleshooting MySQL PerformanceSveta Smirnova
 
Covering indexes
Covering indexesCovering indexes
Covering indexesMYXPLAIN
 
Introduction to MySQL in PHP
Introduction to MySQL in PHPIntroduction to MySQL in PHP
Introduction to MySQL in PHPhamsa nandhini
 
Tk2323 lecture 7 sql
Tk2323 lecture 7   sql Tk2323 lecture 7   sql
Tk2323 lecture 7 sql MengChun Lam
 
Informix Data Streaming Overview
Informix Data Streaming OverviewInformix Data Streaming Overview
Informix Data Streaming OverviewBrian Hughes
 
SQLite Techniques
SQLite TechniquesSQLite Techniques
SQLite Techniquesjoaopmaia
 
ETL With Cassandra Streaming Bulk Loading
ETL With Cassandra Streaming Bulk LoadingETL With Cassandra Streaming Bulk Loading
ETL With Cassandra Streaming Bulk Loadingalex_araujo
 
07 ohp slides 1 - INDEXES
07 ohp slides 1 - INDEXES07 ohp slides 1 - INDEXES
07 ohp slides 1 - INDEXESAnne Lee
 
FIot_Unit-3 fundAMENTALS OF IOT BASICS.pptx
FIot_Unit-3 fundAMENTALS OF IOT BASICS.pptxFIot_Unit-3 fundAMENTALS OF IOT BASICS.pptx
FIot_Unit-3 fundAMENTALS OF IOT BASICS.pptxssuser0b643d
 
Library Managment System - C++ Program
Library Managment System - C++ ProgramLibrary Managment System - C++ Program
Library Managment System - C++ ProgramMuhammad Danish Badar
 
SQL WORKSHOP::Lecture 10
SQL WORKSHOP::Lecture 10SQL WORKSHOP::Lecture 10
SQL WORKSHOP::Lecture 10Umair Amjad
 
DEF CON 27 -OMER GULL - select code execution from using sq lite
DEF CON 27 -OMER GULL - select code execution from using sq liteDEF CON 27 -OMER GULL - select code execution from using sq lite
DEF CON 27 -OMER GULL - select code execution from using sq liteFelipe Prado
 
Structured Query Language(SQL)
Structured Query Language(SQL)Structured Query Language(SQL)
Structured Query Language(SQL)PadmapriyaA6
 

Similar a SQLite (20)

Database design and error handling
Database design and error handlingDatabase design and error handling
Database design and error handling
 
Troubleshooting MySQL Performance
Troubleshooting MySQL PerformanceTroubleshooting MySQL Performance
Troubleshooting MySQL Performance
 
IR SQLite Session #1
IR SQLite Session #1IR SQLite Session #1
IR SQLite Session #1
 
Covering indexes
Covering indexesCovering indexes
Covering indexes
 
Introduction to MySQL in PHP
Introduction to MySQL in PHPIntroduction to MySQL in PHP
Introduction to MySQL in PHP
 
Tk2323 lecture 7 sql
Tk2323 lecture 7   sql Tk2323 lecture 7   sql
Tk2323 lecture 7 sql
 
Informix Data Streaming Overview
Informix Data Streaming OverviewInformix Data Streaming Overview
Informix Data Streaming Overview
 
Database training for developers
Database training for developersDatabase training for developers
Database training for developers
 
SQLite Techniques
SQLite TechniquesSQLite Techniques
SQLite Techniques
 
SQLite Techniques
SQLite TechniquesSQLite Techniques
SQLite Techniques
 
Rdbms day3
Rdbms day3Rdbms day3
Rdbms day3
 
ETL With Cassandra Streaming Bulk Loading
ETL With Cassandra Streaming Bulk LoadingETL With Cassandra Streaming Bulk Loading
ETL With Cassandra Streaming Bulk Loading
 
07 ohp slides 1 - INDEXES
07 ohp slides 1 - INDEXES07 ohp slides 1 - INDEXES
07 ohp slides 1 - INDEXES
 
FIot_Unit-3 fundAMENTALS OF IOT BASICS.pptx
FIot_Unit-3 fundAMENTALS OF IOT BASICS.pptxFIot_Unit-3 fundAMENTALS OF IOT BASICS.pptx
FIot_Unit-3 fundAMENTALS OF IOT BASICS.pptx
 
Library Managment System - C++ Program
Library Managment System - C++ ProgramLibrary Managment System - C++ Program
Library Managment System - C++ Program
 
SQL WORKSHOP::Lecture 10
SQL WORKSHOP::Lecture 10SQL WORKSHOP::Lecture 10
SQL WORKSHOP::Lecture 10
 
Sql injection
Sql injectionSql injection
Sql injection
 
DEF CON 27 -OMER GULL - select code execution from using sq lite
DEF CON 27 -OMER GULL - select code execution from using sq liteDEF CON 27 -OMER GULL - select code execution from using sq lite
DEF CON 27 -OMER GULL - select code execution from using sq lite
 
Full Text Search In PostgreSQL
Full Text Search In PostgreSQLFull Text Search In PostgreSQL
Full Text Search In PostgreSQL
 
Structured Query Language(SQL)
Structured Query Language(SQL)Structured Query Language(SQL)
Structured Query Language(SQL)
 

Último

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 

Último (20)

Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
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
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 

SQLite

  • 2. FTS3 and FTS4 • Allows to create special virtual tables with a built-in full-text index • Consumes more space
  • 3. Table of 500 000 rows FTS3 Ordinary table • CREATE VIRTUAL TABLE • CREATE TABLE table1 USING fts3(content table2(content TEXT); /* TEXT); Ordinary table */ /* FTS3 table */ • SELECT count(*) FROM • SELECT count(*) FROM table2 WHERE content LIKE table1 WHERE content '%linux%'; MATCH 'linux'; /* 22.5 seconds */ /* 0.03 seconds */
  • 4. Creating tables • CREATE VIRTUAL TABLE users USING fts3( • USER_ID INTEGER PRIMARY KEY AUTOINCREMENT, • NAME TEXT NOT NULL, • PHONE INTEGER NOT NULL, • UNIQUE (USER_ID) ON CONFLICT REPLACE, tokenize=porter • )
  • 5. Deleting tables • CREATE VIRTUAL TABLE data USING fts3(); • DROP TABLE data;
  • 6. Populating FTS Tables • Regular INSERT, UPDATE, DELETE are used • Contains hidden ‘rowid’ column
  • 7. Triggers • CREATE TRIGGER TRIGGER_INSERT_USER AFTER INSERT ON USER BEGIN INSERT INTO USER_SEARCH_TABLE • VALUES(new.user_id, new.user_name); END; • CREATE TRIGGER TRIGGER_INSERT_USER AFTER UPDATE ON USER BEGIN UPDATE USER_SEARCH_TABLE SET user_name=new.user_name where user_id=old.user_id; END;
  • 8. Queries • Query by rowid • SELECT * FROM user WHERE rowid = 15; • Full-text query • SELECT * FROM SEARCH_USER_DATA WHERE SEARCH_USER_DATA MATCH ‘starcraft';
  • 9. Full-text Index Queries • Token or token prefix queries SELECT * FROM docs WHERE docs MATCH 'linux'; SELECT * FROM docs WHERE docs MATCH 'lin*'; • Phrase queries. SELECT * FROM docs WHERE docs MATCH '"linux applications"'; SELECT * FROM docs WHERE docs MATCH '"lin* app*"'; • NEAR queries. • SELECT * FROM users WHERE users MATCH ‘android NEAR starcraft'; • SELECT * FROM users WHERE users MATCH ‘android NEAR/5 starcraft';
  • 10. Tokenizers • Tokenizer is a set of rules for extracting terms from a document • Default value is ‘simple’ • Simple: converts to lower case, splitting by alphanumeric+’_’ • Porter: simple + converts to common English root. • ICU: country specific (tokenize=icu th_TH for Turkey) • Custom implementation