SlideShare a Scribd company logo
Hibernate Search
           Googling your persistence domain model



        Emmanuel Bernard
        Doer
        JBoss, a division of Red Hat
                           Copyright Red Hat © 2007-2009


Monday, April 20, 2009
Search: left over
                         of today’s applications

         Add search dimension to the domain model


           “Frankly, search sucks on this project”
                                              -- Anonymous’ boss

                 Why? How to fix that? For cheap?



                                                                2
                                Copyright Red Hat © 2007-2009


Monday, April 20, 2009
Integrate full-text search and
                persistent domain

         SQL Search vs Full-text Search
         Object model / Full-text Search mismatches
             Demo
         Hibernate Search architecture
         Configuration and Mapping
         Full-text based object queries
         Some more features



                                                           3
                           Copyright Red Hat © 2007-2009


Monday, April 20, 2009
SQL search limits

         Wildcard / word search
             ‘%hibernate%’
         Approximation (or synonym)
             ‘hybernat’
         Proximity
             ‘Java’ close to ‘Persistence’
         Relevance or (result scoring)
         multi-”column” search

                                                                4
                                Copyright Red Hat © 2007-2009


Monday, April 20, 2009
Full Text Search

         Search information
             by word
             inverted indices (word frequency, position)


         In RDBMS engines
             portability (proprietary add-on on top of SQL)
             flexibility
         Standalone engine
             Apache Lucene(tm) http://lucene.apache.org
                                                               5
                               Copyright Red Hat © 2007-2009


Monday, April 20, 2009
Mismatches with a domain model

         Structural mismatch                                      Appl
                                                                  Fwk
             full text index are text only
             no reference/association between document                   Persistence


         Synchronization mismatch
             keeping index and database up to date
         Retrieval mismatch
                                                                             Domain
             the index does not store objects                                 Model
                                                                Search
             certainly not managed objects


                                                                         6
                                Copyright Red Hat © 2007-2009


Monday, April 20, 2009
Demo
           Let’s google our application!




                                                          7
                          Copyright Red Hat © 2007-2009


Monday, April 20, 2009
Hibernate Search

         Under the Hibernate platform
             LGPL
         Built on top of Hibernate Core
         Use Apache Lucene(tm) under the hood
             In top 10 downloaded at Apache                   JBoss Seam


             Very powerful but low level




                                                                                  e
                                                               Appl




                                                                                 nc
                                                                            te
                                                               Fwk




                                                                            is
             easy to use it the “wrong” way




                                                                           rs
                                                                       Pe
         Solve the mismatches                                          Domain
                                                              Search
                                                                        Model



                                                                                  8
                              Copyright Red Hat © 2007-2009


Monday, April 20, 2009
Architecture

              Transparent indexing through event system (JPA)
                  PERSIST / UPDATE / DELETE
              Convert the object structure into Index structure
              Operation batching per transaction
                  better Lucene performance
                  “ACID”-ity
                  (pluggable scope)
              Backend
                  synchronous / asynchronous mode
                  Lucene, JMS                                   9
                                Copyright Red Hat © 2007-2009


Monday, April 20, 2009
Architecture (Backend)

              Lucene Directory
                  standalone or symmetric cluster (limited scalability)
                  immediate visibility
                  can aect front end runtime

                             Hibernate
                                 +
                         Hibernate Search
                                            Search request
                                             Index update             Lucene
                                                                     Directory
                                                                                 Database
                                                                      (Index)
                                            Search request
                                             Index update
                             Hibernate
                                 +
                         Hibernate Search
                                                                                            10
                                             Copyright Red Hat © 2007-2009


Monday, April 20, 2009
Architecture (Backend)

                JMS (Cluster)
                    Search processed locally / Change sent to master
                    asynchronous indexing (delay)
                    No front end extra cost / good scalability

                                                 Slave
                             Hibernate                                                             Database
                                                                      Lucene
                                 +                                    Directory
                                              Search request
                         Hibernate Search                              (Index)
                                                                        Copy



                                                                                            Copy
                            Index update order


                                                                                    Master
                                                                    Hibernate                        Lucene
                                                                        +                           Directory
                                                                                   Index update
                                                                Hibernate Search                     (Index)
                                                 Process
                                       JMS
                                                                                                     Master
                                      queue


                                                                                                                11
                                                   Copyright Red Hat © 2007-2009


Monday, April 20, 2009
Configuration and Mapping

         Configuration
             event listener wiring
              transparent in Hibernate Annotations
             Backend configuration


         Mapping: annotation based
             @Indexed
             @Field(store, index)
             @IndexedEmbedded
             @FieldBridge
                                                                12
                                Copyright Red Hat © 2007-2009


Monday, April 20, 2009
Query

         Retrieve objects, not documents
             no boilerplate conversion code!
         Objects from the Persistence Context
             same semantic as a JPA-QL or Criteria query
         Use org.hibernate.Query/javax.persistence.Query
             common API for all your queries
         Query on correlated objects
             “JOIN”-like query quot;author.address.city:Atlantaquot;



                                                               13
                               Copyright Red Hat © 2007-2009


Monday, April 20, 2009
Query possibilities

         bring the “best” document first
         recover from typos
         recover from faulty orthography
         find from words with the same meaning
         find words from the same family
         find an exact phrase
         find similar documents



                                                              14
                              Copyright Red Hat © 2007-2009


Monday, April 20, 2009
More query features

         Fine grained fetching strategy
         Sort by property rather than relevance
         Projection (both field and metadata)
             metadata: SCORE, ID, BOOST etc
             no DB / Persistence Context access
         Filters
             security / temporal data / category
         Total number of results

                                                              15
                              Copyright Red Hat © 2007-2009


Monday, April 20, 2009
Some more features

              Automatic index optimization
              Index sharding
              Manual indexing and purging
                  non event-based system
              Shared Lucene resources
              Native Lucene access




                                                               16
                               Copyright Red Hat © 2007-2009


Monday, April 20, 2009
Full-Text search without the
                       hassle

         Transparent index synchronization
         Automatic Structural conversion through Mapping
         No paradigm shift when retrieving data


         Clustering capability out of the box


         Easier / transparent optimized Lucene use



                                                           17
                           Copyright Red Hat © 2007-2009


Monday, April 20, 2009
Road Map

         Programmatic Mapping API Perf
         Multi threaded mass index
         Clustering
         Query
              Dictionary and spellchecker
              Easier query building
              MoreLikeThis?
         Statistics
                                            18



Monday, April 20, 2009
QA



                                                         19
                         Copyright Red Hat © 2007-2009


Monday, April 20, 2009
For More Information

              Hibernate Search
                  http://search.hibernate.org
                  Hibernate Search in Action
              Apache Lucene
                  http://lucene.apache.org
                  Lucene In Action
              http://in.relation.to
              http://blog.emmanuelbernard.com


                                                                20
                                Copyright Red Hat © 2007-2009


Monday, April 20, 2009

More Related Content

Viewers also liked

Ethics For Emerging Generations Sample
Ethics For Emerging Generations  SampleEthics For Emerging Generations  Sample
Ethics For Emerging Generations Sample
Al Serino
 
June Presentation Overview
June Presentation OverviewJune Presentation Overview
June Presentation Overview
Al Serino
 
Node js
Node jsNode js
Node js
Prasoon Kumar
 
FormValidator::Assets
FormValidator::AssetsFormValidator::Assets
FormValidator::Assetstypester
 
5 Strategies Day One Handout Teen Leadership May 22
5 Strategies Day One Handout  Teen Leadership  May 225 Strategies Day One Handout  Teen Leadership  May 22
5 Strategies Day One Handout Teen Leadership May 22
Al Serino
 
Leadership in the 21st Century
Leadership in the 21st CenturyLeadership in the 21st Century
Leadership in the 21st Century
Al Serino
 
MongoDB for storing humongous music database
MongoDB for storing humongous music databaseMongoDB for storing humongous music database
MongoDB for storing humongous music database
Prasoon Kumar
 
Christian leadership
Christian leadershipChristian leadership
Christian leadership
Don_Pranxter
 
Lead Humbly: The Path of Servant Leadership
Lead Humbly: The Path of Servant Leadership Lead Humbly: The Path of Servant Leadership
Lead Humbly: The Path of Servant Leadership
Lindy Ryan
 

