SlideShare ist ein Scribd-Unternehmen logo
1 von 38
Downloaden Sie, um offline zu lesen
NOVEMBER 7, 2013
RAMP UP YOUR WEB EXPERIENCES USING
DRUPAL AND APACHE SOLR
peter.wolanin@acquia.com
drupal.org/user/49851 (pwolanin)

Peter Wolanin
Momentum Specialist @ Acquia, Inc.
My Agenda
Expose you to Drupal as a free enterprise CMS / WAF
Describe some of the advantages that come from a large
innovative pool of contributors
Explain how Drupal enables you to immediately use key
Apache Solr features without investing in development
Have you leave here convinced that you should consider
using Drupal with Apache Solr for your next project so that
you can deliver a better and more engaging site faster
3
Overview of Content
Why are organizations standardizing on Drupal?
Drupal integration with Apache Solr
Integrated content indexing
Automatic generation of facets
UI configuration of search
Easy extensibility of Drupal/Solr integration code

4
Inside Many Large
Organizations,
the Web Is Broken

5
Standardize on Drupal As Platform

Market Presence !
Global Adoption! ! !
Massively Extensible
Broad Community ! !

!
!
!
!

1,500,000+ sites
228 countries
16,000+ modules
1,000,000+ members

Active Development! ! 17,000+ developers
6
Drupal Delivers Rich, Integrated Experiences
Microsite

Intranet

•
•
•
•

Open, flexible architecture
Build a wide range of sites
Repeatable deployment patterns
Enables effective shared
services model between IT &
marketing

Corp-com
site

7

Main
Website

Microsite

Product
Site

Community
Platform

Main
Website
A Truly Agile Platform

February
2012

Pinterest hits
10M unique visitors

March
2012

New Drupal module
created for site usersʼ
“pinned” images
8

April
2012

15 Drupal sites go live
with Pinterest integration
Apache Solr Integration with Drupal
Five years of
integration
At least 20,000
sites using Solr
Active community
of contributors

9
Solr Integration Challenges Are Already Solved
The most important - content indexing
Facets, sorting, and highlighting
Integrated with More Like This and spell-check
Optionally enable content access permissions by indexing
documents with data and filtering Solr results based on
the current user
Works with Solr 1.4.x, 3.5.x, 3.6.x, 4.x

10
Drupal Entities are Content + Data
Nodes are the basic content entity
The entity system is extensible can represent any data
Examples of data stored within
Drupal entities
‣
‣
‣

Node 1 Node 2 Node 3

Node 4 Node 5 Node 6

Text

Node 7 Node 8 Node 9

Geographic location
Node reference

11
Dynamic Content (Node) Types Enriched with
Dynamic Data Fields
Site builders can define as many content types as needed
in the UI
Each content type can have many associated data fields defined in the UI and with configurable rendering
Data fields from content can be re-used across the site in listing, cross-referencing, and recombination

12
13
Module Has a Pipeline for Indexing Drupal
Content to Solr
Drupal entities are processed into one (or more)
document objects
Each document is converted to XML and sent to Solr.
Document object
Node object
XML string
title
nid
type

entity_type
label
entity_id
bundle

Drupal
callbacks & hooks

14

<doc>
<field
<field
<field
<field
</doc>

name="entity_type">node</field>
name="label">Hello Drupal</field>
name="entity_id">101</field>
name="bundle">session</field>
15
Dynamic Data Needs Dynamic Schema Fields
Dyanimc content types and their data fields are defined in
the UI without writing code
Since the data structure is user-defined, data fields are
mapped into dynamic schema fields
Non-default mapping can be added in code
A standard module-provided schema.xml and
solrconfig.xml minimizes setup and maintenance

16
<!-- Regular text (without processing) can be stored in a string field-->
<dynamicField name="ss_*" type="string" indexed="true"
stored="true" multiValued="false"/>
<dynamicField name="sm_*" type="string" indexed="true"
stored="true" multiValued="true"/>
<!-- Normal text fields are for full text - the relevance of a match
depends on the length of the text -->
<dynamicField name="ts_*" type="text"
indexed="true"
stored="true" multiValued="false" termVectors="true"/>
<dynamicField name="tm_*" type="text"
indexed="true"
stored="true" multiValued="true" termVectors="true"/>
<!-- These text fields omit norms - useful for extracted text like taxonomy_names
-->
<dynamicField name="tos_*" type="text"
indexed="true"
stored="true" multiValued="false" termVectors="true" omitNorms="true"/>
<dynamicField name="tom_*" type="text"
indexed="true"
stored="true" multiValued="true" termVectors="true" omitNorms="true"/>

