Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Elasticsearch + Symfony @ SymfonyLive Online Po...

Elasticsearch + Symfony @ SymfonyLive Online Polish Edition 2021

Elasticsearch to najpopularniejsza wyszukiwarka pełnotekstowa o potężnych możliwościach. Jako programista PHP z kilkunastoletnim stażem, a obecnie pracownik Elastic (twórców Elasticsearch) chciałbym się z Wami podzielić najlepszym z obu światów.

Sebastian Grodzicki

March 12, 2021
Tweet

More Decks by Sebastian Grodzicki

Other Decks in Programming

Transcript

  1. +

  2. $ whoami Sebastian Grodzicki 
 • Senior Engineering Manager at

    • ex-CTO at GoldenLine & SHOWROOM • SensioLabs Certi fi ed Symfony Developer @sebgrodzicki
  3. 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)
  4. 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
  5. 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
  6. Q&A