Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Explorer Laravel Package

jeroen-g/explorer

Laravel-friendly wrapper for Explorer, a lightweight full-text search engine. Index and search your Eloquent models with simple configuration, fast queries, and flexible ranking/filters. Ideal for adding on-site search without running Elasticsearch or Algolia.

View on GitHub
Deep Wiki
Context7

Next-gen Elasticsearch driver for Laravel Scout.

Frequently asked questions about Explorer
How do I switch from Laravel Scout’s default Elasticsearch driver to jeroen-g/explorer?
Update your Scout configuration to set `'driver' => 'explorer'` in `config/scout.php`. Then install the package via Composer (`composer require jeroen-g/explorer`) and publish its config if needed. No model changes are required unless you want custom mappings or the `Explored` interface.
Does jeroen-g/explorer support nested fields (e.g., author.tags) for complex queries?
Yes, the package provides a fluent API for nested fields using dot notation (e.g., `filter('author.tags.name', 'tech')`). It also supports nested aggregations, but some advanced Elasticsearch aggregation types (like geo_aggregations) require custom `SyntaxInterface` implementations.
Can I use jeroen-g/explorer with Laravel Scout’s meilisearch or algolia drivers?
No, jeroen-g/explorer is designed as a replacement for Scout’s Elasticsearch driver. If you’re using meilisearch or algolia, you’ll need to migrate to this package by updating your Scout config and ensuring your models use the `Searchable` trait. The migration is straightforward for Scout users.
How do I test my application without a live Elasticsearch cluster?
Use the `FakeResponse` class provided by the package to mock Elasticsearch API calls. The README includes examples for unit testing with Laravel’s `instance()` mocking. For feature tests, you can simulate HTTP responses with Laravel’s HTTP testing tools.
What Laravel Scout version does jeroen-g/explorer support?
The package requires Laravel Scout v8 or higher. Check the package’s release notes for the latest Scout compatibility, as updates may lag behind Scout’s newest features. Always test with your specific Scout version to avoid breaking changes.
How does jeroen-g/explorer handle zero-downtime deployments?
The package supports Elasticsearch index aliases (read/write/history) via configuration. Enable this by setting `prune_old_aliases: false` in the config, which allows seamless rollovers during deployments without interrupting search functionality.
Can I use jeroen-g/explorer for large datasets (e.g., 1M+ documents)?
While the package works for large datasets, performance depends on your Elasticsearch cluster setup. For deep pagination, consider using Elasticsearch’s `search_after` or `scroll` APIs (not natively exposed in Explorer) or optimize bulk indexing with Laravel Queues. Monitor query execution time via Elasticsearch’s `_explain` API.
What if I need Elasticsearch aggregations not supported by jeroen-g/explorer?
Unsupported aggregations (e.g., geo_aggregations) require implementing the `SyntaxInterface` to extend the package’s query builder. The package’s architecture is designed for extensibility, so you can add custom syntax for advanced use cases.
How do I configure custom field mappings for my Eloquent models?
Use the `mappableAs()` method on your model or define mappings in the published config file. Explicit mappings are recommended to avoid Elasticsearch’s dynamic field inference, which can cause issues like date vs. string conflicts. Reindexing is required after mapping changes.
Is jeroen-g/explorer compatible with managed Elasticsearch services like AWS OpenSearch?
Yes, but you may need to adjust configurations for IAM roles, VPC settings, or endpoint URLs. The package assumes standard Elasticsearch 7.x/8.x compatibility, so verify your service’s API version and authentication requirements. No additional changes are typically needed for basic functionality.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport