SlideShare a Scribd company logo
1 of 21
Download to read offline
APACHE SLING & FRIENDS TECH MEETUP
BERLIN, 23-25 SEPTEMBER 2013
Scaling Search in Oak with Solr
Tommaso Teofili
adaptTo() 2013 2
A look back ...
Scaling Search in Oak with Solr
adaptTo() 2013 3
Ā§ļ‚§ā€Æ Following up last yearā€™s ā€œOak / Solr
integrationā€ session
Looking at last yearā€™s agenda
adaptTo() 2013 4
Ā§ļ‚§ā€Æ What we have:
Ā§ļ‚§ā€Æ Search Oak content with Solr
independently
Ā§ļ‚§ā€Æ Oak running with a Solr index
Ā§ļ‚§ā€Æ Embedded	
 Ā 	
 Ā 
Ā§ļ‚§ā€Æ Remote	
 Ā 
Ā§ļ‚§ā€Æ What we miss:
Ā§ļ‚§ā€Æ Solr based MicroKernel
Apache Jackrabbit Oak
adaptTo() 2013 5
Ā§ļ‚§ā€Æ Scalable content repository
Ā§ļ‚§ā€Æ JCR compatibility (to some degree)
Ā§ļ‚§ā€Æ Performance especially for concurrent
access
Ā§ļ‚§ā€Æ Scalability for huge repositories (> 100M
nodes)
Ā§ļ‚§ā€Æ Support managed environments (e.g. OSGi)
Ā§ļ‚§ā€Æ Cloud deployments
Apache Solr
adaptTo() 2013 6
Ā§ļ‚§ā€Æ Enterprise search platform
Ā§ļ‚§ā€Æ Based on Apache Lucene
Ā§ļ‚§ā€Æ Full text, faceting, highlighting, etc.
Ā§ļ‚§ā€Æ Dynamic cluster architecture
Ā§ļ‚§ā€Æ HTTP API
Ā§ļ‚§ā€Æ Latest release 4.4.0
Why Apache Solr
adaptTo() 2013 7
Ā§ļ‚§ā€Æ Distributed, fault tolerant indexing /
searching
Ā§ļ‚§ā€Æ Highly configurable
Ā§ļ‚§ā€Æ without touching the repository
Ā§ļ‚§ā€Æ Customizable
adaptTo() 2013 8
How it works ...
IndexEditor API
adaptTo() 2013 9
Ā§ļ‚§ā€Æ an	
 Ā Editor	
 Ā receives	
 Ā info	
 Ā about	
 Ā changes	
 Ā to	
 Ā the	
 Ā 
content	
 Ā tree	
 Ā 
Ā§ļ‚§ā€Æ the	
 Ā Editor	
 Ā evaluates	
 Ā the	
 Ā status	
 Ā before	
 Ā and	
 Ā a6er	
 Ā a	
 Ā 
speciļ¬c	
 Ā Oak	
 Ā commit	
 Ā 
Ā§ļ‚§ā€Æ can	
 Ā reject	
 Ā or	
 Ā accept	
 Ā the	
 Ā changes	
 Ā (by	
 Ā even	
 Ā 
modifying	
 Ā the	
 Ā tree	
 Ā itself)	
 Ā 
Ā§ļ‚§ā€Æ an	
 Ā Editor	
 Ā is	
 Ā executed	
 Ā right	
 Ā before	
 Ā an	
 Ā Oak	
 Ā commit	
 Ā 
is	
 Ā persisted	
 Ā 
Ā§ļ‚§ā€Æ the	
 Ā SolrIndexHook	
 Ā maps	
 Ā changes	
 Ā between	
 Ā 
statuses	
 Ā in	
 Ā the	
 Ā content	
 Ā tree	
 Ā to	
 Ā Solr	
 Ā documents	
 Ā 
and	
 Ā sends	
 Ā them	
 Ā to	
 Ā the	
 Ā Solr	
 Ā instance(s)	
 Ā 
IndexEditor API ā€“ creating content
adaptTo() 2013 10
Ā§ļ‚§ā€Æ NodeState	
 Ā before	
 Ā =	
 Ā 	
 Ā builder.getNodeState();	
 Ā 
Ā§ļ‚§ā€Æ builder.child("newnode").setProperty("prop",	
 Ā 
"val");	
 Ā 
Ā§ļ‚§ā€Æ NodeState	
 Ā a6er	
 Ā =	
 Ā builder.getNodeState();	
 Ā 
Ā§ļ‚§ā€Æ EditorHook	
 Ā hook	
 Ā =	
 Ā new	
 Ā EditorHook(new	
 Ā 
SolrIndexEditorProvider(ā€¦));	
 Ā 
Ā§ļ‚§ā€Æ NodeState	
 Ā indexed	
 Ā =	
 Ā 
hook.processCommit(before,	
 Ā a6er);	
 Ā 
QueryIndex API
adaptTo() 2013 11
Ā§ļ‚§ā€Æ evaluate the query (Filter) cost for each
available index to find the ā€œbestā€
Ā§ļ‚§ā€Æ execute the query (Filter) against a specific
revision and root node state
Ā§ļ‚§ā€Æ internally	
 Ā the	
 Ā Filter	
 Ā is	
 Ā usually	
 Ā mapped	
 Ā to	
 Ā the	
 Ā 
underlying	
 Ā implementaNon	
 Ā counterpart	
 Ā 
