src/SearchAbstract.php
public function getCollection($index, array $filters = null,
        array $queries = null, array $fieldWeights = null,
        $limit = 20, $offset = 0, $countableAttributes = null
    ) {
        $result = $this->query($index, $filters, $queries,
            $fieldWeights, $limit, $offset);

        if (is_array($result)) {
            $i = 0;

            if ($countableAttributes) {
                foreach ($countableAttributes as $attributeName) {
                    $i++;
                    $result[0]['attributes']['countable'][$attributeName] = new CountableCollection($result[$i], $attributeName);
                }
            }

            for ($l = 1; $l <= $i; $l++) {
                unset($result[$l]);
            }

            $collection = $this->factoryCollection($result);

            return $collection;
        }
    }
public function getCollection($index, array $filters = null,
        array $queries = null, array $fieldWeights = null,
        $limit = 20, $offset = 0, $countableAttributes = null
    ) {
        $result = $this->query($index, $filters, $queries,
            $fieldWeights, $limit, $offset);

        if (is_array($result)) {
            $i = 0;

            if ($countableAttributes) {
                foreach ($countableAttributes as $attributeName) {
                    $i++;
                    $result[0]['attributes']['countable'][$attributeName] = new CountableCollection($result[$i], $attributeName);
                }
            }

            for ($l = 1; $l <= $i; $l++) {
                unset($result[$l]);
            }

            $collection = $this->factoryCollection($result);

            return $collection;
        }
    }
Facade para query, obtendo resultados em objeto.