Tips for Tuning Solr Search: No Coding Required
-
Upload
acquia -
Category
Technology
-
view
2.756 -
download
0
description
Transcript of Tips for Tuning Solr Search: No Coding Required
Tips for Tuning Solr Search: No Coding Required
Nick Veenhof Senior Search Engineer, Acquia
June 25, 2013
Welcome
Nick Veenhof Senior Search Engineer at Acquia @Nick_vh http://nickveenhof.be
Drupal Core Search
Cron.php Indexing process
Interval defines how often updated content is being processed and sent to the index.
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 Integration
Search API (+ Solr)
What is Solr?
• Based on Lucene
• Written in Java, needs Java container such as
Tomcat or Jetty
• Separate Server
• Mathematical Indexing
What is Solr?
• Fast!
• Replication / Solr Cloud
• Multiple indexes (Multicore)
• Which version to choose?
• 3.6.2 is very stable and proven to work with all
modules
• 4.3.1 If you want to be brave.
Architecture
Webserver/Drupal
*SQL
Solr
GET (POST) search
POST index
DIY?
https://www.acquia.com/blog/simple-guide-install-apache-solr-3x-drupal-7
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 the demo!
Modules Used in Demo • Apache Solr as your base set –
• Takes care of your search pages and spelling suggestions.
• Provides you with options to add suggestion blocks to your node pages,
referred to as “More Like This”.
• drupal.org/project/apachesolr
• Auto-Complete your Search Query-
• Autocomplete also has the spelling corrections and it also shows the number
of results to your search query
• drupal.org/project/apachesolr_autocomplete
Demo powered by Acquia Free Tier
Modules Used in Demo (Contd.) • Facets – • Adding some facets surely improves the transparency of your content and
allows for easier filtering of content to search through. • You can enable options to get links or checkboxes • drupal.org/projects/facetapi
• Tagclouds – • a list of keywords that relate to the current context using bigger fonts to
convey higher emphasis for particular keywords • drupal.org/projects/facetapi_tagcloud
• Slider Module • Make your numeric facets slide • drupal.org/projects/facetapi_slider
Demo powered by Acquia Free Tier
Modules Used in Demo (Contd.) • Allow your facet blocks to be collapsible -
• drupal.org/projects/facetapi_collapsible
• Data ranges to selected more recently created content -
• drupal.org/project/date_facets
• Modify the options you give customers to sort the returned data –
• drupal.org/project/apachesolr_sort
Demo powered by Acquia Free Tier
Modules Used in Demo (Contd.) • Please your users by having improved relevancy and boost more closely matched
relevancy tuning
• drupal.org/project/apachesolr_proximity
• Get Richer search snippets similar to the Google search results using RDFa and
Schema.org data.
• drupal.org/project/rich_snippets
Demo powered by Acquia Free Tier
Modules Used in Demo (Contd.) • Fully customize your snippet displays by using the Display Suite search result
support
• drupal.org/project/ds
• Search in documents and files such as pdf, docx, … when attached to a node.
• drupal.org/project/apachesolr_attachments
• Make the facet urls more readable and “pretty”
• drupal.org/project/facetapi_pretty_paths
Demo powered by Acquia Free Tier
Questions For more information visit:
http://www.acquia.com#
Contact us: [email protected] or 888.9.ACQUIA#
Follow us: @acquia###
Today’s webinar recording will be posted to:#http://acquia.com/resources/recorded_webinars#