apache solr changes the way you build sites

85
APACHE SOLR CHANGES THE WAY YOU BUILD SITES How to build dynamic navigation for dynamic content Jacob Singh and Peter Wolanin Drupalcon Paris, September 3rd 2009

Upload: peter

Post on 09-May-2015

5.406 views

Category:

Technology


2 download

DESCRIPTION

By Jacob Singh and Peter Wolanin about the Apache Solr Search Integration module for Drupal. Presented at Drupalcon Paris, 2009.

TRANSCRIPT

Page 1: Apache Solr Changes the Way You Build Sites

APACHE SOLR CHANGES THE WAY YOU BUILD SITES

How to build dynamic navigation for dynamic content

Jacob Singh and Peter Wolanin Drupalcon Paris, September 3rd 2009

Page 2: Apache Solr Changes the Way You Build Sites

RELEVANT AND FAST

Page 3: Apache Solr Changes the Way You Build Sites

FILTERS

Page 4: Apache Solr Changes the Way You Build Sites

SORTABLE

Page 5: Apache Solr Changes the Way You Build Sites

MORE LIKE THIS

Page 6: Apache Solr Changes the Way You Build Sites

SITE NAVIGATION

Page 7: Apache Solr Changes the Way You Build Sites

INFORMATION ARCHITECTURE

•Is the science and art of guessing what your users want to see or do on your site and helping them get there

•Often done without actually consulting visitors or proper understanding of the target market

Page 8: Apache Solr Changes the Way You Build Sites

ARCHETYPES - WHO

Page 9: Apache Solr Changes the Way You Build Sites

CONTENT - YOU GOT IT

Page 10: Apache Solr Changes the Way You Build Sites

ORGANIZE AND PROSPER!

Page 11: Apache Solr Changes the Way You Build Sites

NAVIGATION

Page 12: Apache Solr Changes the Way You Build Sites

SO? WHAT’S WRONG WITH THAT?

Page 13: Apache Solr Changes the Way You Build Sites

Site Map!

(1996)

Page 14: Apache Solr Changes the Way You Build Sites

WEBSITES GROW.

•Sometimes really fast.

• And always in ways you didn’t expect

Page 15: Apache Solr Changes the Way You Build Sites
Page 16: Apache Solr Changes the Way You Build Sites
Page 17: Apache Solr Changes the Way You Build Sites

WHY DOES THIS HAPPEN?

Page 18: Apache Solr Changes the Way You Build Sites

VISITORS ARE TOO VARIED TO THINK OF THEM ALL

YOUR CONTENT IS TOO VARIED FOR YOUR MENU

Page 19: Apache Solr Changes the Way You Build Sites

WHERE ARE BEER HATS?

Page 20: Apache Solr Changes the Way You Build Sites

YOUR CONTENT IS TOO VAST AND TAKES TOO MANY

CLICKS TO FIND

Page 21: Apache Solr Changes the Way You Build Sites

TOOK 7 CLICKS TO FIND DRUPAL

Page 22: Apache Solr Changes the Way You Build Sites

YOUR CONTENT IS CONTRIBUTED BY USERS

AND UNPREDICTABLE.

Page 23: Apache Solr Changes the Way You Build Sites

DRUPAL IS A SOCIAL PUBLISHING PLATFORM

Page 24: Apache Solr Changes the Way You Build Sites

YOU USE IT SO USERS WILL ADD CONTENT

That’s the point!

Page 25: Apache Solr Changes the Way You Build Sites

IF WE HAVE DYNAMIC USER CONTRIBUTED CONTENT

Page 26: Apache Solr Changes the Way You Build Sites

WHY DO WE INSIST ON STATIC ADMIN DEFINED

NAVIGATION?

IF WE HAVE DYNAMIC USER CONTRIBUTED CONTENT

Page 27: Apache Solr Changes the Way You Build Sites

WEB 2.0 JARGON TO SAVE THE DAY

•Tag Clouds

•Content Recommendation

•Social Networking

•Social Bookmarking

Page 28: Apache Solr Changes the Way You Build Sites

HOW SEARCH DIED AND

HOW WE BRING IT BACK

! ?

Page 29: Apache Solr Changes the Way You Build Sites

SEARCH IS NOT A PRIORITY

Page 30: Apache Solr Changes the Way You Build Sites

MOST DRUPAL WEBSITES REALLY IGNORE SEARCH

Page 31: Apache Solr Changes the Way You Build Sites

CAN YOU FIND THE SEARCH BOX?

HINT: I’VE CIRCLED IT IN ORANGE

Page 32: Apache Solr Changes the Way You Build Sites
Page 33: Apache Solr Changes the Way You Build Sites
Page 34: Apache Solr Changes the Way You Build Sites
Page 35: Apache Solr Changes the Way You Build Sites
Page 36: Apache Solr Changes the Way You Build Sites
Page 37: Apache Solr Changes the Way You Build Sites
Page 38: Apache Solr Changes the Way You Build Sites

WHAT DO THE BIG SITES DO?

Page 39: Apache Solr Changes the Way You Build Sites
Page 40: Apache Solr Changes the Way You Build Sites
Page 41: Apache Solr Changes the Way You Build Sites
Page 42: Apache Solr Changes the Way You Build Sites
Page 43: Apache Solr Changes the Way You Build Sites
Page 44: Apache Solr Changes the Way You Build Sites

WHY DID SEARCH DIE?

•It was too slow

•It wasn’t smart enough

•Users learned not to trust it

Page 45: Apache Solr Changes the Way You Build Sites

LANGUAGE IS IMPORTANT

Page 46: Apache Solr Changes the Way You Build Sites

GOLDEN RULE: No Dead Ends!

Page 47: Apache Solr Changes the Way You Build Sites

SEARCH ON G.D.O

Page 48: Apache Solr Changes the Way You Build Sites

FIND OUT WHERE TO LOOK

Page 49: Apache Solr Changes the Way You Build Sites

FOUND ‘EM

Page 50: Apache Solr Changes the Way You Build Sites

I LEFT MY TIME MACHINE AT HOME

Page 51: Apache Solr Changes the Way You Build Sites
Page 52: Apache Solr Changes the Way You Build Sites

SMARTER MATCHES

Page 53: Apache Solr Changes the Way You Build Sites

STEMMING

Page 54: Apache Solr Changes the Way You Build Sites

SPELLING SUGGESTIONS

Page 55: Apache Solr Changes the Way You Build Sites

BUT I’M THE ADMIN!

Page 56: Apache Solr Changes the Way You Build Sites
Page 57: Apache Solr Changes the Way You Build Sites

ALL THE COOL KIDS ARE DOING IT

Page 58: Apache Solr Changes the Way You Build Sites
Page 59: Apache Solr Changes the Way You Build Sites
Page 60: Apache Solr Changes the Way You Build Sites
Page 61: Apache Solr Changes the Way You Build Sites
Page 62: Apache Solr Changes the Way You Build Sites

DAMZ EN L’MASSION

Page 63: Apache Solr Changes the Way You Build Sites

A TAILOR MADE NAVIGATION FOR EVERY USER

You want it, right?

Page 64: Apache Solr Changes the Way You Build Sites

The Apache Solr Project

• Stable and proven.– Used by Netflix, CNET, CitySearch, StubHub!, GameSpot, AOL– Full time maintainers– VERY Active mailing list (about 1k messages per month)

• Fast: written in Java.• Uses Lucene: the top open source search

library.• Distibuted: scales out in multiple directions.

Page 65: Apache Solr Changes the Way You Build Sites

Apache Solr Search Integration

• Very active project on drupal.org.• Takes advantage of latest Solr features.• Exposes an API to modify search and display

behavior.• Supported by engineers at Acquia.• All Acquia code improvements have been

contributed back to the Drupal.org project.• Many of the Drupalcon sponsors and attendees

are already involved and using it.

Page 66: Apache Solr Changes the Way You Build Sites

Feaure highlights

• Taxonomy, user, and language facets.• Node type faceting, weighting, and exclusion.• Node property (e.g. sticky) and date weighting.• Date facets on content creation or change.• OG facets (optional sub-module).• Node access respected (optional sub-module).• More-like-this content recommendations.• Customizable (see drupal.org module browsing

features).

Page 67: Apache Solr Changes the Way You Build Sites

Integration with other modules/data

• Webmail: http://drupal.org/project/webmail_plus

• Attachments: http://drupal.org/project/apachesolr_attachments

• Views: http://drupal.org/project/apachesolr_views

• Services: http://drupal.org/project/solr_service

• Nodequeue: http://drupal.org/project/nodequeue

• RDF: http://drupal.org/project/apachesolr_rdf

• Project: http://drupal.org/project/project

• Ubercart: http://drupal.org/project/apachesolr_ubercart

Page 68: Apache Solr Changes the Way You Build Sites

