2017 © Pedro Peláez
 

library elasticsearch

Elastica Nette extension

image

flandera/elasticsearch

Elastica Nette extension

  • Thursday, January 11, 2018
  • by flandera
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Elasticsearch connector for Nette

Extension for using Elastica client in Nette aplications. Functional for connecting to Elasticsearch 6.1 Class is focused to autoload config values for Elastica and instantiate client. Uses Ruflin/Elastica for connect and operate over elasticsearch in object oriented style (source: https://github.com/ruflin/Elastica) (documentation: http://elastica.io/), (*1)

  • Easy config
  • Autowired config values, instantiated client

Requirements

  • PHP >=5.6
  • Composer >= 1.0
  • Ruflin/Elastica >= 5.3

Instalation

Install with composer: 1, Add this repository to your composer.json 2, Manually run composer require flandera/elastica_extension 3, Add to your config.neon configuration, (*2)

Configuration

    1. Register this extension in config.neon:

    extensions:
        elasticSearch: Flandera\ElasticaExtension\ElasticaExtension

    services:
        ElasticService:
                factory: Flandera\ElasticaExtension\ElasticaExtension
                inject: true    

    2. Set configuration for extension (in your config.local.neon):

    elasticSearch:
        host: 127.0.0.1
        port: 9200
        user: elastic
        password: changeme
        path: NULL
        proxy: NULL
        transport: 'Http'
        persistent: on
        timeout: 300
        config:
            curl: [] # curl options
            headers: [] # additional curl headers
            url: [] # completely custom URL endpoint
            user: elastic
            password: changeme
        roundRobin: off
        retryOnConflict: 0

Main configuration

  • host - ip or url of elasticsearch server
  • user - for use with Xpack
  • password - for use with Xpack

Usage

Instantitate in constructor of class:, (*3)

public function __construct(Client $client) {
        $this->client = $client;
    }

Use Elastica methods:, (*4)

$this->client->getIndex('MyIndex');

The Versions

11/01 2018

dev-master

9999999-dev https://github.com/flandera/ElasticaExtension

Elastica Nette extension

  Sources   Download

GPL-3.0 BSD-3-Clause GPL-2.0

The Requires

 

by Tomáš Flandera

elasticsearch connector elastica nette extension

11/01 2018

v1.1

1.1.0.0 https://github.com/flandera/ElasticaExtension

Elastica Nette extension

  Sources   Download

GPL-3.0 BSD-3-Clause GPL-2.0

The Requires

 

by Tomáš Flandera

elasticsearch connector elastica nette extension

11/01 2018

v1.0

1.0.0.0 https://github.com/flandera/ElasticaExtension

Elastica Nette extension

  Sources   Download

GPL-3.0 BSD-3-Clause GPL-2.0

The Requires

 

by Tomáš Flandera

elasticsearch connector elastica nette extension