Download the PHP package zumba/elasticsearch-index-rotate without Composer

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

Elasticsearch Index Rotator

A library to enable you to safely rotate indexes with no downtime to end users.

Build Status

Why would I use this?

In many situations, Elasticsearch is used as an ephemeral datastore used to take structured or relational data and make it fast to search on that data. Often this is achieved via scheduled jobs that read data from a permanent datastore (such as MySQL or Postgres) and translate it into an Elasticsearch index.

In many cases, rebuilding an index requires a clean slate so that the entire index is rebuilt. How do you do this without interrupting end users searching on that index? The answer is a rotating index.

Here the user's search is fully disrupted when the index is first removed, and only partially available while the index is being rebuilt. While the index is being rebuilt, users get incomplete data.

Here the user's search is never disrupted because we construct a new index and after it is built/settled, we change the what index to search by the client.

Installation

Elasticsearch Index Rotator supports multiple versions of ElasticSearch server and uses the official elasticsearch library for execute the commands. On your application, make sure you include this package as well and specify the version supported by your Elasticsearch server. See the library documentation for the versions.

Usage

Example Search

Example Build

All together

Using Strategies

You can now customize the strategy of getting/setting the primary index. By default, the ConfigurationStrategy is employed, however we have also included an AliasStrategy. The main difference is when setPrimaryIndex is called, instead of creating an entry in the configuration index, it adds an alias (specified by alias_name option) on the specified index and deletes all other aliases for the old primary indices (specified by index_pattern).

Using the AliasStrategy

Since the alias (pizza_shops) is mapped to the primary index (pizza_shops_1234102874), you can use the alias directly in your client application rather than having to call getPrimaryIndex() on the IndexRotator. That being said, calling getPrimaryIndex won't return the alias, but rather the index that it is aliasing. The secondary entries in the configuration index are still used and reference the actual index names, since the alias can be updated at any time and there wouldn't be a reference to remove the old one.


All versions of elasticsearch-index-rotate with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.0
elasticsearch/elasticsearch Version >=1.0 <6.0
psr/log 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 zumba/elasticsearch-index-rotate contains the following files

Loading the files please wait ....