How to Configure Solr Search on Your Site

Post on 15-Jan-2015

965 views 3 download

description

 

Transcript of How to Configure Solr Search on Your Site

Exploring the world of Search

Who

Nick VeenhofSenior Search Engineer at Acquia

@Nick_vhhttp://nickveenhof.be

Drupal Core Search

Cron.php Indexing process

Drupal Core Search

• HTML Tag Scores• <H1> = 25• <H2> = 18

• Accent Removal• Montréal => Montreal

• Stemming• skips, skipping = skip

Tip: Use porterstemmer to improve stemming in Drupal Core Search

Drupal Core Search

• SQL Not optimized for full text search

• Limited Operators• Slow and not scalable

enough• Stemming needs to happen

in the PHP side, not optimized

• Dead ends

Alternatives

• Google Custom Search• Fuzzy Search• Elasticsearch• Google Search Appliance• …

Apache Solr Search

Search API (+ Solr)

What is Solr?

• Based on Lucene• Written in Java, needs Java container

such as Tomcat or Jetty• Separate Server• Mathematical Indexing• Fast!• Replication / Solr Cloud• Multiple indexes (Multicore)• Which version to choose?

Architecture

Webserver/Drupal

*SQL

Solr

GET or POSTsearch

POSTindex

DIY?

http://nickveenhof.be/blog/simple-guide-install-apache-solr3x-drupal7

Careful…

• No Security• High Availability is not trivial

Drupal Modules

Apache Solr & Search API

• In Common• Search pages• Solr Search• Facet API• Autocomplete• Attachments• Sorting• Solr Configs!• …

• Differences• Architected for multisite• Architected for large-scale sites• Optimized for Solr and

fault-tolerant

• Location based Search• Views based

Time for a demo!

Modules Used in Demo

• Search keywords (apachesolr)• Spelling corrections (apachesolr)• There is an autocomplete textbox (apachesolr_autocomplete)• Autocomplete also has the spelling corrections + shows the amount of results of your

query (apachesolr_autocomplete)• facets (facetapi)

• facets with a tagcloud (facetapi_tagcloud)• facets with checkboxes (facetapi)• facets with a slider (facetapi_slider)• facets that are collapsible (facetapi_collapsible)• facets with range -> http://drupal.org/project/date_facets

• sort block (tuned by apachesolr_sort)• relevancy tuning (apachesolr_proximity)• Display Suite search result theming, optimized for Apache Solr(ds & ds_search)• Attachment search. (apachesolr_attachments)• Clean URL's of facets. (facetapi_pretty_paths)• More like this. (apachesolr)

Powered by Free Tier Search (acquia_connector + acquia_search)

Acquia Search for Free!

• Try and test the abilities of Apache Solr for Free with Acquia Cloud Free.

• Acquia Cloud Free – Your very own Drupal Innovation Test Bed. Explore and Learn.

• Acquia Search – Starter Kit for Free comes with:

2,000 queries/ month 5000 docs indexed

QuestionsFor more information visit:http://www.acquia.com

Contact us: sales@acquia.com or 888.9.ACQUIAFollow us: @acquia

For more product information visit:docs.acquia.com

Today’s webinar recording will be posted to:http://acquia.com/resources/recorded_webinars