Download the PHP package isswp101/elasticsearch-eloquent without Composer

On this page you can find all versions of the php package isswp101/elasticsearch-eloquent. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package elasticsearch-eloquent

Elasticsearch Eloquent 2.x

Latest Version on Packagist [Software License]() Build Status Coverage Status Quality Score Total Downloads

This package allows you to interact with Elasticsearch as you interact with Eloquent models in Laravel.

Requirements

Install

Via Composer

Usage

Create a new model

You should override index and type properties to determine the document path.

Use the static create() method to create the document in Elasticsearch:

Save the model

Use save() method to store model data in Elasticsearch. Let's see how this looks in Elasticsearch:

Fields created_at and updated_at were created automatically.

Find existing model

If you have big data in Elasticsearch you can specify certain fields to retrieve:

There are the following methods:

Cache

There is a smart model cache when you use methods like find(), findOrFail() and so on.

Partial update

You can use the partial update to update specific fields quickly.

Delete models

You can use the static method:

Model events

Out of the box you are provided with a simple implementation of events.
You can override the following methods to define events:

For example:

Basic search

There are helpers to search documents:

The first($query) method returns the first document according to the query or null.

The firstOrFail($query) method returns ModelNotFoundException exception if first($query) returns null.

The search($query) method returns documents according to the query.

The all($query) method returns all documents (default 50 items per request) according to the query.

If $query is not passed the query will be as match_all query.

Query Builder

Consider using these packages:

Testing

License

The MIT License (MIT).


All versions of elasticsearch-eloquent with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
elasticsearch/elasticsearch Version ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package isswp101/elasticsearch-eloquent contains the following files

Loading the files please wait ....