Денис Головняк - Продвинутый поиск с помощью search api

35
Advanced search with Search API

Upload: ledc-2014

Post on 24-Jun-2015

189 views

Category:

Internet


8 download

DESCRIPTION

Доклад о поиске с помощью Search API

TRANSCRIPT

Advanced search with Search API

Requirements to the site search

!  Keyword search

!  Fulltext search

!  Stemming (morphological search)

!  Autocomplete

!  Spellcheck

!  Faceted search

!  Fuzzy search

!  Wildcard search

Indexing

Types of implementations

!  Building DB inverted indexes

!  Using search engines separately (solr, sphinx, xapian)

!  External search engines

Drupal search modules

!  Drupal native search

!  Advanced search

!  Search API

!  Google CSE

!  Google search appliance

!  Apachesolr

!  …

Search module backwards

!  Search nodes only

!  Search other content (users, contrib modules) only on

!  No facets

!  Limited advanced search capability

!  Limited menu router/form API usage

!  Light framework means search modules duplicate functionality (facets, back-end connection, result theming etc)

Search API

!  Framework for easily creating searches

!  Abstracts from data sources and backend implementations

!  Large ecosystem with extensions, e.g. backends

!  Facet API integration

!  Heavily based on Entity API

!  Index any data

!  Views integration

!  Indexing workflow freely configurable

!  Features support for exporting

Search API architecture

Search API extensions

!  Backends !  Apache Solr

!  Database !  Xapian

!  Sphinx !  Fuzzy Search !  …

!  Features !  Facets API

!  Search API Autocomplete

!  Spellcheck !  Attachments !  Saved Searches

!  Search Location !  Pretty Facets Paths !  Multi-index search

!  View !  SAPI Pages !  Views !  Custom

Recipes: #1- Subtitle search

(OOTB)

Result

Modules

!  SAPI (search_api)

!  SAPI Views (search_api_views)

!  Solr Search OR Database Search (search_api_solr OR search_api_db)

!  SAPI autocomplete (search_api_autocomplete)

!  Search Facets (search_api_facets)

!  SAPI Spellcheck (search_api_spellcheck)

!  Facet API (facetapi)

Search API: Landing page

Creating a Server

Creating a Server: Database

Creating a Server: Solr

Creating an Index

Checking Index

Configuring an Index: Fields

Configuring an Index – Part I

Part II

Configuring an Index: Facets

Recipes: #2- Locator search

(OOTB)

Result – Part I

Result – Part II

Modules

!  SAPI location (search_api_location)

!  SAPI location views (search_api_location_views)

!  Geofield (geofield)

!  GeoPHP (geophp)

!  Geocoder (geocoder)

Configuring Index: Location

Configuring Location Exposed Field

API Overview

!  CRUD hooks for indexes and servers

!  Hooks for adding !  data sources

!  backends !  data alterations !  processors

!  Hook fired when indexing items

!  Hook fired when executing a search

Implementing a Backend - Part I

Implementing a Backend - Part II

Implementing a Backend - Part I

Search API Query Alter

Search API Solr Query Alter

Questions ?