17
Entity Metadata Gives Automatic Facets"
Content types
Taxonomy terms per field
Content authors
Posted and modified dates
Text and numbers selected via select
list/radios/check boxes

18
Enable the Modules

19
20
21
22
23
24
25
26
27
28
Fully Built Search Pages and Facets"
The Drupal integration allows you to build search pages
(including custom filtering) and facets with no coding
Tune boosts, change query fields, and apply other
configuration per “environment” (one or more search
pages reference each environment)
If you need deeper control, you can easily write code to
change the interaction with Solr, or write custom searches

29
Drupal Modules Implement hooks to Modify
Indexing and Display
HOOK_apachesolr_index_document_build($document,
$entity, $entity_type, $env_id)
By creating a Drupal module (in PHP), you can implement
module and theme “hooks” to extend or alter Drupal
behavior.
Change or replace the data normally indexed.
Modify the search results and their appearance.
30
A Query Object Is Used to Prepare and Run
Searches
HOOK_apachesolr_query_prepare($query)
$query->setParam('hl.fl', $field);
$keys = $query->getParam('q');
$response = $query->search();

31
Two Hooks For Changing the Query?
HOOK_apachesolr_query_prepare()
‣
‣

Invoked before $query is statically cached.
Add or remove sorting options visible to the user.

HOOK_apachesolr_query_alter()
‣
‣
‣

Invoked after $query is statically cached.
Useful for applying operations the user shouldnʼt have the ability to alter.
For example, node access filters.

32
Example: Poor Manʼs “Entity” Extraction"
Erik Hatcher recently showed how to extract values in
Solr using keep words and regular expressions (Solr 4.4+)
http://searchhub.org/2013/06/27/poor-mans-entityextraction-with-solr/
By shifting this work to a Drupal module, I can make it
easy to configure and deploy for an existing site.
module code:
https://drupal.org/sandbox/pwolanin/2129005
33
Adding A New Field With Matched Strings
/**
* Implements hook_apachesolr_index_document_build_node().
*/
function apachesolr_key_phrases_apachesolr_index_document_build_node
($document, $entity, $env_id) {
$key_phrases = variable_get('key_phrases', array());
if ($key_phrases && $document->content) {
foreach ($key_phrases as $phrase) {
if (stripos($document->content, $phrase) !== FALSE) {
$document->addField('sm_key_phrases', $phrase);
}
}
}
}

34
35
Adding A New Facet For Matched Strings
/**
* Implements hook_facetapi_facet_info().
*/
function apachesolr_key_phrases_facetapi_facet_info($searcher_info) {
$facets = array();
if ('apachesolr' == $searcher_info['adapter']) {
$facets['sm_key_phrases'] = array(
'label' => t('Key phrases'),
'description' => t('Filter by key phrases.'),
);
}
return $facets;
}

36
37
To Wrap Up
Drupal has extensive Apache Solr integration, and is
highly customizable
The Drupal platform is widely adopted, and the Drupal
community drives rapid innovation
Acquia provides Enterprise Drupal support and a network
of partners
Acquia includes a secure, hosted Solr index with every
support subscription
38

Weitere ähnliche Inhalte

Was ist angesagt?

Mondrian update (Pentaho community meetup 2012, Amsterdam)
Mondrian update (Pentaho community meetup 2012, Amsterdam)Mondrian update (Pentaho community meetup 2012, Amsterdam)
Mondrian update (Pentaho community meetup 2012, Amsterdam)Julian Hyde
 
Eclipse JNoSQL: The Definitive Solution for Java and NoSQL Database
Eclipse JNoSQL: The Definitive Solution for Java and NoSQL DatabaseEclipse JNoSQL: The Definitive Solution for Java and NoSQL Database
Eclipse JNoSQL: The Definitive Solution for Java and NoSQL DatabaseOtávio Santana
 
Deep dive into the native multi model database ArangoDB
Deep dive into the native multi model database ArangoDBDeep dive into the native multi model database ArangoDB
Deep dive into the native multi model database ArangoDBArangoDB Database
 
CouchDB at New York PHP
CouchDB at New York PHPCouchDB at New York PHP
CouchDB at New York PHPBradley Holt
 
MySQL 8.0 Introduction to NoSQL + SQL
MySQL 8.0 Introduction to NoSQL + SQLMySQL 8.0 Introduction to NoSQL + SQL
MySQL 8.0 Introduction to NoSQL + SQLManuel Contreras
 

Was ist angesagt? (6)

Mondrian update (Pentaho community meetup 2012, Amsterdam)
Mondrian update (Pentaho community meetup 2012, Amsterdam)Mondrian update (Pentaho community meetup 2012, Amsterdam)
Mondrian update (Pentaho community meetup 2012, Amsterdam)
 
