State of Search in
Drupal 8
Nick Veenhof & Joris Vercammen
Nick Veenhof
Ghent
Barcelona
Boston
Lisbon
+8 Years in Drupal
Search++
4 years at Acquia
Principal Software Engineer
@Nick_vh
Joris Vercammen
Mechelen
+7 years PHP
61 core commits
+3 years Drupal
Facet Api Tech Lead
Freelancer
@borisson
Overview
• Created 2010 (for Drupal 7)
• Based on suggestions for Core Search
• Generic and flexible search tools
• Different data
• Different search engines
• Different types of user interfaces
The Big Merge
• 3 years in the making
• Crowdfunding campaign
• Drupal Dev Days & Drupalcon sprints
• Dedicated Sprint
• Google Summer of Code
• Lots and lots of tests
• Apache Solr for Drupal 7 stays
• Apache Solr for Drupal 6 is dead
The Drupal.org influence
• Issue queues in Drupal 8 are powered with Search
API Drupal 7 using the MySQL backend.
• Lots of optimizations happened due to this
adoption
• MySQL Backend more stable
The Community influence
• drunkenmonkey
• Thomas Seidl
• mollux
• Matthias Michaux
• berdir
• Sascha Grossenbacher
• amateescu
• Andrei Mateescu
• ekes
• Ekes
• alarcombe
• Andrew Larcombe
• aspilicious
• Bram Goffings
• freblasty
• Frédéric Hennequin
• And Many many more!
…
Thank you all!
Basic Architecture
• Search index
• Generic information
• Search what?
• Search server
• Actual storage/retrieval
• Can use database, Solr, etc.
• Search how?
• Views / Search API Pages
• Search Display?
Index items immediately
• Pro
• No stale data
• Security concerns
• User experience
• Contra
• Performance. Batch updating is messy.
• Not using tracking table.
• Takes longer before result is searchable.
• Inconsistent data with Solr Replication vs
Solrcloud.
https://www.youtube.com/watch?v=dQhmMaAYRkc
Basic Usage of Search API
Solr
• Search API Solr with Solr 5
• Works natively with Search API.
• Tip: Use index Rendered Item with a view mode
Basic Usage of Search API
Solr
https://www.youtube.com/watch?v=nRM_RWHpqHw
What still needs to happen?
• Simplified UI
• More Views-like UI for “Fields”
• Wizard for easy search creation (Think Views)
• Indexing performance
• Caching
• Operators
• Solr
• Multi-site searching proof of concept across
Drupal 7 and Drupal 8 (Apachesolr + Search
API)
What’s more?
• Search API
• Alpha 9 Release
• Facet API
• Working Development version
• Search API Page
• Alpha Release
• Search API Solr
• Working Development Release
• Elastic Search
• Working Development version
Facet api
Joris Vercammen
Overview
Overview
• Architecture changes
• Custom processor
• Context system
• Demo
• Todo
• Community
Overview
• Architecture changes
• Custom processor
• Context system
• Demo
• Todo
• Community
Architecture changes
• d7: Facets (hook_facetapi_facet_info)
• d8: Facet (entity)
@ConfigEntityType(

id = "facetapi_facet",

label = @Translation(“Facet”)

);
Architecture changes
• d7: Searchers (hook_facetapi_searcher_info)
• d8: FacetSource (Plugin)
Architecture changes
• d7: Realms (hook_facetapi_realm_info)
• d8: Gone
Architecture changes
• d7: Facet adapter (hook_facetapi_adapters)
• d8: Facet manager service
Architecture changes
• d7: Query types (hook_facetapi_query_types)
• d8: Query types plugins
Architecture changes
• d7: widget (hook_facetapi_widgets)
• d8: Widget plugin
Architecture changes
• d7: Filters (hook_facetapi_filters)
• d8: Processors (plugin)
Architecture changes
• d7: Sort widget (hook_facetapi_sort_info)
• d8: Processors (plugin)
Architecture changes
• d7: url processor (hook_facetapi_url_processors)
• d8: Processors (plugin)
Overview
• Architecture changes
• Custom processor
• Context system
• Demo
• Todo
• Community
Custom processors
• “FacetApiProcessor”
• Implement a processor interface
• Implement the required method
• Optionally provide a form and a schema definition
Custom processors
• https://github.com/borisson/facetapi-processor-
example
Overview
• Architecture changes
• Custom processor
• Context system
• Demo
• Todo
• Community
Context
• Core context system
Overview
• Architecture changes
• Custom processor
• Context system
• Demo
• Todo
• Community
Demo - Create Facet
https://www.youtube.com/watch?v=UlA6KkH-Kto
Demo - Place block
https://www.youtube.com/watch?v=6L5ucTCR94Y
Demo
https://www.youtube.com/watch?v=0AY3GHSqslk
Overview
• Architecture changes
• Custom processor
• Context system
• Demo
• Todo
• Community
Todo
• Finish Search API integration
• Integration with core
• Porting all the processors
• Polish UI
• Integration & Unit Tests
Overview
• Architecture changes
• Custom processor
• Context system
• Demo
• Todo
• Community
Community
• #drupal-search-api
• Weekly hangouts (Monday @ 20:00)
• https://www.drupal.org/node/2580917
• Novice issues
Thank you
jeroent
frederico
swentel
mollux
mr.baileys
borisson_
Novitsh
mikeker
Wim Leers
netsensei
StryKaizer
jurcello
nick_vh
marthinal
Thank you
AlkaKumari
amateescu
Andrew Larcombe
arla
Artyom Miroshnik
berdir
borisson_
Bram Goffings
ChristianAdamski
daspeter
dmitrii
dmulindwa
dragos.dumitrescu
drunkenmonkey
ekes
el22or
Frédéric Hennequin
Frederico Taramaschi
Jasper Lammens
JeroenT
Joris Vercammen
joshi.rohit100
jsacksick
jurcello
Kevin Van Ransbeeck
lhangea
LKS90
LukyLuke_ch
m1r1k
marcvangend
Martin Micuch
Mattias Michaux
mkalkbrenner
mollux
nickvh
p-neyens
Peter Philipp
Pieter Frenssen
pjonckiere
pravin.ajaaz
prics
rashid_786
rpayanm
sdstyles
swentel
tstoeckler
Y.sa
State of Search, Solr and Facets in Drupal 8 - Drupalcamp Belgium 2015

State of Search, Solr and Facets in Drupal 8 - Drupalcamp Belgium 2015