- What is jeroen-g/explorer and how does it work with Laravel Scout?
- Explorer is a Laravel Scout driver that connects Scout models to Elasticsearch 8 or 9 instead of Scout's built-in database engine. Existing model contracts such as toSearchableArray(), search(), and ::searchable() stay the same, so integration is a driver swap rather than a search subsystem rewrite. It does not replace your SQL database; Elasticsearch becomes a read-optimized search index while SQL remains the system of record.
- How do I install and configure Explorer in a Laravel application?
- Install jeroen-g/explorer via Composer, set the Scout driver to explorer in config/scout.php, and publish the package configuration. Declare per-index settings, analyzers, and mappings, create the indices, import your models, then query through Scout. The package implements Scout commands such as scout:index, scout:delete-index, scout:delete-all-indexes, and flush for Elasticsearch.
- Which Laravel, PHP, Scout, and Elasticsearch versions does Explorer support?
- Explorer 4.x targets Laravel 11, 12, or 13 with PHP 8.2+, Scout 10 or 11, and Elasticsearch 8 or 9; version 4.5 adds Elasticsearch 9 and multiple hosts. Version 4.0 explicitly dropped Elasticsearch 7, Laravel 9 and below, and PHP 8.0 and 8.1. Treat adoption as a modernization commitment and pin versions that will survive your next 12 months of upgrades.
- How does Explorer's query builder compare to writing Elasticsearch DSL by hand?
- Explorer exposes a fluent PHP query builder for full-text, multi-match, term, range, wildcard, regex, query-string, whereNotIn, rescoring, sort order with missing-value handling, and terms, nested, max, and sub-aggregations. This turns many search roadmap items from integration projects into tuning exercises because developers express queries in PHP rather than raw Elasticsearch DSL. It is still lexical relevance tuning only and does not provide semantic or vector retrieval.
- Can I reindex with Explorer without downtime in production?
- Explorer supports alias-based indexing with a queueable index swap, so reindexing does not require a maintenance window. You still need a rehearsed runbook for reindex and rollback on staging before relying on it in production. Confirm who operationally owns the Elasticsearch cluster and what the SLA is, because the package removes code complexity but not cluster operations.
- How do I test Laravel Scout with Explorer without a live Elasticsearch cluster?
- Explorer provides faked responses so integration tests and CI can run without a live Elasticsearch cluster. You can assert the queries your application builds and keep test suites fast and deterministic. Still validate real mappings, analyzers, and relevance against a staging cluster before release because fakes do not prove search quality.
- Is Explorer actively maintained and production-ready?
- The package is effectively single-maintainer with roughly 400 stars and zero listed dependents, so bus factor is one. Budget a fork or vendor contingency, or explicitly accept the risk before committing. Documentation quality is a blocking diligence item because published descriptions may conflict with the actual Elasticsearch and Scout driver scope, so validate with a timeboxed spike rather than a spec read.
- Does Explorer support semantic search or vector and hybrid retrieval?
- No, Explorer is focused on lexical relevance tuning through Elasticsearch and does not provide vector or hybrid retrieval. Semantic search is a separate project with its own embedding pipeline, index design, and evaluation work. Also remember that Scout imports are batched and Elasticsearch is near-real-time, so product expectations about records appearing instantly need to be negotiated.
- What are the main technical risks of adopting Explorer for Laravel search?
- The main risks are the hard version floor, the Elasticsearch infrastructure dependency, unreliable published documentation, and single-maintainer bus factor. Adopting Explorer means someone must own the cluster, mappings, reindexing, and on-call response. Before committing, confirm your top five to ten real query shapes map cleanly to the builder and define a graceful-degradation story for when the cluster is unavailable.
- What alternatives should I consider before choosing Explorer?
- Consider Scout's built-in database driver for simple search needs, other Scout Elasticsearch drivers, the official Elasticsearch PHP client, or a managed search service. Compare query builder semantics, supported Elasticsearch versions, maintenance risk, and how each handles reindexing and rollback. A shadow read phase that writes to both paths and compares quality and latency can de-risk any migration before cutting reads over via alias.