Eclipse JNoSQL: The Definitive Solution for Java and NoSQL Database
Eclipse JNoSQL: The Definitive Solution for Java and NoSQL DatabaseEclipse JNoSQL: The Definitive Solution for Java and NoSQL Database
Eclipse JNoSQL: The Definitive Solution for Java and NoSQL Database
 
Deep dive into the native multi model database ArangoDB
Deep dive into the native multi model database ArangoDBDeep dive into the native multi model database ArangoDB
Deep dive into the native multi model database ArangoDB
 
ASP.NET Lecture 4
ASP.NET Lecture 4ASP.NET Lecture 4
ASP.NET Lecture 4
 
CouchDB at New York PHP
CouchDB at New York PHPCouchDB at New York PHP
CouchDB at New York PHP
 
MySQL 8.0 Introduction to NoSQL + SQL
MySQL 8.0 Introduction to NoSQL + SQLMySQL 8.0 Introduction to NoSQL + SQL
MySQL 8.0 Introduction to NoSQL + SQL
 

Andere mochten auch

Aria a11ycamp-bay-2015
Aria a11ycamp-bay-2015Aria a11ycamp-bay-2015
Aria a11ycamp-bay-2015Dylan Barrell
 
NDS Employment Conference
NDS Employment ConferenceNDS Employment Conference
NDS Employment ConferenceAccess iQ
 
Reaching Corporate Australia with a Business Case
Reaching Corporate Australia with a Business CaseReaching Corporate Australia with a Business Case
Reaching Corporate Australia with a Business CaseAccess iQ
 
Creating dynamic and accessible content in Drupal 7 using WAI-ARIA
Creating dynamic and accessible content in Drupal 7 using WAI-ARIACreating dynamic and accessible content in Drupal 7 using WAI-ARIA
Creating dynamic and accessible content in Drupal 7 using WAI-ARIAAccess iQ
 
Implementing ARIA for Real World Accessibility
Implementing ARIA for Real World AccessibilityImplementing ARIA for Real World Accessibility
Implementing ARIA for Real World AccessibilityJared Smith
 
Web accessibility: It's everyone's responsibility
Web accessibility: It's everyone's responsibilityWeb accessibility: It's everyone's responsibility
Web accessibility: It's everyone's responsibilityAccess iQ
 
Keyboard and Interaction Accessibility Techniques
Keyboard and Interaction Accessibility TechniquesKeyboard and Interaction Accessibility Techniques
Keyboard and Interaction Accessibility TechniquesJared Smith
 

Andere mochten auch (7)

Aria a11ycamp-bay-2015
Aria a11ycamp-bay-2015Aria a11ycamp-bay-2015
Aria a11ycamp-bay-2015
 
NDS Employment Conference
NDS Employment ConferenceNDS Employment Conference
NDS Employment Conference
 
Reaching Corporate Australia with a Business Case
Reaching Corporate Australia with a Business CaseReaching Corporate Australia with a Business Case
Reaching Corporate Australia with a Business Case
 
Creating dynamic and accessible content in Drupal 7 using WAI-ARIA
Creating dynamic and accessible content in Drupal 7 using WAI-ARIACreating dynamic and accessible content in Drupal 7 using WAI-ARIA
Creating dynamic and accessible content in Drupal 7 using WAI-ARIA
 
Implementing ARIA for Real World Accessibility
Implementing ARIA for Real World AccessibilityImplementing ARIA for Real World Accessibility
Implementing ARIA for Real World Accessibility
 
Web accessibility: It's everyone's responsibility
Web accessibility: It's everyone's responsibilityWeb accessibility: It's everyone's responsibility
Web accessibility: It's everyone's responsibility
 
Keyboard and Interaction Accessibility Techniques
Keyboard and Interaction Accessibility TechniquesKeyboard and Interaction Accessibility Techniques
Keyboard and Interaction Accessibility Techniques
 

Ähnlich wie Ramp Up Your Web Experiences Using Drupal and Apache Solr

Drupal and Apache Solr Search Go Together Like Pizza and Beer for Your Site
Drupal and Apache Solr Search Go Together Like Pizza and Beer for Your SiteDrupal and Apache Solr Search Go Together Like Pizza and Beer for Your Site
Drupal and Apache Solr Search Go Together Like Pizza and Beer for Your Sitenyccamp
 
Things Made Easy: One Click CMS Integration with Solr & Drupal
Things Made Easy: One Click CMS Integration with Solr & DrupalThings Made Easy: One Click CMS Integration with Solr & Drupal
Things Made Easy: One Click CMS Integration with Solr & Drupallucenerevolution
 