You Can Run Yourself. Easy!1. Get a dedicated server or a VPS and get Solr loaded on it.

2. Find a Java server administrator or get some books.

3. Get the Drupal module, install the PHP library, and configure it.

4. Replace the stock Solr configuration files with Drupal ones.

5. Learn about Solr replication and configuring it.

6. Set up log management, alerting, monitoring, etc.

7. Implement regular upgrades or patches to Solr which will requiring getting your Java development set up and building from source sometimes.

8. Keep up to date with the Drupal module.

9. Implement a security regime to protect data transfer (i.e. so spammers can’t add Viagra ads to your search results)

10. Harden your servers, setup firewalls and IP-based, password-based, or other security.

11. Figure out how handle updates and versioning of Solr and your schema.

12. *Recommended: Get on the solr-user and solr-developer mailing lists to get updates and alerts on the Apache Solr project. Don’t worry, it’s only a 50 or so mails a day if you don’t count the commit messages.

Page 69: Apache Solr Changes the Way You Build Sites

Or... use Acquia Search

• Sign up on acquia.com.• Free 30 day trial subscriptions for anyone.• You must be running a Drupal 6.x site, with PHP

5.2.0+ (5.1.4+ possible as well).• Use Acquia Drupal or install our search module

package.• It leaves Drupal core search intact, so you can

go back anytime.• Convert your site and start impressing users!• We will worry about everything else.

Page 70: Apache Solr Changes the Way You Build Sites

How Acquia Search Works

Your webserver

Search slave servers

Search master server

AcquiaNetwork

content to index

SSL, HMAC

authenticatedrequest

indexreplication

search request

SSL, HMACauthenticated

results

SSL, HMAC

Page 71: Apache Solr Changes the Way You Build Sites

Proving the platform

• Benchmarking our servers, on the search server itself, most searches run in < 200 ms, even under high load.

Page 72: Apache Solr Changes the Way You Build Sites

Who Is This For?

• Small and medium size sites - easy access to enterprise search for every Drupal site.– No hardware, no experience, fast setup, low cost.

• Large sites and Acquia partners - the same solution you’d deploy, but faster and easier.– Don’t consume your engineering resources.– Why load your own servers? – We handle the security and availability.– Impress your users and clients.

Page 73: Apache Solr Changes the Way You Build Sites

How-to Screencasts

• http://www.jeffnoyes.com/content/how-use-acquia-search-apache-solr

• http://www.jeffnoyes.com/content/enabling-acquia-search-and-apache-solr

Here’s a quick look at the admin interface:

Page 74: Apache Solr Changes the Way You Build Sites
Page 75: Apache Solr Changes the Way You Build Sites
Page 76: Apache Solr Changes the Way You Build Sites
Page 77: Apache Solr Changes the Way You Build Sites

© 2008 Acquia, Inc.

New modules to enhance the experience

Page 78: Apache Solr Changes the Way You Build Sites

© 2008 Acquia, Inc.

Searching with Views 3• Define filters, sorts in Views like normal• Solr, not MySQL, gets the query• Views is responsible for rendering

results:• you configure the visible fields• grid views• carousels • search results in blocks

• Faceting works like in current Apache

Page 79: Apache Solr Changes the Way You Build Sites

© 2008 Acquia, Inc.

Javascript interface• http://drupal.org/project/solrjs

Page 80: Apache Solr Changes the Way You Build Sites

© 2008 Acquia, Inc.

Javascript interface• http://drupal.org/project/solrjs

Page 81: Apache Solr Changes the Way You Build Sites

© 2008 Acquia, Inc.

Autocompletehttp://drupal.org/project/apachesolr_autocomplete

Page 82: Apache Solr Changes the Way You Build Sites

© 2008 Acquia, Inc.

Stats for administratorshttp://drupal.org/project/apachesolr_stats

Page 83: Apache Solr Changes the Way You Build Sites

© 2008 Acquia, Inc.

DRUPAL-6--2 Branch

Page 84: Apache Solr Changes the Way You Build Sites

© 2008 Acquia, Inc.

DRUPAL-6--2 Branch

• Researching more substantial architectural changes to query building.

• Looking at ways to support multi-site and better support multi-lingual content.

Page 85: Apache Solr Changes the Way You Build Sites

Learn and Contribute• Find us at the code sprint (Saturday) if you have

questions about the code or roadmap.• Come to the Acquia table any time to learn

more about Acquia Search.

[email protected]@acquia.com

Thank you!

© 2009, Acquia, Inc.