- How do I install basemkhirat/elasticsearch in a Laravel app?
- Run composer require basemkhirat/elasticsearch. Laravel auto-discovery registers the service provider, then you publish the package config with php artisan vendor:publish and set your hosts in config/elasticsearch.php. Before installing, verify Composer constraints against your PHP and Laravel versions because the package targets the PHP 7.x and Laravel 5.5 to 7.x era.
- Does basemkhirat/elasticsearch support Laravel 10 or Laravel 11?
- There is no official support for Laravel 10 or 11. The last release was in November 2019, when the package targeted PHP 7.x and Laravel 5.5 through 7.x. Using it on newer Laravel versions requires a fork that widens Composer constraints and adds contract tests for the target stack.
- Which Elasticsearch versions does basemkhirat/elasticsearch support?
- The package was built against elasticsearch-php 6 and 7, so it fits the Elasticsearch 5.x through 7.x era. Elasticsearch 8 is out of scope without a fork because of mapping-type removal, security enabled by default, and the rewritten client API. Confirm your server version, mapping style, and client major version before adopting it.
- Is basemkhirat/elasticsearch still maintained?
- No, the last release was on 2019-11-28 and there have been no upstream bug fixes or security patches since. Support is community-only through a stale GitHub issue tracker with a single-maintainer bus factor. Teams adopting it should assume in-house ownership, dependency pinning, and periodic compatibility re-validation.
- Can basemkhirat/elasticsearch use multiple Elasticsearch connections?
- Yes, the package supports multiple connections, indices, and documents configured in config/elasticsearch.php. You select the connection in your queries rather than hard-coding a single cluster. This is useful for separating environments or read and write clusters, but the abstraction still leaks for features not modeled in the builder.
- How do Eloquent-style models work in basemkhirat/elasticsearch?
- The package provides model-like classes that make document queries feel similar to Eloquent, but it is not a true ORM. It does not hydrate Eloquent models, manage mappings, handle index lifecycle, or provide migrations. For anything outside the fluent builder you need escape hatches to the underlying elasticsearch-php client, so Elasticsearch fundamentals are still required.
- Does basemkhirat/elasticsearch support bulk indexing and aggregations?
- Yes, the fluent query builder supports bulk indexing, CRUD operations, and aggregations. It is designed to reduce hand-written Elasticsearch DSL for common reads and writes in Laravel and Lumen applications. Complex aggregations or advanced search features may still require direct access to the official client.
- Should I use basemkhirat/elasticsearch in production?
- Treat it as a legacy accelerant rather than a platform bet, because abandonment, dependency CVE drift, and Elasticsearch 6/7 lock-in create high technical risk. If you adopt it, wrap it behind a repository or interface layer, fork it to a pinned private VCS repository, and add contract tests. Run a time-boxed proof of concept against representative queries and validate on staging before any production cutover with a documented rollback to the raw client.
- What are alternatives to basemkhirat/elasticsearch for Laravel?
- Alternatives include using the official elasticsearch-php client directly, adopting a maintained Laravel Scout driver, or forking this package and owning it internally. The right choice depends on your target Elasticsearch version, Laravel and PHP versions, and whether you need bulk indexing, aggregations, or index lifecycle features. OpenSearch compatibility is not guaranteed, so validate before committing.
- Does basemkhirat/elasticsearch work with Elasticsearch 8 or OpenSearch?
- No, Elasticsearch 8 is not supported without a fork because the client API, security defaults, and mapping-type handling changed significantly. OpenSearch compatibility is also not guaranteed. If those platforms are in scope, plan for a replacement or an internal fork with explicit compatibility tests rather than assuming the package will work as-is.