New-Age Search through Apache Solr
New-Age Search through Apache SolrNew-Age Search through Apache Solr
New-Age Search through Apache SolrEdureka!
 
Open Source Content Management Systems
Open Source Content Management SystemsOpen Source Content Management Systems
Open Source Content Management SystemsMatthew Turland
 
Building mobile applications with DrupalGap
Building mobile applications with DrupalGapBuilding mobile applications with DrupalGap
Building mobile applications with DrupalGapAlex S
 
PHPNW Drupal as a Framework
PHPNW Drupal as a FrameworkPHPNW Drupal as a Framework
PHPNW Drupal as a Frameworkdigital006
 
Decoupled Drupal: What This Means for Developers
Decoupled Drupal: What This Means for DevelopersDecoupled Drupal: What This Means for Developers
Decoupled Drupal: What This Means for DevelopersAcquia
 
Drupal as a Programmer-Friendly CMS at ConFoo
Drupal as a Programmer-Friendly CMS at ConFooDrupal as a Programmer-Friendly CMS at ConFoo
Drupal as a Programmer-Friendly CMS at ConFooSuzanne Dergacheva
 
Drupal8 corporate training in Hyderabad
Drupal8 corporate training in HyderabadDrupal8 corporate training in Hyderabad
Drupal8 corporate training in Hyderabadphp2ranjan
 
Working with LoopBack Models
Working with LoopBack ModelsWorking with LoopBack Models
Working with LoopBack ModelsRaymond Feng
 
Apache Solr search for Drupal. Ievgen Kartakov.
Apache Solr search for Drupal. Ievgen Kartakov.Apache Solr search for Drupal. Ievgen Kartakov.
Apache Solr search for Drupal. Ievgen Kartakov.DrupalCampDN
 
[Srijan Wednesday Webinar] Decoupled Demystified: The Present & Future of Dr...
 [Srijan Wednesday Webinar] Decoupled Demystified: The Present & Future of Dr... [Srijan Wednesday Webinar] Decoupled Demystified: The Present & Future of Dr...
[Srijan Wednesday Webinar] Decoupled Demystified: The Present & Future of Dr...Srijan Technologies
 
Drupal 8 and iOS - an Open Source App
Drupal 8 and iOS - an Open Source AppDrupal 8 and iOS - an Open Source App
Drupal 8 and iOS - an Open Source ApplittleMAS
 
Getting Started with DrupalGap
Getting Started with DrupalGapGetting Started with DrupalGap
Getting Started with DrupalGapAlex S
 
13th Sep, Drupal 7 advanced training by TCS
13th Sep, Drupal 7 advanced training by TCS 13th Sep, Drupal 7 advanced training by TCS
13th Sep, Drupal 7 advanced training by TCS DrupalMumbai
 
One Man Band - Drupal Lightning Talks
One Man Band - Drupal Lightning TalksOne Man Band - Drupal Lightning Talks
One Man Band - Drupal Lightning TalksMark Jarrell
 
Beginner's guide to drupal
Beginner's guide to drupalBeginner's guide to drupal
Beginner's guide to drupalmayank.grd
 

Ähnlich wie Ramp Up Your Web Experiences Using Drupal and Apache Solr (20)

Drupal and Apache Solr Search Go Together Like Pizza and Beer for Your Site
Drupal and Apache Solr Search Go Together Like Pizza and Beer for Your SiteDrupal and Apache Solr Search Go Together Like Pizza and Beer for Your Site
Drupal and Apache Solr Search Go Together Like Pizza and Beer for Your Site
 
Things Made Easy: One Click CMS Integration with Solr & Drupal
Things Made Easy: One Click CMS Integration with Solr & DrupalThings Made Easy: One Click CMS Integration with Solr & Drupal
Things Made Easy: One Click CMS Integration with Solr & Drupal
 
New-Age Search through Apache Solr
New-Age Search through Apache SolrNew-Age Search through Apache Solr
New-Age Search through Apache Solr
 
Open Source Content Management Systems
Open Source Content Management SystemsOpen Source Content Management Systems
Open Source Content Management Systems
 
Building mobile applications with DrupalGap
Building mobile applications with DrupalGapBuilding mobile applications with DrupalGap
Building mobile applications with DrupalGap
 
PHPNW Drupal as a Framework
PHPNW Drupal as a FrameworkPHPNW Drupal as a Framework
PHPNW Drupal as a Framework
 
Decoupled Drupal: What This Means for Developers
Decoupled Drupal: What This Means for DevelopersDecoupled Drupal: What This Means for Developers
Decoupled Drupal: What This Means for Developers
 
