SlideShare une entreprise Scribd logo
1  sur  12
Télécharger pour lire hors ligne
Using full text search in OpenERP
Holger Brunn
Therp BV
03 july 2013
Intro PostgreSQL full text search capabilities OpenObject FTS
Outline
1 Intro
2 PostgreSQL full text search capabilities
3 OpenObject FTS
Holger Brunn Therp BV
Using full text search in OpenERP
Intro PostgreSQL full text search capabilities OpenObject FTS
Searching content of text fields is
very slow for large amounts of data
finds only fields containing the exact string
you filled in
restricted to just this string
Full text search gives us
fast searches
lexeme level fuzzy search
logical operators
Holger Brunn Therp BV
Using full text search in OpenERP
Intro PostgreSQL full text search capabilities OpenObject FTS
Demo
imported part of the project gutenberg database as
documents
10.000 books, every one as its own document,
resulting in a lot of text in different languages
doing several searches there with standard OpenERP
search makes you a serious coffee addict
Holger Brunn Therp BV
Using full text search in OpenERP
Intro PostgreSQL full text search capabilities OpenObject FTS
Basics
documents are the lump of text you are searching through
tokens are parts of a document: words, but also i.e. urls,
numbers
lexemes are roughly the core of a word: ‘searching’,
‘search’, ‘searched’ are all derived from the
lexeme SEARCH
stop words are words that don’t make sense to store and are
to be ignored, think of ‘the’
dictionaries define lexemes, synonyms and stop words of a
language
more info http://www.postgresql.org/docs/current/
static/textsearch.html
Holger Brunn Therp BV
Using full text search in OpenERP
Intro PostgreSQL full text search capabilities OpenObject FTS
Basics II
tsvector is the datatype postgres uses to represent a
tokenized, lexemized text
tsquery is the datatype to represent a query against a
tsvector, with operators
‘&’ and
‘|’ or
‘!’ not
‘(’, ‘)’ brackets
:* substring search
@@ is the operator to match a tsquery against a
tsvector
Holger Brunn Therp BV
Using full text search in OpenERP
Intro PostgreSQL full text search capabilities OpenObject FTS
Examples
select to tsvector(’english’, ’This is an english text. Pay
attention how it is broken up’);
select to tsvector(’french’, ’This is an english text. Pay
attention how it is broken up’);
select plainto tsquery(’english’, ’this’);
select plainto tsquery(’french’, ’this’);
Holger Brunn Therp BV
Using full text search in OpenERP
Intro PostgreSQL full text search capabilities OpenObject FTS
Untouched topics
ranking
highlighting
proximity search
parser tuning
dictionary tuning
configurations
index tuning
Holger Brunn Therp BV
Using full text search in OpenERP
Intro PostgreSQL full text search capabilities OpenObject FTS
Full text search support for OpenERP
is available on launchpad:
https://launchpad.net/openobject-fts
is a collection of addons that enable full text search for
several models
takes care of creating appropriate indexes and triggers for
underlying database tables and columns
can be misused to provide a unified search over several
models
Holger Brunn Therp BV
Using full text search in OpenERP
Intro PostgreSQL full text search capabilities OpenObject FTS
Installation / Configuration
on installation, a cronjob is created to create the initial
index
watch your logs, there is an info on when index creation
starts and when it ends
only then, this model is searchable via full text search
this can take hours if you have enough data
the initial configuration is ‘simple’, this won’t get you
good results
set the parameter fts base tsconfig to english, french, etc.
to change that
then go to Configuration / Fulltextsearch configuration to
recreate the index
Holger Brunn Therp BV
Using full text search in OpenERP
Intro PostgreSQL full text search capabilities OpenObject FTS
Hacking it
depend on fts base
inherit fts base
set properties model and indexed column
the class fts base is extensively documented, read that
note that this are not ORM models
to change the combined search view, inherit fts.proxy’s
search view
Holger Brunn Therp BV
Using full text search in OpenERP
Intro PostgreSQL full text search capabilities OpenObject FTS
Contributions welcome
hook into search methods of full text indexed models to
also use the full text search in their own searches
hook into fts.proxy’s treeview and override edit/form
actions to get rid of the awkward extra buttons currently
used
hack 7.0’s search widget to propose lexemes as you type
dig deeper into caching mechanisms for smoother scrolling
query available configurations from postgres and offer
then in the confguration wizard
Holger Brunn Therp BV
Using full text search in OpenERP

