Download the PHP package iivannov/elastic-commander without Composer

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

Elastic Commander

This a simple and easy to use wrapper for the official low-level Elasticsearch PHP Client.

It simplifies the work with Elasticsearch API by offering a lot of helper methods for managing indices, adding and updating documents and searching the index.


Installation

Via Composer


Usage

Initialization

Minimum required (will work with default host - localhost:9200)

With a list of hosts

With a custom handler

N.B. Each instance of the Commander works with the index name specified when initializing it. All actions and queries will be executed on this index. If you want to set a new index name to work with use:

Index

1. Create the index

2. Delete the index

3. Reset the index

A helper method that will reset the index by deleting it and creating it again.

4. Optimize the index

// Not finished

5. Statistics about the index

// Not finished


Mapping

1. Put Mapping


Document

1. Check if document exists by id

2. Get document by id

3. Add document

In current version the add method expects an ID for the document.

4. Update document


Search

Searching is done by passing a raw query array or by using a custom criteria class. After the query you have the option to get: the full response, only the ids, a map of the results or the total count.

1. Raw Query

2. Criteria Query

Result

After running either a raw query or one with a criteria class you can use one of the helper methods for manipulating the result response.

1. Return ElasticSearch raw response

2. Return total number of results

3. Return an array of IDs for the found hits

3. Return an array of objects for the found hits

The key will be the _id of the hit and the value will be an stdClass of the _source


Count

// Not finished


All versions of elastic-commander with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
elasticsearch/elasticsearch Version ^6.7
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 iivannov/elastic-commander contains the following files

Loading the files please wait ....