Viewers also liked (9)

Ethics For Emerging Generations Sample
Ethics For Emerging Generations  SampleEthics For Emerging Generations  Sample
Ethics For Emerging Generations Sample
 
June Presentation Overview
June Presentation OverviewJune Presentation Overview
June Presentation Overview
 
Node js
Node jsNode js
Node js
 
FormValidator::Assets
FormValidator::AssetsFormValidator::Assets
FormValidator::Assets
 
5 Strategies Day One Handout Teen Leadership May 22
5 Strategies Day One Handout  Teen Leadership  May 225 Strategies Day One Handout  Teen Leadership  May 22
5 Strategies Day One Handout Teen Leadership May 22
 
Leadership in the 21st Century
Leadership in the 21st CenturyLeadership in the 21st Century
Leadership in the 21st Century
 
MongoDB for storing humongous music database
MongoDB for storing humongous music databaseMongoDB for storing humongous music database
MongoDB for storing humongous music database
 
Christian leadership
Christian leadershipChristian leadership
Christian leadership
 
Lead Humbly: The Path of Servant Leadership
Lead Humbly: The Path of Servant Leadership Lead Humbly: The Path of Servant Leadership
Lead Humbly: The Path of Servant Leadership
 

Similar to Hibernate Search Seam 1.5

04.egovFrame Runtime Environment Workshop
04.egovFrame Runtime Environment Workshop04.egovFrame Runtime Environment Workshop
04.egovFrame Runtime Environment Workshop
Chuong Nguyen
 
CRX Best practices
CRX Best practicesCRX Best practices
CRX Best practices
lisui0807
 
Search Computing Overview
Search Computing OverviewSearch Computing Overview
Search Computing Overview
Search Computing
 
Web Queries: From a Web of Data to a Semantic Web
Web Queries: From a Web of Data to a Semantic WebWeb Queries: From a Web of Data to a Semantic Web
Web Queries: From a Web of Data to a Semantic Web
Tim Furche
 
Building Content Applications with JCR and OSGi
Building Content Applications with JCR and OSGiBuilding Content Applications with JCR and OSGi
Building Content Applications with JCR and OSGi
Cédric Hüsler
 
Otago vre-overview
Otago vre-overviewOtago vre-overview
Otago vre-overview
University of Otago
 
Gemfire Sqlfire - La Marmite NoSql
Gemfire Sqlfire - La Marmite NoSqlGemfire Sqlfire - La Marmite NoSql
Gemfire Sqlfire - La Marmite NoSql
Duchess France
 
Developer's Most Frequent Hadoop Headaches & How to Address Them__HadoopSumm...
Developer's Most Frequent Hadoop Headaches &  How to Address Them__HadoopSumm...Developer's Most Frequent Hadoop Headaches &  How to Address Them__HadoopSumm...
Developer's Most Frequent Hadoop Headaches & How to Address Them__HadoopSumm...
Yahoo Developer Network
 
Virtualizing Latency Sensitive Workloads and vFabric GemFire
Virtualizing Latency Sensitive Workloads and vFabric GemFireVirtualizing Latency Sensitive Workloads and vFabric GemFire
Virtualizing Latency Sensitive Workloads and vFabric GemFire
Carter Shanklin
 
Introduction To J Boss Seam
Introduction To J Boss SeamIntroduction To J Boss Seam
Introduction To J Boss Seam
ashishkulkarni
 
JavaOne 2009 - Full-Text Search: Human Heaven and Database Savior in the Cloud
JavaOne 2009 - Full-Text Search: Human Heaven and Database Savior in the CloudJavaOne 2009 - Full-Text Search: Human Heaven and Database Savior in the Cloud
JavaOne 2009 - Full-Text Search: Human Heaven and Database Savior in the Cloud
Aaron Walker
 
Cloudcamp Athens 2011 Presenting Heroku
Cloudcamp Athens 2011 Presenting HerokuCloudcamp Athens 2011 Presenting Heroku
Cloudcamp Athens 2011 Presenting Heroku
Savvas Georgiou
 
Os Pittaro
Os PittaroOs Pittaro
Os Pittaro
oscon2007
 