Contenu connexe

Plus de Odoo

Extending Odoo with a Comprehensive Budgeting and Forecasting Capability
Extending Odoo with a Comprehensive Budgeting and Forecasting CapabilityExtending Odoo with a Comprehensive Budgeting and Forecasting Capability
Extending Odoo with a Comprehensive Budgeting and Forecasting CapabilityOdoo
 
Managing Multi-channel Selling with Odoo
Managing Multi-channel Selling with OdooManaging Multi-channel Selling with Odoo
Managing Multi-channel Selling with OdooOdoo
 
Product Configurator: Advanced Use Case
Product Configurator: Advanced Use CaseProduct Configurator: Advanced Use Case
Product Configurator: Advanced Use CaseOdoo
 
Accounting Automation: How Much Money We Saved and How?
Accounting Automation: How Much Money We Saved and How?Accounting Automation: How Much Money We Saved and How?
Accounting Automation: How Much Money We Saved and How?Odoo
 
Rock Your Logistics with Advanced Operations
Rock Your Logistics with Advanced OperationsRock Your Logistics with Advanced Operations
Rock Your Logistics with Advanced OperationsOdoo
 
Transition from a cost to a flow-centric organization
Transition from a cost to a flow-centric organizationTransition from a cost to a flow-centric organization
Transition from a cost to a flow-centric organizationOdoo
 
Synchronization: The Supply Chain Response to Overcome the Crisis
Synchronization: The Supply Chain Response to Overcome the CrisisSynchronization: The Supply Chain Response to Overcome the Crisis
Synchronization: The Supply Chain Response to Overcome the CrisisOdoo
 
Running a University with Odoo
Running a University with OdooRunning a University with Odoo
Running a University with OdooOdoo
 
Down Payments on Purchase Orders in Odoo
Down Payments on Purchase Orders in OdooDown Payments on Purchase Orders in Odoo
Down Payments on Purchase Orders in OdooOdoo
 
Odoo Implementation in Phases - Success Story of a Retail Chain 3Sach food
Odoo Implementation in Phases - Success Story of a Retail Chain 3Sach foodOdoo Implementation in Phases - Success Story of a Retail Chain 3Sach food
Odoo Implementation in Phases - Success Story of a Retail Chain 3Sach foodOdoo
 
Migration from Salesforce to Odoo
Migration from Salesforce to OdooMigration from Salesforce to Odoo
Migration from Salesforce to OdooOdoo
 
Preventing User Mistakes by Using Machine Learning
Preventing User Mistakes by Using Machine LearningPreventing User Mistakes by Using Machine Learning
Preventing User Mistakes by Using Machine LearningOdoo
 
Becoming an Odoo Expert: How to Prepare for the Certification
Becoming an Odoo Expert: How to Prepare for the Certification Becoming an Odoo Expert: How to Prepare for the Certification
Becoming an Odoo Expert: How to Prepare for the Certification Odoo
 
Instant Printing of any Odoo Report or Shipping Label
Instant Printing of any Odoo Report or Shipping LabelInstant Printing of any Odoo Report or Shipping Label
Instant Printing of any Odoo Report or Shipping LabelOdoo
 
How Odoo helped an Organization Grow 3 Fold
How Odoo helped an Organization Grow 3 FoldHow Odoo helped an Organization Grow 3 Fold
How Odoo helped an Organization Grow 3 FoldOdoo
 
From Shopify to Odoo
From Shopify to OdooFrom Shopify to Odoo
From Shopify to OdooOdoo
 
Digital Transformation at Old MacDonald Farms: A Personal Story
Digital Transformation at Old MacDonald Farms: A Personal StoryDigital Transformation at Old MacDonald Farms: A Personal Story
Digital Transformation at Old MacDonald Farms: A Personal StoryOdoo
 
An all in-one Engineer-to-Order (ETO) Solution with Odoo
An all in-one Engineer-to-Order (ETO) Solution with OdooAn all in-one Engineer-to-Order (ETO) Solution with Odoo
An all in-one Engineer-to-Order (ETO) Solution with OdooOdoo
 
Advanced Integrated HRMS and Appraisal System
Advanced Integrated HRMS and Appraisal SystemAdvanced Integrated HRMS and Appraisal System
Advanced Integrated HRMS and Appraisal SystemOdoo
 
