2017 © Pedro Peláez
 

bundle elastica-extra-bundle

Bundle providing extra elastica tools for managing indices and types settings

image

gbprod/elastica-extra-bundle

Bundle providing extra elastica tools for managing indices and types settings

  • Thursday, February 22, 2018
  • by gbprod
  • Repository
  • 2 Watchers
  • 2 Stars
  • 4,728 Installations
  • PHP
  • 0 Dependents
  • 1 Suggesters
  • 0 Forks
  • 5 Open issues
  • 16 Versions
  • 23 % Grown

The README.md

ElasticaExtraBundle

Build Status codecov Scrutinizer Code Quality Dependency Status, (*1)

Latest Stable Version Total Downloads Latest Unstable Version License, (*2)

Bundle providing extra elastica tools for managing indices and types settings., (*3)

With this bundle you can :, (*4)

  • Manage index settings and mappings in yaml
  • Create and delete index
  • Manage indices' aliases
  • Reindex

Installation

With composer :, (*5)

composer require gbprod/elastica-extra-bundle

Update your app/AppKernel.php file:, (*6)

public function registerBundles()
{
    $bundles = array(
        new GBProd\ElasticaExtraBundle\ElasticaExtraBundle(),
    );
}

Configure Elastica client

gbprod_elastica_extra:
    default_client: 'elastica.default_client' # Elastica client service's name

You can create Elastica client using a bundle like: * FOSElasticaBundle Service name will look like fos_elastica.client.my_client * My lightweight bundle ElasticaBundle Service name will look like elastica.default_client * DIY, (*7)

Index Management Operations

Configuration

Set indices setup, (*8)

elastica_extra:
    default_client: 'elastica.default_client'
    indices:
        my_index:
            settings:
                number_of_shards: 3
                number_of_replicas: 2
            mappings:
                my_type:
                    _source:
                        enabled: true
                    properties:
                        first_name:
                            type: string
                            analyzer: standard
                        age:
                            type: integer
        my_index_2: ~

Create index

Will create index using his configuration., (*9)

php app/console elasticsearch:index:create my_index

Will create index using another index configuration (usefull when using aliases), (*10)

php app/console elasticsearch:index:create my_versionned_index --alias=my_index

Delete index

php app/console elasticsearch:index:delete my_index --force

Put index settings

php app/console elasticsearch:index:put_settings my_index

Will put index settings using another index configuration (usefull when using aliases), (*11)

php app/console elasticsearch:index:put_settings my_versionned_index --alias=my_index

Put index mappings

php app/console elasticsearch:index:put_mappings my_index my_type

Will put index mappings using another index configuration (usefull when using aliases), (*12)

php app/console elasticsearch:index:put_mappings my_versionned_index my_type --alias=my_index

Aliases Management Operations

List aliases for an index

php app/console elasticsearch:alias:list my_index

Add alias for an index

php app/console elasticsearch:alias:add my_index my_alias

If --replace options is set, an existing alias will be replaced, (*13)

php app/console elasticsearch:alias:add my_index my_alias --replace

Remove alias for an index

php app/console elasticsearch:alias:remove my_index my_alias

List indices

This command list indices, (*14)

php app/console elasticsearch:index:list

You also can filter displayed indices using regex, (*15)

php app/console elasticsearch:index:list --pattern="user*"

Reindex

This command reindex using reindex api, (*16)

php app/console elasticsearch:reindex [old-index] [new-index]

Use a different client

For all commands you can specify a different client using --client option., (*17)

eg:, (*18)

php app/console elasticsearch:index:create my_index --client=my_client_service

The Versions

22/02 2018

dev-master

9999999-dev

Bundle providing extra elastica tools for managing indices and types settings

  Sources   Download

MIT WTFPL

The Requires

 

The Development Requires

by Avatar gbprod

22/02 2018

dev-chore/licence

dev-chore/licence

Bundle providing extra elastica tools for managing indices and types settings

  Sources   Download

WTFPL

The Requires

 

The Development Requires

by Avatar gbprod

23/01 2018

v1.1.0

1.1.0.0

Bundle providing extra elastica tools for managing indices and types settings

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar gbprod

23/01 2018

dev-release/1.1.0

dev-release/1.1.0

Bundle providing extra elastica tools for managing indices and types settings

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar gbprod

23/01 2018

dev-fix/list-error

dev-fix/list-error

Bundle providing extra elastica tools for managing indices and types settings

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar gbprod

19/01 2018

dev-feat/upgrade-deps

dev-feat/upgrade-deps

Bundle providing extra elastica tools for managing indices and types settings

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar gbprod

31/12 2016

v1.0.0

1.0.0.0

Bundle providing extra elastica tools for managing indices and types settings

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar gbprod

30/12 2016

v1.0-beta.1

1.0.0.0-beta1

Bundle providing extra elastica tools for managing indices and types settings

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar gbprod

28/12 2016

v1.0-beta.0

1.0.0.0-beta0

Bundle providing extra elastica tools for managing indices and types settings

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar gbprod

15/11 2016

v0.4.0

0.4.0.0

Bundle providing extra elastica tools for managing indices and types settings

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar gbprod

11/05 2016

v0.3.0

0.3.0.0

Bundle providing extra elastica tools for managing indices and types settings

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar gbprod

22/04 2016

v0.2.0

0.2.0.0

Bundle providing extra elastica tools for managing indices and types settings

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar gbprod

19/04 2016

v0.2-beta.0

0.2.0.0-beta0

Bundle providing extra elastica tools for managing indices and types settings

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar gbprod

17/04 2016

v0.1.0

0.1.0.0

Bundle providing extra elastica tools for managing indices and types settings

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar gbprod

17/04 2016

v0.1-beta.1

0.1.0.0-beta1

Bundle providing extra elastica tools for managing indices and types settings

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar gbprod

17/04 2016

v0.1-beta.0

0.1.0.0-beta0

Bundle providing extra elastica tools for managing indices and types settings

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar gbprod