cmsig/seal-redisearch-adapter
RediSearch adapter for the SEAL search engine. Index and query documents in a Redis Stack instance using RediSearch + RedisJSON. Supports ext-redis/ext-json and DSN-based configuration; note: no GeoBoundingBox or HIGHLIGHT support.
Dependency Management:
cmsig/seal and cmsig/seal-redisearch-adapter to specific versions in composer.json to avoid unexpected breaking changes during the "heavily under development" phase. Use composer why-not to track dependencies.ext-redis).Schema Evolution:
seal's schema management tools to evolve the RediSearch index schema (e.g., adding/removing fields). Document schema changes in a CHANGELOG.md for the search layer.Schema::table()-like syntax for RediSearch indices (if supported by seal) to maintain consistency with database migrations.Index Maintenance:
FT.CREATE with ON clause for incremental updates).php artisan seal:reindex).Troubleshooting:
redis-cli to inspect indices and debug queries (e.g., FT.SEARCH idx "@title:$query"). Log these commands in Laravel for debugging.ext-redis and ext-json in Laravel’s bootstrap/app.php or a service provider. Use extension_loaded() and redis_connect() to validate.seal's debug mode (if available) and log queries to Laravel’s logs. Example:
$engine->setDebug(true);
$results = $engine->search($query);
Log::debug('RediSearch query', ['query' => $query, 'results' => $results]);
Community Support:
seal repository with clear labels (e.g., adapter: redisearch, bug).Documentation:
Horizontal Scaling:
redis-cluster driver or a proxy like Twemproxy.products:*, articles:*). Use Laravel’s queue system to parallelize indexing tasks.Performance Tuning:
php artisan queue:work --sleep=3 --tries=3).updated_at triggers).@price:[10 100]).Cache::remember) or Redis itself (e.g., FT.AGGREGATE results).maxmemory-policy) and monitor usage with INFO memory.laravel-debugbar or spatie/laravel-activitylog to track memory-intensive queries.Load Testing:
k6 or artillery to test RediSearch’s performance under load.Redis Failures:
predis/predis with retry_interval).MODULE LIST) and fail gracefully if RediSearch/RedisJSON is missing.redis-memory-max-usage in Prometheus) and implement auto-scaling or archiving strategies.Adapter-Specific Risks:
seal during deployment (e.g., using Laravel’s Schema::hasTable-like checks for indices).redis.timeout) and implement client-side timeouts.MULTI/EXEC) for critical indexing operations.Data Consistency:
SAVE or RDB) and test restore procedures for the search index. Document how to rebuild indices from Laravel models.Onboarding:
seal's API.SEARCH.md in the Laravel app’s docs folder with:
Tooling:
Engine and RediSearchAdapter classes to enable autocompletion in IDEs (e.g., PHPStorm).php artisan seal:create-index products
php artisan seal:reindex --model=Product
php artisan seal:search "test query"
Feedback Loop:
laravel-analytics or custom Prometheus metrics. Share insights with the team to identify pain points.seal).How can I help you explore Laravel packages today?