Slide 1

Slide 1 text

+

Slide 2

Slide 2 text

$ whoami Sebastian Grodzicki 
 • Senior Engineering Manager at • ex-CTO at GoldenLine & SHOWROOM • SensioLabs Certi fi ed Symfony Developer @sebgrodzicki

Slide 3

Slide 3 text

Elastic Stack

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

Vanilla PHP

Slide 6

Slide 6 text

O ffi cial low-level client for Elasticsearch • O ffi cial PHP client for Elasticsearch: elastic/elasticsearch-php • Updated and released with the Elastic Stack version • Uses connection pool for cluster con fi guration • Exposes the Elasticsearch APIs using functions of a Client class • Each function returns the body of a HTTP response from Elasticsearch or a boolean value for HEAD API (e.g., Index exists API)

Slide 7

Slide 7 text

O ffi cial low-level client for Elasticsearch

Slide 8

Slide 8 text

. . Semantic Versioning 7 11 1 major minor patch

Slide 9

Slide 9 text

O ffi cial low-level client for Elasticsearch

Slide 10

Slide 10 text

O ffi cial low-level client for Elasticsearch

Slide 11

Slide 11 text

O ffi cial low-level client for Elasticsearch

Slide 12

Slide 12 text

Elastica • Community-driven PHP client for Elasticsearch: ru fl in/ Elastica • Built on top of o ffi cial low-level client • Object-oriented instead of using associative arrays

Slide 13

Slide 13 text

Elastica

Slide 14

Slide 14 text

Elastica

Slide 15

Slide 15 text

FOSElasticaBundle • Integrates the Elastica library into a Symfony environment • Use JmsSerializer or Symfony Serializer to convert between PHP objects and Elasticsearch data • Index con fi guration for Elasticsearch, or send data without con fi guration to use the dynamic mapping feature of Elasticsearch • Listeners for Doctrine events for automatic indexing

Slide 16

Slide 16 text

FOSElasticaBundle Elasticsearch 7.x

Slide 17

Slide 17 text

FOSElasticaBundle

Slide 18

Slide 18 text

FOSElasticaBundle

Slide 19

Slide 19 text

FOSElasticaBundle

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

Demo

Slide 22

Slide 22 text

No content

Slide 23

Slide 23 text

Controller

Slide 24

Slide 24 text

Doctrine entity class

Slide 25

Slide 25 text

Data fi xtures

Slide 26

Slide 26 text

Elasticsearch index con fi guration

Slide 27

Slide 27 text

Aliased Indexes

Slide 28

Slide 28 text

Aliased Indexes • talk_2021-02-26-182155 • talk_2021-03-12-104500 • talk_2021-03-12-112000 ← talk

Slide 29

Slide 29 text

Mappings

Slide 30

Slide 30 text

Populating

Slide 31

Slide 31 text

Searching via CLI

Slide 32

Slide 32 text

Searching via controller

Slide 33

Slide 33 text

Autowiring

Slide 34

Slide 34 text

Searching for "Sebastian"

Slide 35

Slide 35 text

Searching for "Symfony"

Slide 36

Slide 36 text

Searching for "Kuba"

Slide 37

Slide 37 text

Searching for "Jakub"

Slide 38

Slide 38 text

Synonyms

Slide 39

Slide 39 text

Searching for "Jakub"

Slide 40

Slide 40 text

Kuba != Kuba

Slide 41

Slide 41 text

Tajemnica turkusowego łabędzia

Slide 42

Slide 42 text

Tajemnica turkusowego łabędzia

Slide 43

Slide 43 text

Tajemnica turkusowego łabędzia

Slide 44

Slide 44 text

Tajemnica turkusowego łabędzia

Slide 45

Slide 45 text

Tajemnica turkusowego łabędzia

Slide 46

Slide 46 text

Tajemnica turkusowego łabędzia

Slide 47

Slide 47 text

Tajemnica turkusowego łabędzia

Slide 48

Slide 48 text

Morfologik Polish Lemmatizer plugin for Elasticsearch

Slide 49

Slide 49 text

Morfologik Polish Lemmatizer plugin for Elasticsearch

Slide 50

Slide 50 text

Morfologik Polish Lemmatizer plugin for Elasticsearch

Slide 51

Slide 51 text

Hosting

Slide 52

Slide 52 text

Docker

Slide 53

Slide 53 text

SymfonyCloud Latest is 7.11

Slide 54

Slide 54 text

Elastic Cloud

Slide 55

Slide 55 text

Want more?

Slide 56

Slide 56 text

Elastic Logs

Slide 57

Slide 57 text

Elastic Metrics

Slide 58

Slide 58 text

Elastic APM

Slide 59

Slide 59 text

Q&A

Slide 60

Slide 60 text

Thank you!