Mark Logic Information Analysis Trends Webinar
Mark Logic Information Analysis Trends WebinarMark Logic Information Analysis Trends Webinar
Mark Logic Information Analysis Trends Webinar
Dave Kellogg
 
Cloud foundry elastic architecture and deploy based on openstack
Cloud foundry elastic architecture and deploy based on openstackCloud foundry elastic architecture and deploy based on openstack
Cloud foundry elastic architecture and deploy based on openstack
OpenCity Community
 
Bca1931 final
Bca1931 finalBca1931 final
Bca1931 final
Itzik Reich
 
RESTful SOA and the Spring Framework (EMCWorld 2011)
RESTful SOA and the Spring Framework (EMCWorld 2011)RESTful SOA and the Spring Framework (EMCWorld 2011)
RESTful SOA and the Spring Framework (EMCWorld 2011)
EMC
 
VMware, Storage & Kitchen appliances
VMware, Storage & Kitchen appliancesVMware, Storage & Kitchen appliances
VMware, Storage & Kitchen appliances
subtitle
 
Prospectus presentation
Prospectus presentation Prospectus presentation
Prospectus presentation
The Children's Hospital of Philadelphia
 
Cloumon enterprise
Cloumon enterpriseCloumon enterprise
Cloumon enterprise
Gruter
 

Similar to Hibernate Search Seam 1.5 (20)

04.egovFrame Runtime Environment Workshop
04.egovFrame Runtime Environment Workshop04.egovFrame Runtime Environment Workshop
04.egovFrame Runtime Environment Workshop
 
CRX Best practices
CRX Best practicesCRX Best practices
CRX Best practices
 
Search Computing Overview
Search Computing OverviewSearch Computing Overview
Search Computing Overview
 
Web Queries: From a Web of Data to a Semantic Web
Web Queries: From a Web of Data to a Semantic WebWeb Queries: From a Web of Data to a Semantic Web
Web Queries: From a Web of Data to a Semantic Web
 
Building Content Applications with JCR and OSGi
Building Content Applications with JCR and OSGiBuilding Content Applications with JCR and OSGi
Building Content Applications with JCR and OSGi
 
Otago vre-overview
Otago vre-overviewOtago vre-overview
Otago vre-overview
 
Gemfire Sqlfire - La Marmite NoSql
Gemfire Sqlfire - La Marmite NoSqlGemfire Sqlfire - La Marmite NoSql
Gemfire Sqlfire - La Marmite NoSql
 
Developer's Most Frequent Hadoop Headaches & How to Address Them__HadoopSumm...
Developer's Most Frequent Hadoop Headaches &  How to Address Them__HadoopSumm...Developer's Most Frequent Hadoop Headaches &  How to Address Them__HadoopSumm...
Developer's Most Frequent Hadoop Headaches & How to Address Them__HadoopSumm...
 
Virtualizing Latency Sensitive Workloads and vFabric GemFire
Virtualizing Latency Sensitive Workloads and vFabric GemFireVirtualizing Latency Sensitive Workloads and vFabric GemFire
Virtualizing Latency Sensitive Workloads and vFabric GemFire
 
Introduction To J Boss Seam
Introduction To J Boss SeamIntroduction To J Boss Seam
Introduction To J Boss Seam
 
JavaOne 2009 - Full-Text Search: Human Heaven and Database Savior in the Cloud
JavaOne 2009 - Full-Text Search: Human Heaven and Database Savior in the CloudJavaOne 2009 - Full-Text Search: Human Heaven and Database Savior in the Cloud
JavaOne 2009 - Full-Text Search: Human Heaven and Database Savior in the Cloud
 
Cloudcamp Athens 2011 Presenting Heroku
Cloudcamp Athens 2011 Presenting HerokuCloudcamp Athens 2011 Presenting Heroku
Cloudcamp Athens 2011 Presenting Heroku
 
Os Pittaro
Os PittaroOs Pittaro
Os Pittaro
 
Mark Logic Information Analysis Trends Webinar
Mark Logic Information Analysis Trends WebinarMark Logic Information Analysis Trends Webinar
Mark Logic Information Analysis Trends Webinar
 
Cloud foundry elastic architecture and deploy based on openstack
Cloud foundry elastic architecture and deploy based on openstackCloud foundry elastic architecture and deploy based on openstack
Cloud foundry elastic architecture and deploy based on openstack
 
Bca1931 final
Bca1931 finalBca1931 final
Bca1931 final
 
RESTful SOA and the Spring Framework (EMCWorld 2011)
RESTful SOA and the Spring Framework (EMCWorld 2011)RESTful SOA and the Spring Framework (EMCWorld 2011)
RESTful SOA and the Spring Framework (EMCWorld 2011)
 
VMware, Storage & Kitchen appliances
VMware, Storage & Kitchen appliancesVMware, Storage & Kitchen appliances
VMware, Storage & Kitchen appliances
 
Prospectus presentation
Prospectus presentation Prospectus presentation
Prospectus presentation
 
Cloumon enterprise
Cloumon enterpriseCloumon enterprise
Cloumon enterprise
 

Recently uploaded

20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Tosin Akinosho
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
Postman
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
MichaelKnudsen27
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
Chart Kalyan
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
fredae14
 
Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
Federico Razzoli
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
Hiroshi SHIBATA
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
Zilliz
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
Jason Packer
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
SitimaJohn
 

Recently uploaded (20)

20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Monitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdfMonitoring and Managing Anomaly Detection on OpenShift.pdf
Monitoring and Managing Anomaly Detection on OpenShift.pdf
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
WeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation TechniquesWeTestAthens: Postman's AI & Automation Techniques
WeTestAthens: Postman's AI & Automation Techniques
 
Nordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptxNordic Marketo Engage User Group_June 13_ 2024.pptx
Nordic Marketo Engage User Group_June 13_ 2024.pptx
 
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdfHow to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
How to Interpret Trends in the Kalyan Rajdhani Mix Chart.pdf
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Recommendation System using RAG Architecture
Recommendation System using RAG ArchitectureRecommendation System using RAG Architecture
Recommendation System using RAG Architecture
 
Webinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data WarehouseWebinar: Designing a schema for a Data Warehouse
Webinar: Designing a schema for a Data Warehouse
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
Introduction of Cybersecurity with OSS at Code Europe 2024
Introduction of Cybersecurity with OSS  at Code Europe 2024Introduction of Cybersecurity with OSS  at Code Europe 2024
Introduction of Cybersecurity with OSS at Code Europe 2024
 
Generating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and MilvusGenerating privacy-protected synthetic data using Secludy and Milvus
Generating privacy-protected synthetic data using Secludy and Milvus
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024Columbus Data & Analytics Wednesdays - June 2024
Columbus Data & Analytics Wednesdays - June 2024
 
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptxOcean lotus Threat actors project by John Sitima 2024 (1).pptx
Ocean lotus Threat actors project by John Sitima 2024 (1).pptx
 

Hibernate Search Seam 1.5

  • 1. Hibernate Search Googling your persistence domain model Emmanuel Bernard Doer JBoss, a division of Red Hat Copyright Red Hat © 2007-2009 Monday, April 20, 2009
  • 2. Search: left over of today’s applications Add search dimension to the domain model “Frankly, search sucks on this project” -- Anonymous’ boss Why? How to fix that? For cheap? 2 Copyright Red Hat © 2007-2009 Monday, April 20, 2009
  • 3. Integrate full-text search and persistent domain SQL Search vs Full-text Search Object model / Full-text Search mismatches Demo Hibernate Search architecture Configuration and Mapping Full-text based object queries Some more features 3 Copyright Red Hat © 2007-2009 Monday, April 20, 2009
  • 4. SQL search limits Wildcard / word search ‘%hibernate%’ Approximation (or synonym) ‘hybernat’ Proximity ‘Java’ close to ‘Persistence’ Relevance or (result scoring) multi-”column” search 4 Copyright Red Hat © 2007-2009 Monday, April 20, 2009
  • 5. Full Text Search Search information by word inverted indices (word frequency, position) In RDBMS engines portability (proprietary add-on on top of SQL) flexibility Standalone engine Apache Lucene(tm) http://lucene.apache.org 5 Copyright Red Hat © 2007-2009 Monday, April 20, 2009
  • 6. Mismatches with a domain model Structural mismatch Appl Fwk full text index are text only no reference/association between document Persistence Synchronization mismatch keeping index and database up to date Retrieval mismatch Domain the index does not store objects Model Search certainly not managed objects 6 Copyright Red Hat © 2007-2009 Monday, April 20, 2009
  • 7. Demo Let’s google our application! 7 Copyright Red Hat © 2007-2009 Monday, April 20, 2009
  • 8. Hibernate Search Under the Hibernate platform LGPL Built on top of Hibernate Core Use Apache Lucene(tm) under the hood In top 10 downloaded at Apache JBoss Seam Very powerful but low level e Appl nc te Fwk is easy to use it the “wrong” way rs Pe Solve the mismatches Domain Search Model 8 Copyright Red Hat © 2007-2009 Monday, April 20, 2009
  • 9. Architecture Transparent indexing through event system (JPA) PERSIST / UPDATE / DELETE Convert the object structure into Index structure Operation batching per transaction better Lucene performance “ACID”-ity (pluggable scope) Backend synchronous / asynchronous mode Lucene, JMS 9 Copyright Red Hat © 2007-2009 Monday, April 20, 2009
  • 10. Architecture (Backend) Lucene Directory standalone or symmetric cluster (limited scalability) immediate visibility can aect front end runtime Hibernate + Hibernate Search Search request Index update Lucene Directory Database (Index) Search request Index update Hibernate + Hibernate Search 10 Copyright Red Hat © 2007-2009 Monday, April 20, 2009
  • 11. Architecture (Backend) JMS (Cluster) Search processed locally / Change sent to master asynchronous indexing (delay) No front end extra cost / good scalability Slave Hibernate Database Lucene + Directory Search request Hibernate Search (Index) Copy Copy Index update order Master Hibernate Lucene + Directory Index update Hibernate Search (Index) Process JMS Master queue 11 Copyright Red Hat © 2007-2009 Monday, April 20, 2009
  • 12. Configuration and Mapping Configuration event listener wiring transparent in Hibernate Annotations Backend configuration Mapping: annotation based @Indexed @Field(store, index) @IndexedEmbedded @FieldBridge 12 Copyright Red Hat © 2007-2009 Monday, April 20, 2009
  • 13. Query Retrieve objects, not documents no boilerplate conversion code! Objects from the Persistence Context same semantic as a JPA-QL or Criteria query Use org.hibernate.Query/javax.persistence.Query common API for all your queries Query on correlated objects “JOIN”-like query quot;author.address.city:Atlantaquot; 13 Copyright Red Hat © 2007-2009 Monday, April 20, 2009
  • 14. Query possibilities bring the “best” document first recover from typos recover from faulty orthography find from words with the same meaning find words from the same family find an exact phrase find similar documents 14 Copyright Red Hat © 2007-2009 Monday, April 20, 2009
  • 15. More query features Fine grained fetching strategy Sort by property rather than relevance Projection (both field and metadata) metadata: SCORE, ID, BOOST etc no DB / Persistence Context access Filters security / temporal data / category Total number of results 15 Copyright Red Hat © 2007-2009 Monday, April 20, 2009
  • 16. Some more features Automatic index optimization Index sharding Manual indexing and purging non event-based system Shared Lucene resources Native Lucene access 16 Copyright Red Hat © 2007-2009 Monday, April 20, 2009
  • 17. Full-Text search without the hassle Transparent index synchronization Automatic Structural conversion through Mapping No paradigm shift when retrieving data Clustering capability out of the box Easier / transparent optimized Lucene use 17 Copyright Red Hat © 2007-2009 Monday, April 20, 2009
  • 18. Road Map Programmatic Mapping API Perf Multi threaded mass index Clustering Query Dictionary and spellchecker Easier query building MoreLikeThis? Statistics 18 Monday, April 20, 2009
  • 19. QA 19 Copyright Red Hat © 2007-2009 Monday, April 20, 2009
  • 20. For More Information Hibernate Search http://search.hibernate.org Hibernate Search in Action Apache Lucene http://lucene.apache.org Lucene In Action http://in.relation.to http://blog.emmanuelbernard.com 20 Copyright Red Hat © 2007-2009 Monday, April 20, 2009