2017 © Pedro Peláez
 

library elastica-friendly-result-set

Wraps Elastica's ResultSet objects.

image

kissge/elastica-friendly-result-set

Wraps Elastica's ResultSet objects.

  • Thursday, July 28, 2016
  • by kissge
  • Repository
  • 1 Watchers
  • 0 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

ElasticaFriendlyResultSet

Build Status Coverage Status, (*1)

Thin but powerful wrapper for ruflin/Elastica., (*2)

Installation

Simply add this library to your project as a dependency:, (*3)

composer require kissge/elastica-friendly-result-set

Usage

Example 1., (*4)

use Kissge\ElasticaFriendlyResultSet\Aggregations;

$index = $container->get('fos_elastica.index.<index name>'); // Symfony assumed, but that's not necessary
$aggs = new Aggregations($index->search($query)->getAggregations());

foreach ($aggs-><aggregation name> as $key => $bucket) {
    do_something($bucket-><subaggregation name>);
    do_something($bucket-><subaggregation name>-><term name>);
}

Example 2., (*5)

use Kissge\ElasticaFriendlyResultSet\Aggregations;

$aggs = new Aggregations($index->search($query)->getAggregations());
$this->render($view, ['aggs' => $aggs]);
{% for key, interval in aggs.interval %}
    <tr>
        <th>
            {{ key }}
        </th>

        <td>
            {{ interval.visitors.female }}
        </td>
        <td>
            {{ interval.visitors.male }}
        </td>
        <td>
            {{ interval.averageScore }}
        </td>
    </tr>
{% endfor %}

Author

Yuto Kisuge, (*6)

License

This library is licensed under the MIT License. See LICENSE for the complete license., (*7)

The Versions

28/07 2016

dev-master

9999999-dev

Wraps Elastica's ResultSet objects.

  Sources   Download

MIT

The Requires

 

The Development Requires

28/07 2016

1.2.0

1.2.0.0

Wraps Elastica's ResultSet objects.

  Sources   Download

MIT

The Requires

 

The Development Requires

28/07 2016

1.1.0

1.1.0.0

Wraps Elastica's ResultSet objects.

  Sources   Download

MIT

The Requires

 

The Development Requires

26/07 2016

1.0.0

1.0.0.0

Wraps Elastica's ResultSet objects.

  Sources   Download

MIT

The Requires

 

The Development Requires