SlideShare uma empresa Scribd logo
1 de 21
Baixar para ler 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?

Mais conteĂșdo relacionado

Mais procurados

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
 

Mais procurados (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
 

Semelhante a 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
 

Semelhante a 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
 

Mais de 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
 

Mais de 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
 

Último

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
 
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
 
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
 
saputara Escort💋 Call Girl (Ramya) Service #saputara Call Girl @Independent G...
saputara Escort💋 Call Girl (Ramya) Service #saputara Call Girl @Independent G...saputara Escort💋 Call Girl (Ramya) Service #saputara Call Girl @Independent G...
saputara Escort💋 Call Girl (Ramya) Service #saputara Call Girl @Independent G...
mountabuangels4u
 

Último (20)

Raiganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Raiganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot ModelRaiganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Raiganj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
 
Pithoragarh Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Pithoragarh Call Girls đŸ„° 8617370543 Service Offer VIP Hot ModelPithoragarh Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Pithoragarh Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
 
Sample sample sample sample sample sample
Sample sample sample sample sample sampleSample sample sample sample sample sample
Sample sample sample sample sample sample
 
Siliguri Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Siliguri Call Girls đŸ„° 8617370543 Service Offer VIP Hot ModelSiliguri Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Siliguri Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
 
Prayagraj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Prayagraj Call Girls đŸ„° 8617370543 Service Offer VIP Hot ModelPrayagraj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Prayagraj Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
 
Sample sample sample sample sample sample
Sample sample sample sample sample sampleSample sample sample sample sample sample
Sample sample sample sample sample sample
 
Roorkee Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Roorkee Call Girls đŸ„° 8617370543 Service Offer VIP Hot ModelRoorkee Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Roorkee Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
 
Howrah Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Howrah Call Girls đŸ„° 8617370543 Service Offer VIP Hot ModelHowrah Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Howrah Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
 
abortion pills in Riyadh+966572737505 Cytotec Riyadh
abortion pills in  Riyadh+966572737505    Cytotec Riyadhabortion pills in  Riyadh+966572737505    Cytotec Riyadh
abortion pills in Riyadh+966572737505 Cytotec Riyadh
 
sample sample sample sample sample sample
sample sample sample sample sample samplesample sample sample sample sample sample
sample sample sample sample sample sample
 
Nainital Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Nainital Call Girls đŸ„° 8617370543 Service Offer VIP Hot ModelNainital Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Nainital Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
 
Alipurduar Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Alipurduar Call Girls đŸ„° 8617370543 Service Offer VIP Hot ModelAlipurduar Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Alipurduar Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
 
Rudrapur Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Rudrapur Call Girls đŸ„° 8617370543 Service Offer VIP Hot ModelRudrapur Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Rudrapur Call Girls đŸ„° 8617370543 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
 
Top places to visit, top tourist destinations
Top places to visit, top tourist destinationsTop places to visit, top tourist destinations
Top places to visit, top tourist destinations
 
Kashipur Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Kashipur Call Girls đŸ„° 8617370543 Service Offer VIP Hot ModelKashipur Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
Kashipur Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
 
saputara Escort💋 Call Girl (Ramya) Service #saputara Call Girl @Independent G...
saputara Escort💋 Call Girl (Ramya) Service #saputara Call Girl @Independent G...saputara Escort💋 Call Girl (Ramya) Service #saputara Call Girl @Independent G...
saputara Escort💋 Call Girl (Ramya) Service #saputara Call Girl @Independent G...
 
Overview of Lesotho 's natural beauty tourist attractions
Overview of Lesotho 's natural beauty tourist attractionsOverview of Lesotho 's natural beauty tourist attractions
Overview of Lesotho 's natural beauty tourist attractions
 
Daman Escorts đŸ„° 8617370543 Call Girls Offer VIP Hot Girls
Daman Escorts đŸ„° 8617370543 Call Girls Offer VIP Hot GirlsDaman Escorts đŸ„° 8617370543 Call Girls Offer VIP Hot Girls
Daman Escorts đŸ„° 8617370543 Call Girls Offer VIP Hot Girls
 
South Goa Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
South Goa Call Girls đŸ„° 8617370543 Service Offer VIP Hot ModelSouth Goa Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
South Goa Call Girls đŸ„° 8617370543 Service Offer VIP Hot Model
 

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?