Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork0
An integration of CMS-IG SEAL search abstraction into Laravel Framework. Part of thehttps://github.com/php-cmsig/search project. READ-ONLY Repository
License
PHP-CMSIG/seal-laravel-package
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Note:This is part of the
cmsig/searchproject create issues in themain repository.
Integration of the CMS-IG — Search Engine Abstraction Layer (SEAL) into Laravel.
Note:This project is heavily under development and any feedback is greatly appreciated.
Usecomposer for install the package:
composer require cmsig/seal-laravel-package
Also install one of the listed adapters.
The following adapters are available:
- MemoryAdapter:
cmsig/seal-memory-adapter - ElasticsearchAdapter:
cmsig/seal-elasticsearch-adapter - OpensearchAdapter:
cmsig/seal-opensearch-adapter - MeilisearchAdapter:
cmsig/seal-meilisearch-adapter - AlgoliaAdapter:
cmsig/seal-algolia-adapter - LoupeAdapter:
cmsig/seal-loupe-adapter - SolrAdapter:
cmsig/seal-solr-adapter - RediSearchAdapter:
cmsig/seal-redisearch-adapter - TypesenseAdapter:
cmsig/seal-typesense-adapter - ... more coming soon
Additional Wrapper adapters:
- ReadWriteAdapter:
cmsig/seal-read-write-adapter - MultiAdapter:
cmsig/seal-multi-adapter
Creating your own adapter? Add theseal-php-adapter Topic to your GitHub Repository.
The following code shows how to configure the package:
<?php// config/cmsig_seal.phpreturn [/* |-------------------------------------------------------------------------- | Schema configs |-------------------------------------------------------------------------- | | Define different directories for the schema loader. */'schemas' => ['app' => ['dir' =>resource_path('schemas'), ], ],/* |-------------------------------------------------------------------------- | engines |-------------------------------------------------------------------------- | | Directory where the latte templates can be found. */'engines' => ['default' => ['adapter' =>env('ENGINE_URL','meilisearch://127.0.0.1:7700', ), ], ],];
A more complex configuration can be here found:
<?php// config/cmsig_seal.phpreturn [/* |-------------------------------------------------------------------------- | Schema configs |-------------------------------------------------------------------------- | | Define different directories for the schema loader. */'schemas' => ['app' => ['dir' =>resource_path('schemas') .'/app','engine' =>'meilisearch', ],'other' => ['dir' =>resource_path('schemas') .'/other','engine' =>'algolia', ], ],/* |-------------------------------------------------------------------------- | engines |-------------------------------------------------------------------------- | | Directory where the latte templates can be found. */'engines' => ['algolia' => ['adapter' =>'algolia://' .env('ALGOLIA_APPLICATION_ID') .':' .env('ALGOLIA_ADMIN_API_KEY'), ],'elasticsearch' => ['adapter' =>'elasticsearch://127.0.0.1:9200', ],'loupe' => ['adapter' =>'loupe://var/indexes', ],'meilisearch' => ['adapter' =>'meilisearch://127.0.0.1:7700', ],'memory' => ['adapter' =>'memory://', ],'opensearch' => ['adapter' =>'opensearch://127.0.0.1:9200', ],'redisearch' => ['adapter' =>'redis://supersecure@127.0.0.1:6379', ],'solr' => ['adapter' =>'solr://127.0.0.1:8983', ],'typesense' => ['adapter' =>'typesense://S3CR3T@127.0.0.1:8108', ],// ...'multi' => ['adapter' =>'multi://elasticsearch?adapters[]=opensearch', ],'read-write' => ['adapter' =>'read-write://elasticsearch?write=multi', ], ],/* |-------------------------------------------------------------------------- | Schema prefix |-------------------------------------------------------------------------- | | Define the prefix used for the index names to avoid conflicts. */'index_name_prefix' =>'',];
The default engine is available asEngine:
class Some {publicfunction__construct(privatereadonly\CmsIg\Seal\EngineInterface$engine, ) { }}
Multiple engines can be accessed via theEngineRegistry:
class Some {privateEngine$engine;publicfunction__construct(privatereadonly\CmsIg\Seal\EngineRegistry$engineRegistry, ) {$this->engine =$this->engineRegistry->get('algolia'); }}
Instead of constructor injection theLaravel integration provides also twoFacadesfor the above services:
CmsIg\Seal\Integration\Laravel\Facade\EngineCmsIg\Seal\Integration\Laravel\Facade\EngineRegistry
How to create aSchema file and use yourEngine can be foundSEAL Documentation.
The package provides the following commands:
Create configured indexes
php artisan cmsig:seal:index-create --help
Drop configured indexes
php artisan cmsig:seal:index-drop --help
About
An integration of CMS-IG SEAL search abstraction into Laravel Framework. Part of thehttps://github.com/php-cmsig/search project. READ-ONLY Repository
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Contributors5
Uh oh!
There was an error while loading.Please reload this page.