Accounting using the Odoo Enterprise Swsiss Localization
Accounting using the Odoo Enterprise Swsiss LocalizationAccounting using the Odoo Enterprise Swsiss Localization
Accounting using the Odoo Enterprise Swsiss LocalizationOdoo
 

Plus de Odoo (20)

Extending Odoo with a Comprehensive Budgeting and Forecasting Capability
Extending Odoo with a Comprehensive Budgeting and Forecasting CapabilityExtending Odoo with a Comprehensive Budgeting and Forecasting Capability
Extending Odoo with a Comprehensive Budgeting and Forecasting Capability
 
Managing Multi-channel Selling with Odoo
Managing Multi-channel Selling with OdooManaging Multi-channel Selling with Odoo
Managing Multi-channel Selling with Odoo
 
Product Configurator: Advanced Use Case
Product Configurator: Advanced Use CaseProduct Configurator: Advanced Use Case
Product Configurator: Advanced Use Case
 
Accounting Automation: How Much Money We Saved and How?
Accounting Automation: How Much Money We Saved and How?Accounting Automation: How Much Money We Saved and How?
Accounting Automation: How Much Money We Saved and How?
 
Rock Your Logistics with Advanced Operations
Rock Your Logistics with Advanced OperationsRock Your Logistics with Advanced Operations
Rock Your Logistics with Advanced Operations
 
Transition from a cost to a flow-centric organization
Transition from a cost to a flow-centric organizationTransition from a cost to a flow-centric organization
Transition from a cost to a flow-centric organization
 
Synchronization: The Supply Chain Response to Overcome the Crisis
Synchronization: The Supply Chain Response to Overcome the CrisisSynchronization: The Supply Chain Response to Overcome the Crisis
Synchronization: The Supply Chain Response to Overcome the Crisis
 
Running a University with Odoo
Running a University with OdooRunning a University with Odoo
Running a University with Odoo
 
Down Payments on Purchase Orders in Odoo
Down Payments on Purchase Orders in OdooDown Payments on Purchase Orders in Odoo
Down Payments on Purchase Orders in Odoo
 
Odoo Implementation in Phases - Success Story of a Retail Chain 3Sach food
Odoo Implementation in Phases - Success Story of a Retail Chain 3Sach foodOdoo Implementation in Phases - Success Story of a Retail Chain 3Sach food
Odoo Implementation in Phases - Success Story of a Retail Chain 3Sach food
 
Migration from Salesforce to Odoo
Migration from Salesforce to OdooMigration from Salesforce to Odoo
Migration from Salesforce to Odoo
 
Preventing User Mistakes by Using Machine Learning
Preventing User Mistakes by Using Machine LearningPreventing User Mistakes by Using Machine Learning
Preventing User Mistakes by Using Machine Learning
 
Becoming an Odoo Expert: How to Prepare for the Certification
Becoming an Odoo Expert: How to Prepare for the Certification Becoming an Odoo Expert: How to Prepare for the Certification
Becoming an Odoo Expert: How to Prepare for the Certification
 
Instant Printing of any Odoo Report or Shipping Label
Instant Printing of any Odoo Report or Shipping LabelInstant Printing of any Odoo Report or Shipping Label
Instant Printing of any Odoo Report or Shipping Label
 
How Odoo helped an Organization Grow 3 Fold
How Odoo helped an Organization Grow 3 FoldHow Odoo helped an Organization Grow 3 Fold
How Odoo helped an Organization Grow 3 Fold
 
From Shopify to Odoo
From Shopify to OdooFrom Shopify to Odoo
From Shopify to Odoo
 
Digital Transformation at Old MacDonald Farms: A Personal Story
Digital Transformation at Old MacDonald Farms: A Personal StoryDigital Transformation at Old MacDonald Farms: A Personal Story
Digital Transformation at Old MacDonald Farms: A Personal Story
 
An all in-one Engineer-to-Order (ETO) Solution with Odoo
An all in-one Engineer-to-Order (ETO) Solution with OdooAn all in-one Engineer-to-Order (ETO) Solution with Odoo
An all in-one Engineer-to-Order (ETO) Solution with Odoo
 
Advanced Integrated HRMS and Appraisal System
Advanced Integrated HRMS and Appraisal SystemAdvanced Integrated HRMS and Appraisal System
Advanced Integrated HRMS and Appraisal System
 
Accounting using the Odoo Enterprise Swsiss Localization
Accounting using the Odoo Enterprise Swsiss LocalizationAccounting using the Odoo Enterprise Swsiss Localization
Accounting using the Odoo Enterprise Swsiss Localization
 

