protected function filterSearch(PaginateFinderConfiguration $configuration, Stage $qa)
    {
        $filter = array();
        $label = $configuration->getSearchIndex('label');
        if (null !== $label && $label !== '') {
            $filter['label'] = new \MongoRegex('/.*'.$label.'.*/i');
        }

        $components = $configuration->getSearchIndex('components');
        if (null !== $components && is_array($components) && !empty($components)) {
            $filter['component'] =  array('$in' => $components);
        }

        if (!empty($filter)) {
            $qa->match($filter);
        }

        return $qa;
    }
protected function filterSearch(PaginateFinderConfiguration $configuration, Stage $qa)
    {
        $filter = array();
        $label = $configuration->getSearchIndex('label');
        if (null !== $label && $label !== '') {
            $filter['label'] = new \MongoRegex('/.*'.$label.'.*/i');
        }

        $components = $configuration->getSearchIndex('components');
        if (null !== $components && is_array($components) && !empty($components)) {
            $filter['component'] =  array('$in' => $components);
        }

        if (!empty($filter)) {
            $qa->match($filter);
        }

        return $qa;
    }
@param PaginateFinderConfiguration $configuration
@param Stage                       $qa

@return array