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

SEAL - Dive into the sea of search engines - Sy...

SEAL - Dive into the sea of search engines - Symfony Live Berlin 2025

Alexander Schranz

April 03, 2025
Tweet

More Decks by Alexander Schranz

Other Decks in Programming

Transcript

  1. About me Name: Alexander Schranz Workplace: Sulu (sulu.io) Tools: PHP,

    Symfony, Twig, Elasticsearch, Redis ReactJS, MobX, React Native (Expo) Experience: Web Developer since 2012 Certified Symfony 5 Expert OSS: Symfony Redis Messenger ( 4.3 ) Broke Session Starts inside ESI ( 5.4 ) Symfony Stream JSON Response ( 6.3 ) Lock based Semaphore (maybe 7.3) @alexander-schranz, @alex_s_, @alexanderschranz.com
  2. What is SEAL? SEAL stands for Search Engine Abstraction Layer

    What flysystem is for file storage access and doctrine/dbal for databases, is SEAL for search engines / services. SEAL provides a single interface, to communicate with different engines / services. SEAL itself is framework agnostic, but provides integrations to your favorite frameworks.
  3. Why creating SEAL? - Unhappy with existing solutions: - massive/search-bundle,

    laravel/scout, nresni/Ariadne - Curiosity about different Search Engines - there is more as Elasticsearch - Every Search Engine has its own Jargon - SEAL should be beginner friendly not only search engine experts - For Everybody - Framework and CMS agnostic
  4. Defining the Schema Instead of telling how to store the

    data: types + storage attributes Tell what we want to do with the stored data: types + usages No search engine jargons: index: true, doc_values: true, keyword Understandable configurations: searchable, filterable, sortable
  5. Bulk actions Bulk actions support any iterable for saveDocuments and

    deleteDocumentIdentifier recommended is usage of Generators.
  6. Best practices The best practices are to keep your document

    also when it index complex model as simple as possible. This means that you concat data from different sources to one field. And create additional fields only for things which need to be searchable or filterable a special way.
  7. Packages cmsig/seal-elasticsearch-adapter cmsig/seal-opensearch-adapter cmsig/seal-meilisearch-adapter cmsig/seal-algolia-adapter cmsig/seal-redisearch-adapter cmsig/seal-solr-adapter cmsig/seal-typesense-adapter cmsig/seal-loupe-adapter cmsig/symfony-bundle

    cmsig/laravel-package cmsig/spiral-bridge cmsig/mezzio-module cmsig/yii-module cmsig/seal cmsig/seal-memory-adapter cmsig/seal-read-write-adapter cmsig/seal-multi-adapter
  8. Milestones 2022. Dec Research Project (schranz-search) 2023. May First Release

    0.1 — 7 Search Engines / 5 Frameworks 2023. Sep Loupe Support with 0.2 2024. Jan PHP 8.3 and Symfony 7 with 0.3 2024. Mar Laravel 11 Support with 0.4 2024. Sep GeoDistance and GeoBoundingBox 0.5 2024. Dec Bulk support and move repository to PHP-CMSIG 2025. Feb Highlighting support with 0.7
  9. Roadmap / What is coming next? Any ideas? Join the

    community on Github: https:/ /github.com/php-CMSIG/search/discussions Faceting / Aggregations Zero Downtime Reindexing StartWith and EndWith Conditions New Search Adapters (MongoDB, ParadeDB, Vespa, …) Static Factory for Conditions 💈 ⏰ ↔ 🌿 🏢
  10. What about ODM? – Classes instead of arrays The SEAL

    package will provide the fundamentals to communicate with different search engines, like doctrine/dbal. The ODM implementation will so be its own package like doctrine/orm. An ODM package is planned after SEAL is stabilized. Workaround currently use symfony/serializer normalizers. Maybe future implementation of a ODM for SEAL:
  11. Why SEAL? • No Vendor lock-in • Framework agnostic with

    integration into different Frameworks • Easy to tryout other Search Engines or change for different usages • Strict Schema • Backed by the PHP CMS-IG (Contao, Sulu, Typo3) • No rewrites for basics (reindex, add, update, remove documents) Hint: Use what you need, for special queries you still can use the client of your search engine. Add, Remove, Reindex can do SEAL, So if search engine need to be changed only your special query need be migrated.
  12. Time for your questions Give it a star ⭐ https://github.com/php-cmsig/search

    Github: @alexander-schranz Bluesky: @alexanderschranz.com X / Twitter: @alex_s_ Mastodon: [email protected]