Drupal as a Programmer-Friendly CMS at ConFoo
Drupal as a Programmer-Friendly CMS at ConFooDrupal as a Programmer-Friendly CMS at ConFoo
Drupal as a Programmer-Friendly CMS at ConFoo
 
Drupal8 corporate training in Hyderabad
Drupal8 corporate training in HyderabadDrupal8 corporate training in Hyderabad
Drupal8 corporate training in Hyderabad
 
Working with LoopBack Models
Working with LoopBack ModelsWorking with LoopBack Models
Working with LoopBack Models
 
Apache Solr search for Drupal. Ievgen Kartakov.
Apache Solr search for Drupal. Ievgen Kartakov.Apache Solr search for Drupal. Ievgen Kartakov.
Apache Solr search for Drupal. Ievgen Kartakov.
 
[Srijan Wednesday Webinar] Decoupled Demystified: The Present & Future of Dr...
 [Srijan Wednesday Webinar] Decoupled Demystified: The Present & Future of Dr... [Srijan Wednesday Webinar] Decoupled Demystified: The Present & Future of Dr...
[Srijan Wednesday Webinar] Decoupled Demystified: The Present & Future of Dr...
 
Drupal 8 and iOS - an Open Source App
Drupal 8 and iOS - an Open Source AppDrupal 8 and iOS - an Open Source App
Drupal 8 and iOS - an Open Source App
 
Getting Started with DrupalGap
Getting Started with DrupalGapGetting Started with DrupalGap
Getting Started with DrupalGap
 
Searchlight
SearchlightSearchlight
Searchlight
 
Drupal 7 and SolR
Drupal 7 and SolRDrupal 7 and SolR
Drupal 7 and SolR
 
13th Sep, Drupal 7 advanced training by TCS
13th Sep, Drupal 7 advanced training by TCS 13th Sep, Drupal 7 advanced training by TCS
13th Sep, Drupal 7 advanced training by TCS
 
One Man Band - Drupal Lightning Talks
One Man Band - Drupal Lightning TalksOne Man Band - Drupal Lightning Talks
One Man Band - Drupal Lightning Talks
 
Beginner's guide to drupal
Beginner's guide to drupalBeginner's guide to drupal
Beginner's guide to drupal
 
Dn D Custom 1
Dn D Custom 1Dn D Custom 1
Dn D Custom 1
 

Mehr von lucenerevolution

Text Classification Powered by Apache Mahout and Lucene
Text Classification Powered by Apache Mahout and LuceneText Classification Powered by Apache Mahout and Lucene
Text Classification Powered by Apache Mahout and Lucenelucenerevolution
 
State of the Art Logging. Kibana4Solr is Here!
State of the Art Logging. Kibana4Solr is Here! State of the Art Logging. Kibana4Solr is Here!
State of the Art Logging. Kibana4Solr is Here! lucenerevolution
 
Building Client-side Search Applications with Solr
Building Client-side Search Applications with SolrBuilding Client-side Search Applications with Solr
Building Client-side Search Applications with Solrlucenerevolution
 
Integrate Solr with real-time stream processing applications
Integrate Solr with real-time stream processing applicationsIntegrate Solr with real-time stream processing applications
Integrate Solr with real-time stream processing applicationslucenerevolution
 
Scaling Solr with SolrCloud
Scaling Solr with SolrCloudScaling Solr with SolrCloud
Scaling Solr with SolrCloudlucenerevolution
 
Administering and Monitoring SolrCloud Clusters
Administering and Monitoring SolrCloud ClustersAdministering and Monitoring SolrCloud Clusters
Administering and Monitoring SolrCloud Clusterslucenerevolution
 
Implementing a Custom Search Syntax using Solr, Lucene, and Parboiled
Implementing a Custom Search Syntax using Solr, Lucene, and ParboiledImplementing a Custom Search Syntax using Solr, Lucene, and Parboiled
Implementing a Custom Search Syntax using Solr, Lucene, and Parboiledlucenerevolution
 
Using Solr to Search and Analyze Logs
Using Solr to Search and Analyze Logs Using Solr to Search and Analyze Logs
Using Solr to Search and Analyze Logs lucenerevolution
 
Enhancing relevancy through personalization & semantic search
Enhancing relevancy through personalization & semantic searchEnhancing relevancy through personalization & semantic search
Enhancing relevancy through personalization & semantic searchlucenerevolution
 
Real-time Inverted Search in the Cloud Using Lucene and Storm
Real-time Inverted Search in the Cloud Using Lucene and StormReal-time Inverted Search in the Cloud Using Lucene and Storm
Real-time Inverted Search in the Cloud Using Lucene and Stormlucenerevolution
 
