SearchManager, Indexer) in Laravel, using PHP-PMMLucene (a modern fork of Zend Lucene).spatie/laravel-searchable but with Lucene).| Risk Area | Assessment |
|---|---|
| Compatibility | High – Symfony2/Laravel divergence in DI, ORM, and event systems. |
| Maintenance | Medium – Zend Lucene is abandoned; PHP-PMMLucene is more active. |
| Performance | Low – Lucene is efficient, but not as scalable as Elasticsearch/Solr. |
| Security | Medium – Depends on Lucene’s stability and custom implementation. |
| Testing | High – Requires mocking Symfony services or full refactoring. |
| Component | Laravel Compatibility | Workaround Needed? |
|---|---|---|
| Symfony DI | ❌ No | Replace with Laravel’s Service Container or Laravel Packages. |
| Doctrine ORM | ❌ No | Use Eloquent or raw SQL for indexing. |
| EventDispatcher | ❌ No | Replace with Laravel’s Events. |
| Zend Lucene | ⚠️ Partial (via PHP-PMMLucene) | Yes – requires dependency swap. |
Zend_Lucene → PHP-PMMLucene (active fork).SearchManager, Indexer, and Query classes to Laravel.// Laravel Service Provider
public function register()
{
$this->app->singleton(SearchManager::class, function ($app) {
return new SearchManager(new PMMLucene\Search\Index(), $app['config']);
});
}
IndexUpdated).Resources/config.laravel-lucene-search) with:
Observers or Listeners.Post).| Task | Effort (Symfony2 Bundle) | Effort (Laravel Wrapper) | Effort (Microservice) |
|---|---|---|---|
| Index Updates | Medium (Symfony events) | High (custom observers) | Medium (API calls) |
| Query Updates | Low (bundle methods) | Medium (new query builder) | Low (API stable) |
| Lucene Upgrades | High (Symfony2 locked) | Medium (PHP-PMMLucene) | Low (isolated) |
| Monitoring | Medium (Symfony tools) | High (custom metrics) | Medium (Prometheus) |
| Factor | Consideration |
|---|---|
| Horizontal Scaling | Lucene is not distributed; scaling requires sharding or multiple instances. |
| Index Size | Lucene performs well for <10M documents; beyond that, consider Elasticsearch. |
| Query Load | High query volume may need read replicas or caching. |
| Microservice Scaling | Easier to scale Symfony app independently (e.g., Kubernetes). |
| Scenario | Impact (Microservice) | Impact (Wrapper) |
|---|---|---|
| Lucene Index Corruption | High (data loss) | High (data loss) |
| Symfony App Crash | Medium (Laravel unaffected) | Critical (Laravel blocked) |
| Network Latency (API) | High (search slows) | N/A |
| PHP-PMMLucene Bug | Medium (patchable) | High (affects Laravel) |
| Database Sync Failure | Medium (stale data) | High (inconsistent state) |
How can I help you explore Laravel packages today?