- What is torann/laravel-hunt used for?
- Laravel Hunt provides unified search across Laravel models backed by Elasticsearch, wrapping elasticsearch-php so you can query indices without wiring the client yourself. Version 0.5.5 adds an option to sign all Amazon Elasticsearch requests, which targets IAM-authenticated AWS-hosted clusters. It is a thin integration layer rather than a full search abstraction, so you still model indices and queries yourself.
- How do I install torann/laravel-hunt in a Laravel app?
- Install it with Composer using composer require torann/laravel-hunt, then register the package service provider and publish its config file following the README. Because the package is pre-1.0, pin an explicit version such as 0.5.5 rather than floating to avoid surprise config or handler changes. The supplied materials do not include full install steps, so confirm provider and config details against the repository README.
- Does laravel-hunt support IAM authentication for Amazon OpenSearch Service?
- Yes, the 0.5.5 release adds an option to sign all Amazon Elasticsearch requests, which is the SigV4 mechanism used for IAM-based access to Amazon OpenSearch Service. Signing is handled at the Elasticsearch client transport or handler layer, so it composes with normal query and bulk operations. Note that signing alone does not configure OpenSearch fine-grained access control role mappings.
- Is AWS request signing enabled by default in laravel-hunt?
- The release note describes an opt-in option to sign all Amazon Elasticsearch requests, and the technical assessment expects the flag to default to off so existing self-managed and Elastic Cloud deployments are unaffected. The exact config key and default are not confirmed in the supplied materials. Verify the flag in the published config stub and tests before rolling it out.
- Which Laravel and PHP versions does torann/laravel-hunt support?
- The supplied context does not list supported Laravel or PHP versions, so check the package composer.json constraints before installing. The package is at 0.5.x, meaning its public interface is still pre-1.0 and may change in minor releases. Test against your application framework and PHP versions in CI rather than assuming compatibility.
- How should I handle AWS credential expiry with Laravel queue or Octane workers?
- Long-lived processes are the classic failure case for SigV4 signing because a client constructed once can hold stale credentials for hours. You want credentials re-resolved per request or refreshed ahead of expiry, using an IAM instance or task role rather than static keys where possible. The supplied materials do not confirm whether laravel-hunt resolves credentials per request, so verify that behavior before running it in queue or Octane workers.
- Does laravel-hunt sign _bulk, _msearch, and scroll requests?
- The 0.5.5 option is described as signing all Amazon Elasticsearch requests, which should include bulk, msearch, and scroll continuations if implemented at the transport layer. Partial signing is a common cause of hard-to-diagnose 403 errors on those paths, so full coverage matters. Confirm coverage and any endpoint exclusions in the package tests or source before relying on it for bulk indexing.
- Is torann/laravel-hunt stable enough for production?
- It is at 0.5.x, so treat the config keys and handler wiring as pre-1.0 and pin a specific version in composer.json. The AWS signing feature is additive and opt-in, which lowers risk for existing deployments that leave it disabled. For production, add tests for credential expiry, wrong region, and clock skew, since those failures surface as opaque 403s.
- How does laravel-hunt compare to Laravel Scout for Elasticsearch search?
- Laravel Scout is a model-search abstraction with drivers, while laravel-hunt is described as unified search for Laravel models using Elasticsearch, wrapping the Elasticsearch client more directly. Hunt gives you closer control over indices and queries but less of Scout model-sync convenience. Choose based on whether you want a search abstraction or direct Elasticsearch access.
- What should I check before enabling AWS signing in laravel-hunt?
- Confirm the signing flag defaults to off and that non-AWS endpoints are unaffected when it is disabled. Ensure a resolvable AWS credential chain, the correct region and service name, and container clocks that do not drift outside SigV4 tolerance. Also verify OpenSearch fine-grained access control mappings and test expired credentials before enabling it in production.