Mirocow/yii2-elasticsearch

View on GitHub
src/components/queries/Aggregation/AggregationInterface.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php
namespace mirocow\elasticsearch\components\queries\Aggregation;

interface AggregationInterface
{
    /**
     * Generate the query to be submitted to Elasticsearch
     *
     * @return array
     */
    public function generateQuery();

    /**
     * Return an array representing the parsed results
     *
     * @param array $results raw results from Elasticsearch
     * @return array
     */
    public function generateResults($results);
}