Ā§ļ‚§ā€Æ improved	
 Ā support	
 Ā for	
 Ā full	
 Ā text	
 Ā queries	
 Ā in	
 Ā Oak	
 Ā 
Ā§ļ‚§ā€Æ eventually view the query ā€œplanā€
QueryIndex API
adaptTo() 2013 12
Ā§ļ‚§ā€Æ mapping Filter restrictions:
Ā§ļ‚§ā€Æ Property restrictions:
Ā§ļ‚§ā€Æ Each	
 Ā property	
 Ā is	
 Ā mapped	
 Ā as	
 Ā a	
 Ā ļ¬eld	
 Ā 
ā€“ā€Æ Can	
 Ā use	
 Ā term	
 Ā queries	
 Ā for	
 Ā simple	
 Ā value	
 Ā matching	
 Ā or	
 Ā range	
 Ā 
queries	
 Ā for	
 Ā ā€œļ¬rst	
 Ā to	
 Ā lastā€	
 Ā 
Ā§ļ‚§ā€Æ Path restrictions
ā€“ā€Æ indexed	
 Ā as	
 Ā strings	
 Ā and	
 Ā with	
 Ā special	
 Ā ļ¬elds	
 Ā for	
 Ā parent	
 Ā /	
 Ā 
children	
 Ā /	
 Ā descendant	
 Ā matching	
 Ā 
Ā§ļ‚§ā€Æ Full text expressions
ā€“ā€Æ use	
 Ā (E)DisMax	
 Ā query	
 Ā parser	
 Ā and/or	
 Ā fallback	
 Ā ļ¬elds	
 Ā 
Ā§ļ‚§ā€Æ NodeType restrictions TBD
Configuring the Solr index in Oak
adaptTo() 2013 13
Ā§ļ‚§ā€Æ create an index configuration under
Ā§ļ‚§ā€Æ /oak:index/solrIdx
Ā§ļ‚§ā€Æ jcr:primaryType	
 Ā =	
 Ā oak:queryIndexDeļ¬niNon	
 Ā 
Ā§ļ‚§ā€Æ type	
 Ā =	
 Ā solr	
 Ā 
ā€“ā€Æ plus	
 Ā some	
 Ā mandatory	
 Ā props	
 Ā (e.g.	
 Ā reindex)	
 Ā 
Ā§ļ‚§ā€Æ AddiNonal	
 Ā properNes	
 Ā if	
 Ā want	
 Ā to	
 Ā run	
 Ā an	
 Ā 
embedded	
 Ā Solr	
 Ā server	
 Ā (more	
 Ā on	
 Ā this	
 Ā later)	
 Ā 
Configuring the Solr index in Oak
adaptTo() 2013 14
Ā§ļ‚§ā€Æ Pluggable Solr server providers and
configuration
Ā§ļ‚§ā€Æ to allow different deployment scenarios
Ā§ļ‚§ā€Æ to allow custom configuration
Oak Solr core bundle
adaptTo() 2013 15
Ā§ļ‚§ā€Æ provides basic API and implementation
to index and search Oak content on Solr
Ā§ļ‚§ā€Æ Solr implementation of IndexEditor
Ā§ļ‚§ā€Æ Solr implementation of QueryIndex
Ā§ļ‚§ā€Æ allows configurable mapping between
Ā§ļ‚§ā€Æ property types and fields
Ā§ļ‚§ā€Æ e.g.	
 Ā all	
 Ā binaries	
 Ā should	
 Ā be	
 Ā indexed	
 Ā in	
 Ā speciļ¬c	
 Ā ļ¬eld	
 Ā 
Ā§ļ‚§ā€Æ filter restrictions and fields
Ā§ļ‚§ā€Æ e.g.	
 Ā path	
 Ā restricNons	
 Ā for	
 Ā children	
 Ā should	
 Ā hit	
 Ā a	
 Ā 
certain	
 Ā ļ¬eld	
 Ā 
Oak Solr Embedded bundle
adaptTo() 2013 16
Ā§ļ‚§ā€Æ provides support for indexing and
searching on an embedded Solr instance
Ā§ļ‚§ā€Æ running inside the Oak repository
Ā§ļ‚§ā€Æ configuration can be done
Ā§ļ‚§ā€Æ via	
 Ā the	
 Ā repository	
 Ā 
ā€“ā€Æ stored	
 Ā in	
 Ā the	
 Ā index	
 Ā deļ¬niNon	
 Ā node	
 Ā 
Ā§ļ‚§ā€Æ via	
 Ā OSGi	
 Ā 
Oak Solr Remote bundle
adaptTo() 2013 17
Ā§ļ‚§ā€Æ provides support for indexing and
searching on remote Solr instances
Ā§ļ‚§ā€Æ single Solr instance
Ā§ļ‚§ā€Æ distributed / replicated Solr cluster
Ā§ļ‚§ā€Æ SolrCloud deployments
Ā§ļ‚§ā€Æ configuration is done via OSGi
OSGi platform running on Oak with Solr
adaptTo() 2013 18
Ā§ļ‚§ā€Æ Star	
 Ā instance	
 Ā with	
 Ā Oak	
 Ā repository	
 Ā 
Ā§ļ‚§ā€Æ Add	
 Ā a	
 Ā bunch	
 Ā of	
 Ā bundles	
 Ā for	
 Ā Solr	
 Ā 
ā€“ā€Æ oak-Ā­ā€solr-Ā­ā€core,	
 Ā oak-Ā­ā€solr-Ā­ā€remote,	
 Ā zookeeper,	
 Ā 
servicemix.bundles.solr-Ā­ā€solrj,	
 Ā etc.	
 Ā 
Ā§ļ‚§ā€Æ Conļ¬gure	
 Ā the	
 Ā Solr	
 Ā instance	
 Ā 
Ā§ļ‚§ā€Æ Conļ¬gure	
 Ā oak-Ā­ā€solr-Ā­ā€remote	
 Ā providers	
 Ā via	
 Ā OSGi	
 Ā 
adaptTo() 2013 19
See it in action ...
Solr index populated with Oak content
adaptTo() 2013 20
What needs to be done
adaptTo() 2013 21
Ā§ļ‚§ā€Æ Easy OSGi deployment
Ā§ļ‚§ā€Æ Move common configuration stuff in
oak-solr-core
Ā§ļ‚§ā€Æ Leverage new full text expression API
Ā§ļ‚§ā€Æ Solr MK?

More Related Content

What's hot

Rapid Prototyping with Solr
Rapid Prototyping with SolrRapid Prototyping with Solr
Rapid Prototyping with Solr
Erik Hatcher
Ā 
What's New in Solr 3.x / 4.0
What's New in Solr 3.x / 4.0What's New in Solr 3.x / 4.0
What's New in Solr 3.x / 4.0
Erik Hatcher
Ā 

What's hot (20)

Scaling Solr with Solr Cloud
Scaling Solr with Solr CloudScaling Solr with Solr Cloud
Scaling Solr with Solr Cloud
Ā 
High Performance Solr
High Performance SolrHigh Performance Solr
High Performance Solr
Ā 
Apache Solr! Enterprise Search Solutions at your Fingertips!
Apache Solr! Enterprise Search Solutions at your Fingertips!Apache Solr! Enterprise Search Solutions at your Fingertips!
Apache Solr! Enterprise Search Solutions at your Fingertips!
Ā 
Rapid Prototyping with Solr
Rapid Prototyping with SolrRapid Prototyping with Solr
Rapid Prototyping with Solr
Ā 
Apache SolrCloud
Apache SolrCloudApache SolrCloud
Apache SolrCloud
Ā 
Rapid Prototyping with Solr
Rapid Prototyping with SolrRapid Prototyping with Solr
Rapid Prototyping with Solr
Ā 
Introduction to Apache Solr
Introduction to Apache SolrIntroduction to Apache Solr
Introduction to Apache Solr
Ā 
Apache Solr - Enterprise search platform
Apache Solr - Enterprise search platformApache Solr - Enterprise search platform
Apache Solr - Enterprise search platform
Ā 
Faster Data Analytics with Apache Spark using Apache Solr - Kiran Chitturi, L...
Faster Data Analytics with Apache Spark using Apache Solr - Kiran Chitturi, L...Faster Data Analytics with Apache Spark using Apache Solr - Kiran Chitturi, L...
Faster Data Analytics with Apache Spark using Apache Solr - Kiran Chitturi, L...
Ā 
Administering and Monitoring SolrCloud Clusters
Administering and Monitoring SolrCloud ClustersAdministering and Monitoring SolrCloud Clusters
Administering and Monitoring SolrCloud Clusters
Ā 
Solr Search Engine: Optimize Is (Not) Bad for You
Solr Search Engine: Optimize Is (Not) Bad for YouSolr Search Engine: Optimize Is (Not) Bad for You
Solr Search Engine: Optimize Is (Not) Bad for You
Ā 
SolrCloud on Hadoop
SolrCloud on HadoopSolrCloud on Hadoop
SolrCloud on Hadoop
Ā 
Solr Recipes
Solr RecipesSolr Recipes
Solr Recipes
Ā 
The First Class Integration of Solr with Hadoop
The First Class Integration of Solr with HadoopThe First Class Integration of Solr with Hadoop
The First Class Integration of Solr with Hadoop
Ā 
Battle of the giants: Apache Solr vs ElasticSearch
Battle of the giants: Apache Solr vs ElasticSearchBattle of the giants: Apache Solr vs ElasticSearch
Battle of the giants: Apache Solr vs ElasticSearch
Ā 
Lucene's Latest (for Libraries)
Lucene's Latest (for Libraries)Lucene's Latest (for Libraries)
Lucene's Latest (for Libraries)
Ā 
Scaling SolrCloud to a Large Number of Collections - Fifth Elephant 2014
Scaling SolrCloud to a Large Number of Collections - Fifth Elephant 2014Scaling SolrCloud to a Large Number of Collections - Fifth Elephant 2014
Scaling SolrCloud to a Large Number of Collections - Fifth Elephant 2014
Ā 
What's New in Solr 3.x / 4.0
What's New in Solr 3.x / 4.0What's New in Solr 3.x / 4.0
What's New in Solr 3.x / 4.0
Ā 
Visualize Solr Data with Banana: Presented by Andrew Thanalertvisuti, Lucidworks
Visualize Solr Data with Banana: Presented by Andrew Thanalertvisuti, LucidworksVisualize Solr Data with Banana: Presented by Andrew Thanalertvisuti, Lucidworks
Visualize Solr Data with Banana: Presented by Andrew Thanalertvisuti, Lucidworks
Ā 
From zero to hero - Easy log centralization with Logstash and Elasticsearch
From zero to hero - Easy log centralization with Logstash and ElasticsearchFrom zero to hero - Easy log centralization with Logstash and Elasticsearch
From zero to hero - Easy log centralization with Logstash and Elasticsearch
Ā 

