An Elasticsearch ODM and mapper for Laravel that provides a fluent syntax for mapping, querying, and storing Eloquent models.
Plastic is an Elasticsearch Object-Document Mapper (ODM) and mapper for Laravel. It provides a fluent, expressive syntax for mapping Eloquent models to Elasticsearch indices, querying data, and managing documents, making Elasticsearch integration feel seamless within Laravel applications. It solves the problem of cumbersome, low-level Elasticsearch DSL interactions by offering a developer-friendly abstraction layer.
Laravel developers who need to integrate full-text search or advanced querying capabilities using Elasticsearch without leaving the familiar Laravel/Eloquent ecosystem.
Developers choose Plastic because it dramatically simplifies Elasticsearch usage in Laravel by providing an intuitive, chainable query builder that mirrors Eloquent's syntax, automatic model syncing, and built-in support for mappings, aggregations, and suggestions—reducing boilerplate and learning curve.
Plastic is an Elasticsearch ODM and mapper for Laravel. It renders the developer experience more enjoyable while using Elasticsearch, by providing a fluent syntax for mapping, querying, and storing eloquent models.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides a chainable syntax similar to Eloquent, making it intuitive to construct complex Elasticsearch queries like bool, nested, and aggregation queries without grappling with raw DSL.
Automatically syncs Eloquent model data with Elasticsearch on save or delete operations, reducing manual effort to keep search indices up-to-date, as highlighted in the storage section.
Integrates mapping creation and execution via Laravel Artisan commands, allowing developers to define and run Elasticsearch mappings directly from the console for optimized search performance.
Supports bulk saving and deleting of documents through dedicated methods, enabling efficient handling of large datasets without triggering individual model events.
Plastic does not automatically listen to events from related models, requiring manual document updates when associated data changes, which can lead to synchronization gaps and extra development overhead.
Updating existing field mappings is cumbersome; the README admits it requires creating new indices or using aliases, potentially causing downtime and added complexity for evolving schemas.
Several Elasticsearch query and aggregation types, such as Boosting query and Nested aggregation, are listed as to-do items, limiting advanced use cases and forcing workarounds.