Apache Solr Search Course Drupal 7 Acquia
- 5. Why do you need search?
• Commerce - increase sales?
• Large amounts of data?
• Connecting people to information?
!
• Share some examples!
- 6. Our sample travel site
• Administration > Structure > Content types
• Administration > Reports > Field list
- 8. Drupal 7 core search
• Interval defines how often updated content is
being processed and sent to the index.
Cron.php
Indexing
process
- 9. Core search indexing
• HTML Tag Scores!
• <H1> scored at 25 !
• <H2> scored at 18!
• Headings have higher
scores than content.!
• Accent Removal!
• Montréal => Montreal!
• Stemming!
• skips, skipping also
means “skip”
- 10. Core search limitations
• SQL Not optimized
for full text search!
• Limited Operators!
• Slow/not scalable!
• Stemming happens
on PHP side, not
optimized!
• Dead ends
- 11. Demo: Core search
• Load up Drupal core search
• Confusing UI
• Advanced search? Users don’t use it.
• Confusing UI of Search page
• Can’t customize options
• Index?
• Limitations for fine-tuning
- 12. Exercise 1: Core search
configuration
• Load up Drupal core search
• Confusing UI
• Advanced search? Users don’t use it.
• Confusing UI of Search page
• Can’t customize options
• Index?
• Limitations for fine-tuning
- 13. Dead ends....
• A bad landing page, with no suggestions.
• “Don’t make me think”.
- 15. Alternatives to core search
• Full services:!
• Google’s Custom
Search !
• Google Search
Appliance!
!
• Indexing software:!
• Fuzzy Search!
• Elasticsearch!
• Apache Solr
- 16. Apache Solr
• Based on Lucene!
• Written in Java; uses
container such as
Tomcat or Jetty!
• Mathematical
Indexing!
• Replication / Solr
Cloud!
• Multiple indexes
(Multicore)
- 17. Apache Solr
• Separate Server!
• Indexes your site!
• Widely used and
tested
GET (POST)
Search
*SQL
Web
ServerPOST
index
Solr
- 20. Customizing Solr
• Improve the Index
• What Solr is storing
• How Solr indexes information
• Improve the Query
• What is being requested from Solr
• Improve the Results
• What is displayed to the user, and how they
navigate the search experience
http://2012.pnwdrupalsummit.org/sessions/customizing-apache-solr-search-experience
- 25. “More like this”
• Example from NIH.gov:
Instead of using Entity reference fields.
• You can configure multiple suggestion blocks
for specific content types or site sections.
- 27. Demo: What comes
with Solr?
• Enable the modules.
• Index the site. What is indexed?
• Spelling correction offered out of the box,
difference with core search.
• Re-index, when does “cron” run?
• More like this block, place and configure.
• Search page configuration under Pages/
blocks.
- 28. Exercise 2: Configure Solr search
• A. Ensure search is installed and enabled
• B. Index site
• C. Review default results
• D. Configure your search page
• E. Place a “more like this” block on your site.
- 31. Optmization options
• Phrases
• Search for sentences, phrases
• Optimize search for specific use cases
• More recent content, is it more relevant?
• Content with comments, are they more useful?
• Body content, use of H2 and H3?
• Synonyms
• synonyms.txt -
- 33. Exercise 3:
Optimize your search results
A.Test search before changes
B.Improve the result biases
C.Testing the changes; how to check the
Index
D.Improve term proximity results
E.Improve bias based on fields and terms
- 38. Offer facets people need
Do clients sort by
name?
Use facets and
sorting which
influence
decisions.
!
Material
Color, etc
made.com, not a drupal site
- 39. Tips to define facets
• Listen to users
• Analyze query logs to define facets.
• Use popular words to label facets.
• Check competitors and across your industry.
• Choose important facets
• On which facets do people make decisions?
• Which features influence a purchase?
• Plan content types for searching
• Depends on your content model, taxonomy, fields!
http://uxdesign.smashingmagazine.com/2009/12/08/principles-of-effective-e-commerce-search/
- 40. How are our users searching?
• What facets would you enable on this site?
- 42. About Facets
• For each facet you configure:
• A display widget
• A corresponding query type.
• A block to place, some examples:
- 43. Example display widgets
With Facet API Additional modules
Links Tag cloud
drupal.org/project/facetapi_tagcloud
Links with checkboxes Slider
drupal.org/project/facetapi_slider
- 44. Demo: Configuring facets
• Enable the module.
• Review options for configuring facets for
different displays.
• Display widgets, relate to specific queries.
- 45. Exercise 4:
Configure a facet slider
• A. Configure the facet options
• B. Place the population facet block
• C. Test the search
• D. Enable the slider for display
• E. Test the search again
- 48. Established standards
• Users expect the search form to be... where?
• Queries
• Should be easy to refine
• Incremental construction
• Results
• Display the query
• Easy to read key information
http://uxdesign.smashingmagazine.com/2009/12/08/principles-of-effective-e-commerce-search/
- 49. Beyond the defaults
• Limitations:
• Default results don’t show relevant data specific to
your site: dates, numerical data, location maps.
• Better:
• Landing page revealing the content
• Better search bar with suggestions!
• Key information in results with custom displays.
• Paths which are easy to share and navigate.
- 55. Demo: Apache Solr
Autocomplete
• Enable Apache Solr Auto Complete.
• Uses stemming so verb forms are picked up
as well.
• Becoming standard, what users want.
- 56. Demo: Rich snippets
• Replicates Google’s results; Needs RDF!
Tip: If you install
this during demo,
please ensure to
disable this for
next exercise
- 60. Display Suite!
• Display Suite +
Display Suite Search !
• (and Display Suite UI)!
• Custom layout!
• Select which fields to
display!
• Multiple columns,
headers and footers.
- 66. Demo: Display Suite
• Enable Display Suite, Display Suite Search,
Display Suite UI
• Modify display and change layout for
“Search result”
• Show what “Search index” provides.
- 70. Location data in search
• Takes the
coordinates
of the search,
and returns
to the query.
- 71. Demo: Location results
• Use Display Suite to display a location on a
Map.
• Which modules work best
• Tips about handling Location data
!
• A custom code example- using location as a
factor in search.
• Search training Location module
• Location Search module