apache solr search for drupal. ievgen kartakov

Post on 08-May-2015

2.184 Views

Category:

Technology

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Apache Solr search for Drupal

Ievgen Kartakov

http://donetsk.drupal.ua

Apache Solr search for Drupal

Ievgen KartakovPropeople | Ukraine Department Manager

Nikname: creaoyEmail: jk@propeople.com.ua

CONTENTS

• Basic things. Installation, configuration, multisite setup

• Adding CCK fields to index, work with filters, theming results

• Solr vs. Sphinx

INSTALLATION

• Server software– Require root access and hands. – Possible to setup multiple search paths

• Hosting– Don’t require server configuration– Usually not cheap

CONFIGURATION

• Enable Drupal module– Configure host, port, patch variables– Select content types, configure weight

for index– Run cron and wait for 2 min

EXAMPLE: STANFORD CSI

MULTISITE SETUP

• Multiple site setup on one core• Useful for development server with different

sites• Hosting companies doesn’t support this

properly

ADDING CCK FIELDS TO INDEX

ADDING CCK FIELDS TO SEARCH QUERY

EXAMPLE: 4ALLPROMOS

FILTERS SEARCH RESULTS

• Content type and taxonomy filters supported• Faceted search by default• D6. What to do with non standard filters?

THEMING RESULTS PAGE

• Simple template changing and text output search-result.tpl.php

APACHE SOLR WITH…

• Apache Solr Views (Apache Solr + Views 3)– Output results with view without database query

• Apache Solr Panels (Apache Solr + Panels) – Build search page layout with panels

EXAMPLE: CULTIVATE

FILTERS CLOSER LOOK

D7: APACHE SOLR MODULE

• How to add fields into indexer (document)• How to execute results (if we need different

content types on page)• Faceted api (if we need custom blocks)

D7: ADDING TO INDEX

D7: EXECUTE THE SEARCH

D7: FACETED API

EXAMPLE: CASINO.AT

EXAMPLE: CASIONO.AT OVERLAY

SOLR VS. SPHINX

• Numbers? Nooo, just integration with Drupal– Both modules provide faceted search– Sphinx module for drupal 6 in dev but it works :)– Sphinx is not so popular in Drupal community– Indexing difference– How easy to integrate?

EXAMPLE: SPHINX CONFIG

EXAMPLE: SPHINX SEARCH RUN

EXAMPLE: JOBBX.SE

CONCLUSION

• Sphinx is fast (makes craigslist’s search fly)• With sphinx you can run indexes as you want• With sphinx you will enjoy your time

optimizing MySQL queries• But if you need good and fast solution just go

with Solr

Useful links

• CONFIGURING APACHE SOLR MULTI-CORE WITH DRUPAL AND TOMCAT ON UBUNTU 9.10

• Displaying CCK field data in Solr results• Comparison Between Solr And Sphinx Search

Servers

top related