Solr's Admin UI - Where does the data come from?
Solr's Admin UI - Where does the data come from?Solr's Admin UI - Where does the data come from?
Solr's Admin UI - Where does the data come from?lucenerevolution
 
Schemaless Solr and the Solr Schema REST API
Schemaless Solr and the Solr Schema REST APISchemaless Solr and the Solr Schema REST API
Schemaless Solr and the Solr Schema REST APIlucenerevolution
 
High Performance JSON Search and Relational Faceted Browsing with Lucene
High Performance JSON Search and Relational Faceted Browsing with LuceneHigh Performance JSON Search and Relational Faceted Browsing with Lucene
High Performance JSON Search and Relational Faceted Browsing with Lucenelucenerevolution
 
Text Classification with Lucene/Solr, Apache Hadoop and LibSVM
Text Classification with Lucene/Solr, Apache Hadoop and LibSVMText Classification with Lucene/Solr, Apache Hadoop and LibSVM
Text Classification with Lucene/Solr, Apache Hadoop and LibSVMlucenerevolution
 
Faceted Search with Lucene
Faceted Search with LuceneFaceted Search with Lucene
Faceted Search with Lucenelucenerevolution
 
Recent Additions to Lucene Arsenal
Recent Additions to Lucene ArsenalRecent Additions to Lucene Arsenal
Recent Additions to Lucene Arsenallucenerevolution
 
Turning search upside down
Turning search upside downTurning search upside down
Turning search upside downlucenerevolution
 
Spellchecking in Trovit: Implementing a Contextual Multi-language Spellchecke...
Spellchecking in Trovit: Implementing a Contextual Multi-language Spellchecke...Spellchecking in Trovit: Implementing a Contextual Multi-language Spellchecke...
Spellchecking in Trovit: Implementing a Contextual Multi-language Spellchecke...lucenerevolution
 
Shrinking the haystack wes caldwell - final
Shrinking the haystack   wes caldwell - finalShrinking the haystack   wes caldwell - final
Shrinking the haystack wes caldwell - finallucenerevolution
 

Mehr von lucenerevolution (20)

Text Classification Powered by Apache Mahout and Lucene
Text Classification Powered by Apache Mahout and LuceneText Classification Powered by Apache Mahout and Lucene
Text Classification Powered by Apache Mahout and Lucene
 
State of the Art Logging. Kibana4Solr is Here!
State of the Art Logging. Kibana4Solr is Here! State of the Art Logging. Kibana4Solr is Here!
State of the Art Logging. Kibana4Solr is Here!
 
Search at Twitter
Search at TwitterSearch at Twitter
Search at Twitter
 
Building Client-side Search Applications with Solr
Building Client-side Search Applications with SolrBuilding Client-side Search Applications with Solr
Building Client-side Search Applications with Solr
 
Integrate Solr with real-time stream processing applications
Integrate Solr with real-time stream processing applicationsIntegrate Solr with real-time stream processing applications
Integrate Solr with real-time stream processing applications
 
Scaling Solr with SolrCloud
Scaling Solr with SolrCloudScaling Solr with SolrCloud
Scaling Solr with SolrCloud
 
Administering and Monitoring SolrCloud Clusters
Administering and Monitoring SolrCloud ClustersAdministering and Monitoring SolrCloud Clusters
Administering and Monitoring SolrCloud Clusters
 
Implementing a Custom Search Syntax using Solr, Lucene, and Parboiled
Implementing a Custom Search Syntax using Solr, Lucene, and ParboiledImplementing a Custom Search Syntax using Solr, Lucene, and Parboiled
Implementing a Custom Search Syntax using Solr, Lucene, and Parboiled
 
Using Solr to Search and Analyze Logs
Using Solr to Search and Analyze Logs Using Solr to Search and Analyze Logs
Using Solr to Search and Analyze Logs
 
Enhancing relevancy through personalization & semantic search
Enhancing relevancy through personalization & semantic searchEnhancing relevancy through personalization & semantic search
Enhancing relevancy through personalization & semantic search
 
Real-time Inverted Search in the Cloud Using Lucene and Storm
Real-time Inverted Search in the Cloud Using Lucene and StormReal-time Inverted Search in the Cloud Using Lucene and Storm
Real-time Inverted Search in the Cloud Using Lucene and Storm
 
Solr's Admin UI - Where does the data come from?
Solr's Admin UI - Where does the data come from?Solr's Admin UI - Where does the data come from?
Solr's Admin UI - Where does the data come from?
 
Schemaless Solr and the Solr Schema REST API
Schemaless Solr and the Solr Schema REST APISchemaless Solr and the Solr Schema REST API
Schemaless Solr and the Solr Schema REST API
 
High Performance JSON Search and Relational Faceted Browsing with Lucene
High Performance JSON Search and Relational Faceted Browsing with LuceneHigh Performance JSON Search and Relational Faceted Browsing with Lucene
High Performance JSON Search and Relational Faceted Browsing with Lucene
 
Text Classification with Lucene/Solr, Apache Hadoop and LibSVM
Text Classification with Lucene/Solr, Apache Hadoop and LibSVMText Classification with Lucene/Solr, Apache Hadoop and LibSVM
Text Classification with Lucene/Solr, Apache Hadoop and LibSVM
 
Faceted Search with Lucene
Faceted Search with LuceneFaceted Search with Lucene
Faceted Search with Lucene
 
Recent Additions to Lucene Arsenal
Recent Additions to Lucene ArsenalRecent Additions to Lucene Arsenal
Recent Additions to Lucene Arsenal
 
Turning search upside down
Turning search upside downTurning search upside down
Turning search upside down
 
Spellchecking in Trovit: Implementing a Contextual Multi-language Spellchecke...
Spellchecking in Trovit: Implementing a Contextual Multi-language Spellchecke...Spellchecking in Trovit: Implementing a Contextual Multi-language Spellchecke...
Spellchecking in Trovit: Implementing a Contextual Multi-language Spellchecke...
 
Shrinking the haystack wes caldwell - final
Shrinking the haystack   wes caldwell - finalShrinking the haystack   wes caldwell - final
Shrinking the haystack wes caldwell - final
 

Kürzlich hochgeladen

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 