Dernier

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 

Dernier (20)

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 

Using full text search in OpenERP. Holger Brunn, Therp

  • 1. Using full text search in OpenERP Holger Brunn Therp BV 03 july 2013
  • 2. Intro PostgreSQL full text search capabilities OpenObject FTS Outline 1 Intro 2 PostgreSQL full text search capabilities 3 OpenObject FTS Holger Brunn Therp BV Using full text search in OpenERP
  • 3. Intro PostgreSQL full text search capabilities OpenObject FTS Searching content of text fields is very slow for large amounts of data finds only fields containing the exact string you filled in restricted to just this string Full text search gives us fast searches lexeme level fuzzy search logical operators Holger Brunn Therp BV Using full text search in OpenERP
  • 4. Intro PostgreSQL full text search capabilities OpenObject FTS Demo imported part of the project gutenberg database as documents 10.000 books, every one as its own document, resulting in a lot of text in different languages doing several searches there with standard OpenERP search makes you a serious coffee addict Holger Brunn Therp BV Using full text search in OpenERP
  • 5. Intro PostgreSQL full text search capabilities OpenObject FTS Basics documents are the lump of text you are searching through tokens are parts of a document: words, but also i.e. urls, numbers lexemes are roughly the core of a word: ‘searching’, ‘search’, ‘searched’ are all derived from the lexeme SEARCH stop words are words that don’t make sense to store and are to be ignored, think of ‘the’ dictionaries define lexemes, synonyms and stop words of a language more info http://www.postgresql.org/docs/current/ static/textsearch.html Holger Brunn Therp BV Using full text search in OpenERP
  • 6. Intro PostgreSQL full text search capabilities OpenObject FTS Basics II tsvector is the datatype postgres uses to represent a tokenized, lexemized text tsquery is the datatype to represent a query against a tsvector, with operators ‘&’ and ‘|’ or ‘!’ not ‘(’, ‘)’ brackets :* substring search @@ is the operator to match a tsquery against a tsvector Holger Brunn Therp BV Using full text search in OpenERP
  • 7. Intro PostgreSQL full text search capabilities OpenObject FTS Examples select to tsvector(’english’, ’This is an english text. Pay attention how it is broken up’); select to tsvector(’french’, ’This is an english text. Pay attention how it is broken up’); select plainto tsquery(’english’, ’this’); select plainto tsquery(’french’, ’this’); Holger Brunn Therp BV Using full text search in OpenERP
  • 8. Intro PostgreSQL full text search capabilities OpenObject FTS Untouched topics ranking highlighting proximity search parser tuning dictionary tuning configurations index tuning Holger Brunn Therp BV Using full text search in OpenERP
  • 9. Intro PostgreSQL full text search capabilities OpenObject FTS Full text search support for OpenERP is available on launchpad: https://launchpad.net/openobject-fts is a collection of addons that enable full text search for several models takes care of creating appropriate indexes and triggers for underlying database tables and columns can be misused to provide a unified search over several models Holger Brunn Therp BV Using full text search in OpenERP
  • 10. Intro PostgreSQL full text search capabilities OpenObject FTS Installation / Configuration on installation, a cronjob is created to create the initial index watch your logs, there is an info on when index creation starts and when it ends only then, this model is searchable via full text search this can take hours if you have enough data the initial configuration is ‘simple’, this won’t get you good results set the parameter fts base tsconfig to english, french, etc. to change that then go to Configuration / Fulltextsearch configuration to recreate the index Holger Brunn Therp BV Using full text search in OpenERP
  • 11. Intro PostgreSQL full text search capabilities OpenObject FTS Hacking it depend on fts base inherit fts base set properties model and indexed column the class fts base is extensively documented, read that note that this are not ORM models to change the combined search view, inherit fts.proxy’s search view Holger Brunn Therp BV Using full text search in OpenERP
  • 12. Intro PostgreSQL full text search capabilities OpenObject FTS Contributions welcome hook into search methods of full text indexed models to also use the full text search in their own searches hook into fts.proxy’s treeview and override edit/form actions to get rid of the awkward extra buttons currently used hack 7.0’s search widget to propose lexemes as you type dig deeper into caching mechanisms for smoother scrolling query available configurations from postgres and offer then in the confguration wizard Holger Brunn Therp BV Using full text search in OpenERP