Download the PHP package payamjafari/elasticute without Composer

On this page you can find all versions of the php package payamjafari/elasticute. 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 elasticute

ElastiCute - A QueryBuilder for ElasticSearch

By using this builder you can easily make your database queries without writing raw queries.

Installation

Usage

Just call method "query" in QueryBuilder class and you are ready.

Filter query

For filtering your query you can use several methods such as where, whereNot, orWhere, ....

Filter Methods

Name Description
where(string $name, $value, string $operator, array $extra) Matches values that is not a specified value.
whereNot(string $name, $value, string $operator, array $extra) Matches values that is a specified value.
whereContains( string $name, $value ) Matches values that are contains a specified value.
whereNotContains( string $name, $value ) Matches values that are not contains a specified value.
whereEqual( string $name, $value ) Matches values that are equal to a specified value.
whereNotEqual( string $name, $value ) Matches all values that are not equal to a specified value.
whereExists( string $name ) Matches documents that have the specified field.
whereNotExists( string $name ) Matches documents that dont have the specified field.

Group Filter

You can set your filters as a group by just adding a closure to "where" method.

Group Filter Methods

Name Description
groupShould( callable $filters ) See Official Documentation
groupMust( callable $filters ) See Official Documentation
groupMustNot( callable $filters ) See Official Documentation
groupFilter( callable $filters ) See Official Documentation

Aggregations

Aggregations are so important and could be used anywhere. So you can use it very easy. Take a look at the example.

Aggregation methods

Name Description
avg() Aggregate based on 'avg' type
terms() Aggregate based on 'terms' type
histogram() Aggregate based on 'histogram' type
max() Aggregate based on 'max' type
min() Aggregate based on 'min' type
Note: More aggregations will be added over time :)

Response

Each Request has a response, then it must be processed.

Response Methods

Name Description
toArray() Returns as array.
toJson() Returns as json.
toList() Returns as array list (if its a search query).
map() Map through the results(if its a search query)

Sort / OrderBy

Paginate documents

Select specific fields

Select index at runtime

You can select your index at the query by calling "index" method.

Find by id

By calling method "find", you can retrieve the document based on id.

Get index mapping

By calling method "mapping", you can retrieve the index mapping.

Pro tip :)

You dont have to call "query" method first. you can directly call index right at the beginning.


All versions of elasticute with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
vlucas/phpdotenv Version >=4.2.0
elasticsearch/elasticsearch Version >=6.8.2
ext-json Version *
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 payamjafari/elasticute contains the following files

Loading the files please wait ....