Kürzlich hochgeladen (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 

Ramp Up Your Web Experiences Using Drupal and Apache Solr

  • 2. RAMP UP YOUR WEB EXPERIENCES USING DRUPAL AND APACHE SOLR peter.wolanin@acquia.com drupal.org/user/49851 (pwolanin) Peter Wolanin Momentum Specialist @ Acquia, Inc.
  • 3. My Agenda Expose you to Drupal as a free enterprise CMS / WAF Describe some of the advantages that come from a large innovative pool of contributors Explain how Drupal enables you to immediately use key Apache Solr features without investing in development Have you leave here convinced that you should consider using Drupal with Apache Solr for your next project so that you can deliver a better and more engaging site faster 3
  • 4. Overview of Content Why are organizations standardizing on Drupal? Drupal integration with Apache Solr Integrated content indexing Automatic generation of facets UI configuration of search Easy extensibility of Drupal/Solr integration code 4
  • 6. Standardize on Drupal As Platform Market Presence ! Global Adoption! ! ! Massively Extensible Broad Community ! ! ! ! ! ! 1,500,000+ sites 228 countries 16,000+ modules 1,000,000+ members Active Development! ! 17,000+ developers 6
  • 7. Drupal Delivers Rich, Integrated Experiences Microsite Intranet • • • • Open, flexible architecture Build a wide range of sites Repeatable deployment patterns Enables effective shared services model between IT & marketing Corp-com site 7 Main Website Microsite Product Site Community Platform Main Website
  • 8. A Truly Agile Platform February 2012 Pinterest hits 10M unique visitors March 2012 New Drupal module created for site usersʼ “pinned” images 8 April 2012 15 Drupal sites go live with Pinterest integration
  • 9. Apache Solr Integration with Drupal Five years of integration At least 20,000 sites using Solr Active community of contributors 9
  • 10. Solr Integration Challenges Are Already Solved The most important - content indexing Facets, sorting, and highlighting Integrated with More Like This and spell-check Optionally enable content access permissions by indexing documents with data and filtering Solr results based on the current user Works with Solr 1.4.x, 3.5.x, 3.6.x, 4.x 10
  • 11. Drupal Entities are Content + Data Nodes are the basic content entity The entity system is extensible can represent any data Examples of data stored within Drupal entities ‣ ‣ ‣ Node 1 Node 2 Node 3 Node 4 Node 5 Node 6 Text Node 7 Node 8 Node 9 Geographic location Node reference 11
  • 12. Dynamic Content (Node) Types Enriched with Dynamic Data Fields Site builders can define as many content types as needed in the UI Each content type can have many associated data fields defined in the UI and with configurable rendering Data fields from content can be re-used across the site in listing, cross-referencing, and recombination 12
  • 13. 13
  • 14. Module Has a Pipeline for Indexing Drupal Content to Solr Drupal entities are processed into one (or more) document objects Each document is converted to XML and sent to Solr. Document object Node object XML string title nid type entity_type label entity_id bundle Drupal callbacks & hooks 14 <doc> <field <field <field <field </doc> name="entity_type">node</field> name="label">Hello Drupal</field> name="entity_id">101</field> name="bundle">session</field>
  • 15. 15
  • 16. Dynamic Data Needs Dynamic Schema Fields Dyanimc content types and their data fields are defined in the UI without writing code Since the data structure is user-defined, data fields are mapped into dynamic schema fields Non-default mapping can be added in code A standard module-provided schema.xml and solrconfig.xml minimizes setup and maintenance 16
  • 17. <!-- Regular text (without processing) can be stored in a string field--> <dynamicField name="ss_*" type="string" indexed="true" stored="true" multiValued="false"/> <dynamicField name="sm_*" type="string" indexed="true" stored="true" multiValued="true"/> <!-- Normal text fields are for full text - the relevance of a match depends on the length of the text --> <dynamicField name="ts_*" type="text" indexed="true" stored="true" multiValued="false" termVectors="true"/> <dynamicField name="tm_*" type="text" indexed="true" stored="true" multiValued="true" termVectors="true"/> <!-- These text fields omit norms - useful for extracted text like taxonomy_names --> <dynamicField name="tos_*" type="text" indexed="true" stored="true" multiValued="false" termVectors="true" omitNorms="true"/> <dynamicField name="tom_*" type="text" indexed="true" stored="true" multiValued="true" termVectors="true" omitNorms="true"/> 17
  • 18. Entity Metadata Gives Automatic Facets" Content types Taxonomy terms per field Content authors Posted and modified dates Text and numbers selected via select list/radios/check boxes 18
  • 20. 20
  • 21. 21
  • 22. 22
  • 23. 23
  • 24. 24
  • 25. 25
  • 26. 26
  • 27. 27
  • 28. 28
  • 29. Fully Built Search Pages and Facets" The Drupal integration allows you to build search pages (including custom filtering) and facets with no coding Tune boosts, change query fields, and apply other configuration per “environment” (one or more search pages reference each environment) If you need deeper control, you can easily write code to change the interaction with Solr, or write custom searches 29
  • 30. Drupal Modules Implement hooks to Modify Indexing and Display HOOK_apachesolr_index_document_build($document, $entity, $entity_type, $env_id) By creating a Drupal module (in PHP), you can implement module and theme “hooks” to extend or alter Drupal behavior. Change or replace the data normally indexed. Modify the search results and their appearance. 30
  • 31. A Query Object Is Used to Prepare and Run Searches HOOK_apachesolr_query_prepare($query) $query->setParam('hl.fl', $field); $keys = $query->getParam('q'); $response = $query->search(); 31
  • 32. Two Hooks For Changing the Query? HOOK_apachesolr_query_prepare() ‣ ‣ Invoked before $query is statically cached. Add or remove sorting options visible to the user. HOOK_apachesolr_query_alter() ‣ ‣ ‣ Invoked after $query is statically cached. Useful for applying operations the user shouldnʼt have the ability to alter. For example, node access filters. 32
  • 33. Example: Poor Manʼs “Entity” Extraction" Erik Hatcher recently showed how to extract values in Solr using keep words and regular expressions (Solr 4.4+) http://searchhub.org/2013/06/27/poor-mans-entityextraction-with-solr/ By shifting this work to a Drupal module, I can make it easy to configure and deploy for an existing site. module code: https://drupal.org/sandbox/pwolanin/2129005 33
  • 34. Adding A New Field With Matched Strings /** * Implements hook_apachesolr_index_document_build_node(). */ function apachesolr_key_phrases_apachesolr_index_document_build_node ($document, $entity, $env_id) { $key_phrases = variable_get('key_phrases', array()); if ($key_phrases && $document->content) { foreach ($key_phrases as $phrase) { if (stripos($document->content, $phrase) !== FALSE) { $document->addField('sm_key_phrases', $phrase); } } } } 34
  • 35. 35
  • 36. Adding A New Facet For Matched Strings /** * Implements hook_facetapi_facet_info(). */ function apachesolr_key_phrases_facetapi_facet_info($searcher_info) { $facets = array(); if ('apachesolr' == $searcher_info['adapter']) { $facets['sm_key_phrases'] = array( 'label' => t('Key phrases'), 'description' => t('Filter by key phrases.'), ); } return $facets; } 36
  • 37. 37
  • 38. To Wrap Up Drupal has extensive Apache Solr integration, and is highly customizable The Drupal platform is widely adopted, and the Drupal community drives rapid innovation Acquia provides Enterprise Drupal support and a network of partners Acquia includes a secure, hosted Solr index with every support subscription 38