code: protected function filterSearch(PaginateFinderConfiguration $configuration, Stage $qa)
      {
          $search = $configuration->getSearchIndex('name');
          if (null !== $search && $search !== '') {
              $qa->match(array('name' => new \MongoRegex('/.*'.$search.'.*/i')));
          }
  
          return $qa;
      }
docs: @param PaginateFinderConfiguration $configuration
  @param Stage                       $qa
  
  @return array