SlideShare a Scribd company logo
1 of 34
Download to read offline
SEARCH MET SOLR
DRUPALJAM 17 MEI 2013
JUR DE VRIES TRIQUANTA
PROGRAMMA
Wie ben ik
Wat verwachten we van een zoekmachine?
Andere oplossingen
Wat biedt Solr?
Drupal integratie
Demo
Taal: belangrijk!
Extend de basis
WIE BEN IK?
Jur de Vries
Developer bij en mede-oprichter van Triquanta
Mede-organisator Drupal Tech Talk
Gespecialiseerd in Solr samen met Drupal
Sites gebaseerd op Solr
Nationale ombudsman
Maastrichtnet
Gemeentemuseum: zoekmachine MuS
Migraties, custom modules, koppelingen etc.
WAT VERWACHTEN WE (JULLIE) VAN
EEN ZOEKMACHINE
Veel (alles) wat google biedt:
Autocomplete
Spellings suggesties
Goede relevantie
Ranges (afgelopen jaar)
Snelheid!
Facets
Stemming
...
ANDERE OPLOSSINGEN
Google
Database search
Op Lucene gebaseerde oplossingen
GOOGLE
Google site search
Betaald (vanaf $100,-- per jaar)
Makkelijk op te zetten
Google technology!
Google Search Appliance
Betaald (hoeveel??)
Indexeert bijna alles
Google technology! (Dat kent de bezoeker!)
Mooie gele doos :-)
MAAR...
Stel je wilt een auto voor boodschappen...
Caterpillar maakt goede trucks...
Maar maken ze ook goede boodschappen auto's?
Kleine boodschappen???
NADELEN GOOGLE
Wat voor groot werkt, werkt niet altijd voor klein
Geoptimaliseerd voor het hele web!
Duur
Weinig instelmogelijkheden
Wat gebeurt er onder de motorkap???
We waren toch Open Source?
DATABASE SEARCH
Standaard Drupal search sucks
Search API (contrib) database search beter
Schaalbaarheid slecht!!!
Spellings suggesties? Neuh
Facets? moeilijk
Stemming? moeilijk
OP LUCENE GEBASEERDE OPLOSSINGEN
Lucene is de zoekmachine waarop Solr draait!
Apache Nutch
Google-achtig: webpagina's
Niet geschikt voor ons doel
Elastic search
Gelijkwaardig aan Solr
ELASTIC SEARCH?
SOLR
WAT IS SOLR?
Gebaseerd op Lucene
Apache LuceneTM is a high-performance, full-featured text search engine library written
entirely in Java. It is a technology suitable for nearly any application that requires full-
text search, especially cross-platform.
Draait in java servlet container, bijvoorbeeld tomcat of jetty.
Rest interface
WAT KAN SOLR
Snel zoeken
Near realtime indexing
Result highlighting
Facets
Spellings suggestions (did you mean?)
Autocomplete
Search in files (met Apache Tika)
Stemming
Geospatial search
More like this
Relevantie tweaking!
AJAX
FACETS
STEMMING
Vossen -> vos
Lopen -> loop
DRUPAL SOLR INTERACTIE
Drupal zend entities naar Solr
Solr indexeert entity (node)
Drupal doet zoekvraag naar Solr via GET
Solr zend resultaten terug naar Drupal (json, xml, php)
Drupal parsed resultaten en geeft weer
INSTALLATIE
Download solr (4) van http://lucene.apache.org/solr/ (NIET DE SOURCE)
Download de apachesolr module (of search api met search api solr)
Pak solr uit
Kopieer de configuratie bestanden vanuit de apachsolr module naar:
Enable de module
DEMO
IS HET ZO SIMPEL?
Ja, maar let op!
TAAL
Wat was stemming ook alweer?
In welke taal gebeurt dit???
En wat doen we met woorden als de, het en een??
We moeten de configuratie van Solr aanpassen!
Schrik niet, valt mee!
Slechts 2 regels...
Schema.xml
MAAR WORDT BIJNA ALTIJD
VERGETEN!!!
SCHEMA.XML
Definieert type velden
Definieert hoe tekst velden geanalyseerd worden
Stemming: solr.SnowballPorterFilterFactory Dutch of Kp
Stopwords: pas stopwords.txt aan
DEMO
BEVEILIGING
Dit werkt lokaal
Probleem op productie server??
Document injection
Zet poorten dicht! (8983, 8080)
RELEVANTIE
Meest recente artikelen hogere score
Ene node type relevanter dan andere
Hoeveelheid commentaar
Allemaal in te stellen!
RELEVANTIE 2
Solr biedt meer mogelijkheden tot relevantie tweaking:
Specifieke documenten bovenaan
Boost functions
Boost queries
Specifieke ranking parameters
Met kennis van Solr relatief simpel aan te passen
EXTEND SOLR MET
ANDER CONTRIBS
Documenten doorzoeken: Apache Solr Attachments
Door meerdere site zoeken: Apache Solr Multisite search
Geospatial search: Apache Solr Location
Autocomplete: Apache Solr Autocomplete
VIEWS INTEGRATIE!
Gebruik Apache Solr Views
Goed voor performance!
Geen database queries nodig!
Voorbeeld: Maastrichtnet
CONCLUSIE
Als je een goede zoekmachine wil: Solr!
VRAGEN?

