Search api d8

21
Search in Drupal 8 Nick Veenhof @Nick_vh

description

Search in Drupal 8 with Search API

Transcript of Search api d8

Page 1: Search api d8

Search in Drupal 8Nick Veenhof

@Nick_vh

Page 2: Search api d8

What?

Page 3: Search api d8

What• Apache Solr

• Search API

• Facet Api

• Lucene

• Solr

• Elastic Search

• Sh*t ton of duplicate modules

• Crying babies

• …

Page 4: Search api d8

Drupal 7• Drupal 7 had two solutions. It was

either one or the other.

• Both solutions had compelling use-cases.

• multisite searching

• views integration

• federated search, flexibility

• And they couldn't get along for a common solution yet :(

• Common Schema and Connection Classes

Page 5: Search api d8

Why?

Page 6: Search api d8

Drupal 8• Drupal 8 Search needed some

love and no more "my solution is better"

• Drupal 8 Search did not need to choose between both. Maintainers could work together.

• Drupal 8 Search is going to do exactly that.

• www.acquia.com/blog/battleplan-search-solr-drupal-8

Page 7: Search api d8

How?

Page 8: Search api d8

How• Drupal Dev Days, MD-

Systems Sprint, Intracto Sprint, Drupal.be Sprint Day and Drupalfund.us

• Combining use-cases that need to work for both

• Compromises need to be made, but we are working towards the same goal.

http://drupal.be/

Page 9: Search api d8

Changes?

Page 10: Search api d8

Changes• Search API D8 will support multiple entity types

(nodes, users, feeds) in 1 index.

• Search API D8 will support this also in views.

• Search API D8 will support multilingual out of the box.

• Search API Solr D8 will support multisite searching. Think of Drupal 6, Drupal 7, Drupal 8 in 1 search page.

• Search API Solr D8 will use an external library for the connection.

Page 11: Search api d8

Changes• Search API D8 will come a default index and server.

• Search API D8 will come with sensible default fields.

• Search API D8 will hopefully get enough UX reviews. We have some very ambitious goals.

• Search API D8 will stay flexible

• Search API D8 ElasticSearch got its own GSOC Student! Thanks Prateek and Google.

• Facet API? We’re still discussing that, but we’d love your input.

Page 12: Search api d8

Basic Architecture

Server Index ViewsFacet API

…• Technical implementation • Uses database/Solr/… • Search how?

• Generic information • Datasources (Types) • Fields • Processing • Search what?

Page 13: Search api d8

Server

• Configuration Entity

• Uses plugin "service class" for operations (Solr for example)

• Stores Specific server such as the connection details

Page 14: Search api d8

Service Class

• Indexing, Deleting, Searching

• Allows reactions to changes

• Connects to Storage (Solr)

Page 15: Search api d8

Index

• Configuration entity

• Datasources. See the plural form?

• Has a tracker. Pluggable! Priority Queues anyone?

Page 16: Search api d8

Tracker

• Pluggable way of tracking what needs to be indexed

• Tracking new/changed/deleted items

Page 17: Search api d8

Datasource

• Index plugin providing the item types

• Loading, viewing, metadata for types

• Type-specific configuration

Page 18: Search api d8

Processors

• Plugins attached to index

• Alter indexed items and search queries

• (Fused with D7 „data alterations“)

Page 19: Search api d8

Views• Rendered View Mode

• Fields

• Search Result

• Supports multiple Datasources out of the box

• External datasource allows for mixing and matching.

Page 20: Search api d8

Demo

• Client asks: Make the Drupal Planet Searchable and include my own node content and users also.

• You Say: OK!

Page 21: Search api d8

Demo!