# elasticquent/Elasticquent

Maps Laravel Eloquent models to Elasticsearch types

Repository: https://github.com/elasticquent/Elasticquent
Canonical: https://ross.abutalabs.com/products/elasticquent
Language: PHP
License: MIT
License Family: permissive
Topics: laravel, elasticsearch, eloquent, eloquent-models
Last push: 2024-05-12T01:16:13+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4094, "days_push": 844, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1359, forks 392 (observed 2026-08-28T04:04:29.767375+00:00)

## What it is
A PHP library that maps Laravel Eloquent models to Elasticsearch types, letting you index and search model data directly from Eloquent. It wraps the official Elasticsearch PHP client and returns search results as Eloquent collections.

## Use cases
- add full-text search to Laravel models with Elasticsearch
- index Eloquent models into Elasticsearch
- search Elasticsearch and get Eloquent collections back
- sync database records to an Elasticsearch index
- define custom Elasticsearch mappings per model

## When to choose
- you use Laravel Eloquent and want tight Elasticsearch integration
- you want search results as model instances with collection helpers
- you prefer defining index mappings inside your models

## When to avoid
- you don't use Laravel or Eloquent
- you need Elasticsearch 8+ features or active development
- you use a different search backend like Meilisearch or Algolia

## Facets
- artifact type: library
- maturity: maintenance
- function: search-engine, database-driver, orm
- domain: web-development, databases
- platform: php
- tags: elasticsearch, eloquent, laravel-package, full-text-search, indexing, search, laravel

## Member repositories
- elasticquent/Elasticquent (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:29.767375+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:41:42.420494+00:00, confidence not recorded.
  - readme: https://github.com/elasticquent/Elasticquent (fetched 2026-08-28T04:04:29.767375+00:00, sha ad330978b114)
- Data as of 2026-08-30T08:39:29.467469+00:00.