More Related Content

Featured

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Featured (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Search met solr

  • 1. SEARCH MET SOLR DRUPALJAM 17 MEI 2013 JUR DE VRIES TRIQUANTA
  • 2. PROGRAMMA Wie ben ik Wat verwachten we van een zoekmachine? Andere oplossingen Wat biedt Solr? Drupal integratie Demo Taal: belangrijk! Extend de basis
  • 3. WIE BEN IK? Jur de Vries Developer bij en mede-oprichter van Triquanta Mede-organisator Drupal Tech Talk Gespecialiseerd in Solr samen met Drupal Sites gebaseerd op Solr Nationale ombudsman Maastrichtnet Gemeentemuseum: zoekmachine MuS Migraties, custom modules, koppelingen etc.
  • 4. WAT VERWACHTEN WE (JULLIE) VAN EEN ZOEKMACHINE Veel (alles) wat google biedt: Autocomplete Spellings suggesties Goede relevantie Ranges (afgelopen jaar) Snelheid! Facets Stemming ...
  • 5. ANDERE OPLOSSINGEN Google Database search Op Lucene gebaseerde oplossingen
  • 6. GOOGLE Google site search Betaald (vanaf $100,-- per jaar) Makkelijk op te zetten Google technology! Google Search Appliance Betaald (hoeveel??) Indexeert bijna alles Google technology! (Dat kent de bezoeker!) Mooie gele doos :-)
  • 7.
  • 9. Stel je wilt een auto voor boodschappen... Caterpillar maakt goede trucks...
  • 10. Maar maken ze ook goede boodschappen auto's? Kleine boodschappen???
  • 11. NADELEN GOOGLE Wat voor groot werkt, werkt niet altijd voor klein Geoptimaliseerd voor het hele web! Duur Weinig instelmogelijkheden Wat gebeurt er onder de motorkap??? We waren toch Open Source?
  • 12. DATABASE SEARCH Standaard Drupal search sucks Search API (contrib) database search beter Schaalbaarheid slecht!!! Spellings suggesties? Neuh Facets? moeilijk Stemming? moeilijk
  • 13. OP LUCENE GEBASEERDE OPLOSSINGEN Lucene is de zoekmachine waarop Solr draait! Apache Nutch Google-achtig: webpagina's Niet geschikt voor ons doel Elastic search Gelijkwaardig aan Solr
  • 15. SOLR
  • 16. WAT IS SOLR? Gebaseerd op Lucene Apache LuceneTM is a high-performance, full-featured text search engine library written entirely in Java. It is a technology suitable for nearly any application that requires full- text search, especially cross-platform. Draait in java servlet container, bijvoorbeeld tomcat of jetty. Rest interface
  • 17. WAT KAN SOLR Snel zoeken Near realtime indexing Result highlighting Facets Spellings suggestions (did you mean?) Autocomplete Search in files (met Apache Tika) Stemming Geospatial search More like this Relevantie tweaking!
  • 18. AJAX
  • 21. DRUPAL SOLR INTERACTIE Drupal zend entities naar Solr Solr indexeert entity (node) Drupal doet zoekvraag naar Solr via GET Solr zend resultaten terug naar Drupal (json, xml, php) Drupal parsed resultaten en geeft weer
  • 22. INSTALLATIE Download solr (4) van http://lucene.apache.org/solr/ (NIET DE SOURCE) Download de apachesolr module (of search api met search api solr) Pak solr uit Kopieer de configuratie bestanden vanuit de apachsolr module naar: Enable de module
  • 23. DEMO
  • 24. IS HET ZO SIMPEL? Ja, maar let op!
  • 25. TAAL Wat was stemming ook alweer? In welke taal gebeurt dit??? En wat doen we met woorden als de, het en een?? We moeten de configuratie van Solr aanpassen!
  • 26. Schrik niet, valt mee! Slechts 2 regels... Schema.xml MAAR WORDT BIJNA ALTIJD VERGETEN!!!
  • 27. SCHEMA.XML Definieert type velden Definieert hoe tekst velden geanalyseerd worden Stemming: solr.SnowballPorterFilterFactory Dutch of Kp Stopwords: pas stopwords.txt aan DEMO
  • 28. BEVEILIGING Dit werkt lokaal Probleem op productie server?? Document injection Zet poorten dicht! (8983, 8080)
  • 29. RELEVANTIE Meest recente artikelen hogere score Ene node type relevanter dan andere Hoeveelheid commentaar Allemaal in te stellen!
  • 30. RELEVANTIE 2 Solr biedt meer mogelijkheden tot relevantie tweaking: Specifieke documenten bovenaan Boost functions Boost queries Specifieke ranking parameters Met kennis van Solr relatief simpel aan te passen
  • 31. EXTEND SOLR MET ANDER CONTRIBS Documenten doorzoeken: Apache Solr Attachments Door meerdere site zoeken: Apache Solr Multisite search Geospatial search: Apache Solr Location Autocomplete: Apache Solr Autocomplete
  • 32. VIEWS INTEGRATIE! Gebruik Apache Solr Views Goed voor performance! Geen database queries nodig! Voorbeeld: Maastrichtnet
  • 33. CONCLUSIE Als je een goede zoekmachine wil: Solr!