Weave 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

Elasticquent Laravel Package

daltcore/elasticquent

Elasticsearch integration for Laravel's Eloquent models: define indexes and mappings per model, bulk-index records, and run fluent search queries that return hydrated models. A maintained fork of elasticquent with config-driven client setup and artisan helpers.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • Elasticquent's model is a trait bolted onto Eloquent (ElasticquentTrait / Searchable) that pushes model documents into an Elasticsearch index and hydrates results back into Eloquent models. It presumes Eloquent is the system of record and Elasticsearch is a derived read model — a reasonable fit for a Laravel monolith adding search to existing CRUD models.
  • The package's core abstraction is index + type per model (getIndexName(), getTypeName(), getMapping()). Mapping types were removed in Elasticsearch 6, deprecated through 7, and are gone in 8. This is the single biggest architectural mismatch: the package's mental model is anchored to an ES version line that is end-of-life.
  • It assumes synchronous, in-process indexing from model lifecycle events. That works for low write volume but does not accommodate outbox/queue-based indexing, multi-index/alias strategies, or read-model rebuilds without custom code.
  • It does not fit event-driven, CQRS, or multi-tenant-per-index architectures without significant wrapping.

Integration feasibility

  • Integration is mechanically simple: composer require, add the trait, implement index/type/mapping methods, run the provided artisan commands for index creation and bulk reindex. Low ceremony, no service container gymnastics.
  • The real feasibility question is version compatibility. This is a fork of a package that has been effectively unmaintained since the Laravel 5.x / ES 2–5 era. Expect friction with PHP 8.1+ (dynamic properties, typed signatures), Laravel 10/11, and any elasticsearch/elasticsearch client above 7.x. Budget for patching the fork in-house.
  • No published dependents and no stars is a meaningful signal: there is no field evidence that this fork works on any real stack. Treat it as unvalidated code, not as a library.

Technical risk

  • Abandonment risk: high. Zero stars, zero dependents, no visible community. The upstream project is archived. There is no security response path, no CVE monitoring, and no compatibility releases.
  • Supply chain: a low-visibility fork of an abandoned package is exactly the profile that warrants a vendor audit (diff against upstream, commit history, maintainer identity, CI, license retention).
  • Version drift: ES mapping-type removal, _doc endpoint changes, auth/TLS defaults, and client API changes will each require source edits.
  • Silent divergence: search correctness depends on index freshness; the package has no reconciliation, retry, or dead-letter mechanism. Failures degrade into "search is wrong" rather than "search is down."

Key questions

  1. Which exact Elasticsearch and elasticsearch/elasticsearch client versions does this fork target?
  2. What does the fork change relative to elasticquent/elasticquent, and is it maintained or a one-off snapshot?
  3. Target Laravel and PHP versions — does it run on our stack without patching?
  4. Is there an alias/reindex story, or does index creation assume downtime?
  5. How are bulk indexing failures surfaced — exceptions, or silently swallowed?
  6. Who owns this code internally if upstream disappears? (Assume: us.)

Integration Approach

Stack fit

  • Fit is good only if the target is Laravel 5.x–8.x with Elasticsearch ≤ 6 and a single-writer monolith. On a modern stack (Laravel 10/11, PHP 8.2+, ES 8), the package is a liability, not an accelerator.
  • Preferred alternative on a modern stack: Laravel Scout with an Elasticsearch driver, or a thin internal repository over elasticsearch/elasticsearch that exposes index(Model), delete(Model), search(Query). Either preserves the "Eloquent is source of truth" property without inheriting a dead type-mapping model.

Migration path

  • If the package is adopted anyway, isolate it: wrap all index/search calls behind an internal SearchService interface on day one, so the trait is an implementation detail and swapping it out later is a config change, not a refactor.
  • Dual-write during transition: package handles indexing, reads still come from the database, until index parity is verified.
  • Backfill with a chunked artisan command (the package's bulk indexer, or a custom one) running against a production snapshot, not against live writes.
  • Build mappings as versioned code artifacts and use index aliases (items_v1 → items) so reindex and mapping changes are zero-downtime.

Compatibility

  • Validate on a spike branch before committing: install on the actual Laravel/PHP/ES versions, index a representative model, confirm search, update, delete, and bulk reindex all behave.
  • Expect to patch: ES client version pins, _type removal, PHP 8 signature and dynamic-property issues, and any hardcoded _search/_mapping endpoint paths.
  • Check the mapping generation path — the package builds mappings from PHP arrays; confirm it produces ES 7/8-compatible JSON (no type-level nesting) if targeting a modern cluster.

Sequencing

  1. Spike and compatibility audit (1–2 days) against the real stack.
  2. Vendor review: diff vs. upstream, license, commit activity, security surface.
  3. Decision gate: adopt-with-wrapping, or build the thin repository layer instead.
  4. Stand up index templates, aliases, and mapping-as-code in IaC.
  5. Backfill, verify parity against database queries.
  6. Dual-write, then cut reads over to Elasticsearch.
  7. Decommission any temporary DB-side search paths.

Operational Impact

Maintenance

  • We become the maintainer. Every Elasticsearch upgrade, PHP upgrade, and Laravel major is our patch, because there is no upstream to wait on. Estimate an ongoing trickle of maintenance plus a spike per ES major version.
  • Pin the dependency to an exact commit and vendor it if the fork's repository is not stable; do not track a branch.

Support

  • No vendor, no community, no issue tracker of consequence. On-call must be able to read the package source — it is small enough that this is realistic, which is the main argument in its favor.
  • Document the index/type/mapping contract per model in the team wiki; this knowledge otherwise lives only in the trait implementations.

Scaling

  • Indexing is synchronous from model events unless wrapped; at higher write volume this adds Elasticsearch latency to every request. Wrap indexing in queued jobs before scaling writes.
  • Bulk indexing must be chunked and memory-bounded; model serialization for large result sets is the usual blow-up point.
  • Elasticsearch cluster sizing, shard strategy, and snapshot/restore are entirely out of scope for this package and must be owned separately. The package gives you a client and a trait, not a search platform.

Failure modes

  • Cluster unavailable: writes either throw (degrading user-facing requests) or are swallowed (silently diverging index). Neither is acceptable without an outbox.
  • Partial bulk failure: bulk responses return per-document errors; if unhandled, documents silently fail to index and search results are quietly incomplete.
  • Mapping drift: changes to model attributes without a mapping migration cause indexing to fail or fields to be dropped; no schema-evolution tooling is included.
  • Reindex downtime: without aliases, a mapping change requires an index rebuild visible to users.
  • Version skew: an Elasticsearch upgrade can break the client contract in ways that surface only at runtime.

Ramp-up

  • Low for basic indexing and search — a mid-level Laravel engineer is productive in under a day.
  • The real ramp-up cost is Elasticsearch literacy (mappings, analyzers, relevance, shard sizing) and the discipline of treating the index as a disposable, rebuildable projection. That is a team-level investment regardless of which library is chosen.
  • Given zero stars, zero dependents, and an abandoned upstream, the honest recommendation is: do not adopt this fork as a dependency. Either fork it fully into the codebase as owned code (small, auditable, patchable), or build the thin search abstraction on the official client and get the same outcome with a live upstream.
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.
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log
hsluv/hsluv
seampact/codegen
seampact/hooks
seampact/ir
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk