Download the PHP package novaway/elasticsearch-client without Composer

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

Novaway ElasticSearch Client

Note : this project is discontinued in favor of the ElasticsearchBundle, as it was more or less trying to do what elastica does already well

A lightweight PHP 7.0+ client for Elasticsearch, providing features over Elasticsearch-PHP

Compatibility

This branch is tested and compatible with ElasticSearch 6.*

The compatibility with ElasticSearch 5.* is supported, and should work, but is to be considered hazardous.

Installation

Install using composer:

Usage

Create an index

The first thing you'll need to do to use this library is to instatiate an index. This will be the keystone of the client.

Index an object

In order to be searched, objects should be indexed as a serialized version. In order to be indexed, Object should implement \Novaway\ElasticsearchClient\Indexable interface.

By default, objects are serialized with Elasticsearch-PHP's SmartSerializer, but you can choose to use a custom serializer.

Remove an object from index

To remove an object from the index, the process is still

Search the index

Basic match query

First, create a QueryExecutor.

Use the QueryBuilder to build your query and execute it.

The QueryBuilder allow you to define a limit and an offset for a search result, and choose the minimum score to display.

Advanced Querying

This client provide several ways to improve querying :

Clear the index

You might want, for some reason, to purge an index. The reload method drops and recreates the index.

Hotswapping

You will want to reindex all your data sometimes.

It is possible to do it without downtime using the hotswap mechanisme

Recommended usage with Symfony

If you are using this library in a symfony project, we recommend to use it as service.

Then you'll only have to work with the myapp.search.object_indexer and myapp.search.query_executor services.

Testing

A testing environment is provided using a dockerized version of elasticsearch.

Testing is done using the Atoum framework for unit testing and the Behat framework for behavior testing.

A Makefile provide useful commands for testing, so you can run the full test suite by running :

License

This library is published under MIT license


All versions of elasticsearch-client with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0
elasticsearch/elasticsearch Version ^5.2 || ^6.0
symfony/dependency-injection Version ^3.0 || ^4.0
myclabs/php-enum Version ^1.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 novaway/elasticsearch-client contains the following files

Loading the files please wait ....