Similar to Scaling search in Oak with Solr

Battle of the Giants - Apache Solr vs. Elasticsearch (ApacheCon)
Battle of the Giants - Apache Solr vs. Elasticsearch (ApacheCon)Battle of the Giants - Apache Solr vs. Elasticsearch (ApacheCon)
Battle of the Giants - Apache Solr vs. Elasticsearch (ApacheCon)
Sematext Group, Inc.
Ā 
Solräø­å›½8꜈4ę—„ē­”ē–‘äŗ¤ęµv2
Solräø­å›½8꜈4ę—„ē­”ē–‘äŗ¤ęµv2Solräø­å›½8꜈4ę—„ē­”ē–‘äŗ¤ęµv2
Solräø­å›½8꜈4ę—„ē­”ē–‘äŗ¤ęµv2
longkeyy
Ā 
jclouds High Level Overview by Adrian Cole
jclouds High Level Overview by Adrian Colejclouds High Level Overview by Adrian Cole
jclouds High Level Overview by Adrian Cole
Everett Toews
Ā 

Similar to Scaling search in Oak with Solr (20)

BigData Faceted Search Comparison between Apache Solr vs. ElasticSearch
BigData Faceted Search Comparison between Apache Solr vs. ElasticSearchBigData Faceted Search Comparison between Apache Solr vs. ElasticSearch
BigData Faceted Search Comparison between Apache Solr vs. ElasticSearch
Ā 
Building Enterprise Search Engines using Open Source Technologies
Building Enterprise Search Engines using Open Source TechnologiesBuilding Enterprise Search Engines using Open Source Technologies
Building Enterprise Search Engines using Open Source Technologies
Ā 
Building Enterprise Search Engines using Open Source Technologies
Building Enterprise Search Engines using Open Source TechnologiesBuilding Enterprise Search Engines using Open Source Technologies
Building Enterprise Search Engines using Open Source Technologies
Ā 
OpenCms Days 2012 - OpenCms 8.5: Using Apache Solr to retrieve content
OpenCms Days 2012 - OpenCms 8.5: Using Apache Solr to retrieve contentOpenCms Days 2012 - OpenCms 8.5: Using Apache Solr to retrieve content
OpenCms Days 2012 - OpenCms 8.5: Using Apache Solr to retrieve content
Ā 
Solr 8 interview
Solr 8 interview Solr 8 interview
Solr 8 interview
Ā 
Solr Masterclass Bangkok, June 2014
Solr Masterclass Bangkok, June 2014Solr Masterclass Bangkok, June 2014
Solr Masterclass Bangkok, June 2014
Ā 
Battle of the Giants - Apache Solr vs. Elasticsearch (ApacheCon)
Battle of the Giants - Apache Solr vs. Elasticsearch (ApacheCon)Battle of the Giants - Apache Solr vs. Elasticsearch (ApacheCon)
Battle of the Giants - Apache Solr vs. Elasticsearch (ApacheCon)
Ā 
Apache Solr + ajax solr
Apache Solr + ajax solrApache Solr + ajax solr
Apache Solr + ajax solr
Ā 
Rapid Prototyping with Solr
Rapid Prototyping with SolrRapid Prototyping with Solr
Rapid Prototyping with Solr
Ā 
Rapid prototyping with solr - By Erik Hatcher
Rapid prototyping with solr -  By Erik Hatcher Rapid prototyping with solr -  By Erik Hatcher
Rapid prototyping with solr - By Erik Hatcher
Ā 
Small wins in a small time with Apache Solr
Small wins in a small time with Apache SolrSmall wins in a small time with Apache Solr
Small wins in a small time with Apache Solr
Ā 
Solräø­å›½8꜈4ę—„ē­”ē–‘äŗ¤ęµv2
Solräø­å›½8꜈4ę—„ē­”ē–‘äŗ¤ęµv2Solräø­å›½8꜈4ę—„ē­”ē–‘äŗ¤ęµv2
Solräø­å›½8꜈4ę—„ē­”ē–‘äŗ¤ęµv2
Ā 
Cloudera search
Cloudera searchCloudera search
Cloudera search
Ā 
Introduction to Apache solr
Introduction to Apache solrIntroduction to Apache solr
Introduction to Apache solr
Ā 
jclouds High Level Overview by Adrian Cole
jclouds High Level Overview by Adrian Colejclouds High Level Overview by Adrian Cole
jclouds High Level Overview by Adrian Cole
Ā 
New-Age Search through Apache Solr
New-Age Search through Apache SolrNew-Age Search through Apache Solr
New-Age Search through Apache Solr
Ā 
Solr search engine with multiple table relation
Solr search engine with multiple table relationSolr search engine with multiple table relation
Solr search engine with multiple table relation
Ā 
Search Engine Building with Lucene and Solr (So Code Camp San Diego 2014)
Search Engine Building with Lucene and Solr (So Code Camp San Diego 2014)Search Engine Building with Lucene and Solr (So Code Camp San Diego 2014)
Search Engine Building with Lucene and Solr (So Code Camp San Diego 2014)
Ā 
Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...
Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...
Deep Dive: Alfresco Core Repository (... embedded in a micro-services style a...
Ā 
Introduction to Elasticsearch with basics of Lucene
Introduction to Elasticsearch with basics of LuceneIntroduction to Elasticsearch with basics of Lucene
Introduction to Elasticsearch with basics of Lucene
Ā 

More from Tommaso Teofili

Search engines in the industry
Search engines in the industrySearch engines in the industry
Search engines in the industry
Tommaso Teofili
Ā 
Text categorization with Lucene and Solr
Text categorization with Lucene and SolrText categorization with Lucene and Solr
Text categorization with Lucene and Solr
Tommaso Teofili
Ā 
Machine learning with Apache Hama
Machine learning with Apache HamaMachine learning with Apache Hama
Machine learning with Apache Hama
Tommaso Teofili
Ā 
Apache Solr crash course
Apache Solr crash courseApache Solr crash course
Apache Solr crash course
Tommaso Teofili
Ā 

More from Tommaso Teofili (16)

Affect Enriched Word Embeddings for News IR
Affect Enriched Word Embeddings for News IRAffect Enriched Word Embeddings for News IR
Affect Enriched Word Embeddings for News IR
Ā 
Data replication in Sling
Data replication in SlingData replication in Sling
Data replication in Sling
Ā 
Search engines in the industry
Search engines in the industrySearch engines in the industry
Search engines in the industry
Ā 
Text categorization with Lucene and Solr
Text categorization with Lucene and SolrText categorization with Lucene and Solr
Text categorization with Lucene and Solr
Ā 
Machine learning with Apache Hama
Machine learning with Apache HamaMachine learning with Apache Hama
Machine learning with Apache Hama
Ā 
Adapting Apache UIMA to OSGi
Adapting Apache UIMA to OSGiAdapting Apache UIMA to OSGi
Adapting Apache UIMA to OSGi
Ā 
Domeo, Text Mining, UIMA and Clerezza
Domeo, Text Mining, UIMA and ClerezzaDomeo, Text Mining, UIMA and Clerezza
Domeo, Text Mining, UIMA and Clerezza
Ā 
Natural Language Search in Solr
Natural Language Search in SolrNatural Language Search in Solr
Natural Language Search in Solr
Ā 
Apache Solr crash course
Apache Solr crash courseApache Solr crash course
Apache Solr crash course
Ā 
Apache UIMA - Hands on code
Apache UIMA - Hands on codeApache UIMA - Hands on code
Apache UIMA - Hands on code
Ā 
Apache UIMA Introduction
Apache UIMA IntroductionApache UIMA Introduction
Apache UIMA Introduction
Ā 
OSS Enterprise Search EU Tour
OSS Enterprise Search EU TourOSS Enterprise Search EU Tour
OSS Enterprise Search EU Tour
Ā 
Information Extraction with UIMA - Usecases
Information Extraction with UIMA - UsecasesInformation Extraction with UIMA - Usecases
Information Extraction with UIMA - Usecases
Ā 
Apache UIMA and Metadata Generation
Apache UIMA and Metadata GenerationApache UIMA and Metadata Generation
Apache UIMA and Metadata Generation
Ā 
Data and Information Extraction on the Web
Data and Information Extraction on the WebData and Information Extraction on the Web
Data and Information Extraction on the Web
Ā 
Apache UIMA and Semantic Search
Apache UIMA and Semantic SearchApache UIMA and Semantic Search
Apache UIMA and Semantic Search
Ā 

Recently uploaded

šŸ’•šŸ“²09602870969šŸ’“Girl Escort Services Udaipur Call Girls in Chittorgarh Haldighati
šŸ’•šŸ“²09602870969šŸ’“Girl Escort Services Udaipur Call Girls in Chittorgarh HaldighatišŸ’•šŸ“²09602870969šŸ’“Girl Escort Services Udaipur Call Girls in Chittorgarh Haldighati
šŸ’•šŸ“²09602870969šŸ’“Girl Escort Services Udaipur Call Girls in Chittorgarh Haldighati
Apsara Of India
Ā 
Sample sample sample sample sample sample
Sample sample sample sample sample sampleSample sample sample sample sample sample
Sample sample sample sample sample sample
Casey Keith
Ā 
IATA GEOGRAPHY AREAS in the world, HM111
IATA GEOGRAPHY AREAS in the world, HM111IATA GEOGRAPHY AREAS in the world, HM111
IATA GEOGRAPHY AREAS in the world, HM111
2022472524
Ā 
sample sample sample sample sample sample
sample sample sample sample sample samplesample sample sample sample sample sample
sample sample sample sample sample sample
Casey Keith
Ā 

Recently uploaded (20)

Hire šŸ’• 8617697112 Champawat Call Girls Service Call Girls Agency
Hire šŸ’• 8617697112 Champawat Call Girls Service Call Girls AgencyHire šŸ’• 8617697112 Champawat Call Girls Service Call Girls Agency
Hire šŸ’• 8617697112 Champawat Call Girls Service Call Girls Agency
Ā 
šŸ’•šŸ“²09602870969šŸ’“Girl Escort Services Udaipur Call Girls in Chittorgarh Haldighati
šŸ’•šŸ“²09602870969šŸ’“Girl Escort Services Udaipur Call Girls in Chittorgarh HaldighatišŸ’•šŸ“²09602870969šŸ’“Girl Escort Services Udaipur Call Girls in Chittorgarh Haldighati
šŸ’•šŸ“²09602870969šŸ’“Girl Escort Services Udaipur Call Girls in Chittorgarh Haldighati
Ā 
Mathura Call Girls 8250077686 Service Offer VIP Hot Model
Mathura Call Girls 8250077686 Service Offer VIP Hot ModelMathura Call Girls 8250077686 Service Offer VIP Hot Model
Mathura Call Girls 8250077686 Service Offer VIP Hot Model
Ā 
Bhubaneswar Call Girls 8250077686 Service Offer VIP Hot Model
Bhubaneswar Call Girls 8250077686 Service Offer VIP Hot ModelBhubaneswar Call Girls 8250077686 Service Offer VIP Hot Model
Bhubaneswar Call Girls 8250077686 Service Offer VIP Hot Model
Ā 
ITALY - Visa Options for expats and digital nomads
ITALY - Visa Options for expats and digital nomadsITALY - Visa Options for expats and digital nomads
ITALY - Visa Options for expats and digital nomads
Ā 
Elevate Your Busy Season Email Marketing, Holly May Webinar.pptx
Elevate Your Busy Season Email Marketing, Holly May Webinar.pptxElevate Your Busy Season Email Marketing, Holly May Webinar.pptx
Elevate Your Busy Season Email Marketing, Holly May Webinar.pptx
Ā 
Kurnool Call Girls šŸ„° 8617370543 Service Offer VIP Hot Model
Kurnool Call Girls šŸ„° 8617370543 Service Offer VIP Hot ModelKurnool Call Girls šŸ„° 8617370543 Service Offer VIP Hot Model
Kurnool Call Girls šŸ„° 8617370543 Service Offer VIP Hot Model
Ā 
VIP Vapi Call Girls šŸ“ž 8617697112 Vapi Call Girls
VIP Vapi Call Girls šŸ“ž 8617697112 Vapi Call GirlsVIP Vapi Call Girls šŸ“ž 8617697112 Vapi Call Girls
VIP Vapi Call Girls šŸ“ž 8617697112 Vapi Call Girls
Ā 
Sample sample sample sample sample sample
Sample sample sample sample sample sampleSample sample sample sample sample sample
Sample sample sample sample sample sample
Ā 
Hire 8617697112 Call Girls Udhampur For an Amazing Night
Hire 8617697112 Call Girls Udhampur For an Amazing NightHire 8617697112 Call Girls Udhampur For an Amazing Night
Hire 8617697112 Call Girls Udhampur For an Amazing Night
Ā 
WhatsApp Chat: šŸ“ž 8617697112 Independent Call Girls in Darjeeling
WhatsApp Chat: šŸ“ž 8617697112 Independent Call Girls in DarjeelingWhatsApp Chat: šŸ“ž 8617697112 Independent Call Girls in Darjeeling
WhatsApp Chat: šŸ“ž 8617697112 Independent Call Girls in Darjeeling
Ā 
Ooty Call Girls 8250077686 Service Offer VIP Hot Model
Ooty Call Girls 8250077686 Service Offer VIP Hot ModelOoty Call Girls 8250077686 Service Offer VIP Hot Model
Ooty Call Girls 8250077686 Service Offer VIP Hot Model
Ā 
IATA GEOGRAPHY AREAS in the world, HM111
IATA GEOGRAPHY AREAS in the world, HM111IATA GEOGRAPHY AREAS in the world, HM111
IATA GEOGRAPHY AREAS in the world, HM111
Ā 
Night 7k to 12k Lahaul and Spiti Call Girls šŸ‘‰šŸ‘‰ 8617697112ā­ā­ 100% Genuine Esco...
Night 7k to 12k Lahaul and Spiti Call Girls šŸ‘‰šŸ‘‰ 8617697112ā­ā­ 100% Genuine Esco...Night 7k to 12k Lahaul and Spiti Call Girls šŸ‘‰šŸ‘‰ 8617697112ā­ā­ 100% Genuine Esco...
Night 7k to 12k Lahaul and Spiti Call Girls šŸ‘‰šŸ‘‰ 8617697112ā­ā­ 100% Genuine Esco...
Ā 
Discover Mathura And Vrindavan A Spritual Journey.pdf
Discover Mathura And Vrindavan A Spritual Journey.pdfDiscover Mathura And Vrindavan A Spritual Journey.pdf
Discover Mathura And Vrindavan A Spritual Journey.pdf
Ā 
Call Girls Jaisalmer Just Call 8617370543 Top Class Call Girl Service Available
Call Girls Jaisalmer Just Call 8617370543 Top Class Call Girl Service AvailableCall Girls Jaisalmer Just Call 8617370543 Top Class Call Girl Service Available
Call Girls Jaisalmer Just Call 8617370543 Top Class Call Girl Service Available
Ā 
ā¤Personal Contact Number Mcleodganj Call Girls 8617697112šŸ’¦āœ….
ā¤Personal Contact Number Mcleodganj Call Girls 8617697112šŸ’¦āœ….ā¤Personal Contact Number Mcleodganj Call Girls 8617697112šŸ’¦āœ….
ā¤Personal Contact Number Mcleodganj Call Girls 8617697112šŸ’¦āœ….
Ā 
Tamluk ā¤CALL GIRL 8617697112 ā¤CALL GIRLS IN Tamluk ESCORT SERVICEā¤CALL GIRL
Tamluk ā¤CALL GIRL 8617697112 ā¤CALL GIRLS IN Tamluk ESCORT SERVICEā¤CALL GIRLTamluk ā¤CALL GIRL 8617697112 ā¤CALL GIRLS IN Tamluk ESCORT SERVICEā¤CALL GIRL
Tamluk ā¤CALL GIRL 8617697112 ā¤CALL GIRLS IN Tamluk ESCORT SERVICEā¤CALL GIRL
Ā 
Hire šŸ’• 8617697112 Surat Call Girls Service Call Girls Agency
Hire šŸ’• 8617697112 Surat Call Girls Service Call Girls AgencyHire šŸ’• 8617697112 Surat Call Girls Service Call Girls Agency
Hire šŸ’• 8617697112 Surat Call Girls Service Call Girls Agency
Ā 
sample sample sample sample sample sample
sample sample sample sample sample samplesample sample sample sample sample sample
sample sample sample sample sample sample
Ā 

Scaling search in Oak with Solr

  • 1. APACHE SLING & FRIENDS TECH MEETUP BERLIN, 23-25 SEPTEMBER 2013 Scaling Search in Oak with Solr Tommaso Teofili
  • 2. adaptTo() 2013 2 A look back ...
  • 3. Scaling Search in Oak with Solr adaptTo() 2013 3 Ā§ļ‚§ā€Æ Following up last yearā€™s ā€œOak / Solr integrationā€ session
  • 4. Looking at last yearā€™s agenda adaptTo() 2013 4 Ā§ļ‚§ā€Æ What we have: Ā§ļ‚§ā€Æ Search Oak content with Solr independently Ā§ļ‚§ā€Æ Oak running with a Solr index Ā§ļ‚§ā€Æ Embedded Ā  Ā  Ā§ļ‚§ā€Æ Remote Ā  Ā§ļ‚§ā€Æ What we miss: Ā§ļ‚§ā€Æ Solr based MicroKernel
  • 5. Apache Jackrabbit Oak adaptTo() 2013 5 Ā§ļ‚§ā€Æ Scalable content repository Ā§ļ‚§ā€Æ JCR compatibility (to some degree) Ā§ļ‚§ā€Æ Performance especially for concurrent access Ā§ļ‚§ā€Æ Scalability for huge repositories (> 100M nodes) Ā§ļ‚§ā€Æ Support managed environments (e.g. OSGi) Ā§ļ‚§ā€Æ Cloud deployments
  • 6. Apache Solr adaptTo() 2013 6 Ā§ļ‚§ā€Æ Enterprise search platform Ā§ļ‚§ā€Æ Based on Apache Lucene Ā§ļ‚§ā€Æ Full text, faceting, highlighting, etc. Ā§ļ‚§ā€Æ Dynamic cluster architecture Ā§ļ‚§ā€Æ HTTP API Ā§ļ‚§ā€Æ Latest release 4.4.0
  • 7. Why Apache Solr adaptTo() 2013 7 Ā§ļ‚§ā€Æ Distributed, fault tolerant indexing / searching Ā§ļ‚§ā€Æ Highly configurable Ā§ļ‚§ā€Æ without touching the repository Ā§ļ‚§ā€Æ Customizable
  • 8. adaptTo() 2013 8 How it works ...
  • 9. IndexEditor API adaptTo() 2013 9 Ā§ļ‚§ā€Æ an Ā Editor Ā receives Ā info Ā about Ā changes Ā to Ā the Ā  content Ā tree Ā  Ā§ļ‚§ā€Æ the Ā Editor Ā evaluates Ā the Ā status Ā before Ā and Ā a6er Ā a Ā  speciļ¬c Ā Oak Ā commit Ā  Ā§ļ‚§ā€Æ can Ā reject Ā or Ā accept Ā the Ā changes Ā (by Ā even Ā  modifying Ā the Ā tree Ā itself) Ā  Ā§ļ‚§ā€Æ an Ā Editor Ā is Ā executed Ā right Ā before Ā an Ā Oak Ā commit Ā  is Ā persisted Ā  Ā§ļ‚§ā€Æ the Ā SolrIndexHook Ā maps Ā changes Ā between Ā  statuses Ā in Ā the Ā content Ā tree Ā to Ā Solr Ā documents Ā  and Ā sends Ā them Ā to Ā the Ā Solr Ā instance(s) Ā 
  • 10. IndexEditor API ā€“ creating content adaptTo() 2013 10 Ā§ļ‚§ā€Æ NodeState Ā before Ā = Ā  Ā builder.getNodeState(); Ā  Ā§ļ‚§ā€Æ builder.child("newnode").setProperty("prop", Ā  "val"); Ā  Ā§ļ‚§ā€Æ NodeState Ā a6er Ā = Ā builder.getNodeState(); Ā  Ā§ļ‚§ā€Æ EditorHook Ā hook Ā = Ā new Ā EditorHook(new Ā  SolrIndexEditorProvider(ā€¦)); Ā  Ā§ļ‚§ā€Æ NodeState Ā indexed Ā = Ā  hook.processCommit(before, Ā a6er); Ā 
  • 11. QueryIndex API adaptTo() 2013 11 Ā§ļ‚§ā€Æ evaluate the query (Filter) cost for each available index to find the ā€œbestā€ Ā§ļ‚§ā€Æ execute the query (Filter) against a specific revision and root node state Ā§ļ‚§ā€Æ internally Ā the Ā Filter Ā is Ā usually Ā mapped Ā to Ā the Ā  underlying Ā implementaNon Ā counterpart Ā  Ā§ļ‚§ā€Æ improved Ā support Ā for Ā full Ā text Ā queries Ā in Ā Oak Ā  Ā§ļ‚§ā€Æ eventually view the query ā€œplanā€
  • 12. QueryIndex API adaptTo() 2013 12 Ā§ļ‚§ā€Æ mapping Filter restrictions: Ā§ļ‚§ā€Æ Property restrictions: Ā§ļ‚§ā€Æ Each Ā property Ā is Ā mapped Ā as Ā a Ā ļ¬eld Ā  ā€“ā€Æ Can Ā use Ā term Ā queries Ā for Ā simple Ā value Ā matching Ā or Ā range Ā  queries Ā for Ā ā€œļ¬rst Ā to Ā lastā€ Ā  Ā§ļ‚§ā€Æ Path restrictions ā€“ā€Æ indexed Ā as Ā strings Ā and Ā with Ā special Ā ļ¬elds Ā for Ā parent Ā / Ā  children Ā / Ā descendant Ā matching Ā  Ā§ļ‚§ā€Æ Full text expressions ā€“ā€Æ use Ā (E)DisMax Ā query Ā parser Ā and/or Ā fallback Ā ļ¬elds Ā  Ā§ļ‚§ā€Æ NodeType restrictions TBD
  • 13. Configuring the Solr index in Oak adaptTo() 2013 13 Ā§ļ‚§ā€Æ create an index configuration under Ā§ļ‚§ā€Æ /oak:index/solrIdx Ā§ļ‚§ā€Æ jcr:primaryType Ā = Ā oak:queryIndexDeļ¬niNon Ā  Ā§ļ‚§ā€Æ type Ā = Ā solr Ā  ā€“ā€Æ plus Ā some Ā mandatory Ā props Ā (e.g. Ā reindex) Ā  Ā§ļ‚§ā€Æ AddiNonal Ā properNes Ā if Ā want Ā to Ā run Ā an Ā  embedded Ā Solr Ā server Ā (more Ā on Ā this Ā later) Ā 
  • 14. Configuring the Solr index in Oak adaptTo() 2013 14 Ā§ļ‚§ā€Æ Pluggable Solr server providers and configuration Ā§ļ‚§ā€Æ to allow different deployment scenarios Ā§ļ‚§ā€Æ to allow custom configuration
  • 15. Oak Solr core bundle adaptTo() 2013 15 Ā§ļ‚§ā€Æ provides basic API and implementation to index and search Oak content on Solr Ā§ļ‚§ā€Æ Solr implementation of IndexEditor Ā§ļ‚§ā€Æ Solr implementation of QueryIndex Ā§ļ‚§ā€Æ allows configurable mapping between Ā§ļ‚§ā€Æ property types and fields Ā§ļ‚§ā€Æ e.g. Ā all Ā binaries Ā should Ā be Ā indexed Ā in Ā speciļ¬c Ā ļ¬eld Ā  Ā§ļ‚§ā€Æ filter restrictions and fields Ā§ļ‚§ā€Æ e.g. Ā path Ā restricNons Ā for Ā children Ā should Ā hit Ā a Ā  certain Ā ļ¬eld Ā 
  • 16. Oak Solr Embedded bundle adaptTo() 2013 16 Ā§ļ‚§ā€Æ provides support for indexing and searching on an embedded Solr instance Ā§ļ‚§ā€Æ running inside the Oak repository Ā§ļ‚§ā€Æ configuration can be done Ā§ļ‚§ā€Æ via Ā the Ā repository Ā  ā€“ā€Æ stored Ā in Ā the Ā index Ā deļ¬niNon Ā node Ā  Ā§ļ‚§ā€Æ via Ā OSGi Ā 
  • 17. Oak Solr Remote bundle adaptTo() 2013 17 Ā§ļ‚§ā€Æ provides support for indexing and searching on remote Solr instances Ā§ļ‚§ā€Æ single Solr instance Ā§ļ‚§ā€Æ distributed / replicated Solr cluster Ā§ļ‚§ā€Æ SolrCloud deployments Ā§ļ‚§ā€Æ configuration is done via OSGi
  • 18. OSGi platform running on Oak with Solr adaptTo() 2013 18 Ā§ļ‚§ā€Æ Star Ā instance Ā with Ā Oak Ā repository Ā  Ā§ļ‚§ā€Æ Add Ā a Ā bunch Ā of Ā bundles Ā for Ā Solr Ā  ā€“ā€Æ oak-Ā­ā€solr-Ā­ā€core, Ā oak-Ā­ā€solr-Ā­ā€remote, Ā zookeeper, Ā  servicemix.bundles.solr-Ā­ā€solrj, Ā etc. Ā  Ā§ļ‚§ā€Æ Conļ¬gure Ā the Ā Solr Ā instance Ā  Ā§ļ‚§ā€Æ Conļ¬gure Ā oak-Ā­ā€solr-Ā­ā€remote Ā providers Ā via Ā OSGi Ā 
  • 19. adaptTo() 2013 19 See it in action ...
  • 20. Solr index populated with Oak content adaptTo() 2013 20
  • 21. What needs to be done adaptTo() 2013 21 Ā§ļ‚§ā€Æ Easy OSGi deployment Ā§ļ‚§ā€Æ Move common configuration stuff in oak-solr-core Ā§ļ‚§ā€Æ Leverage new full text expression API Ā§ļ‚§ā€Æ Solr MK?