code: protected function getFilterSearch(PaginateFinderConfiguration $configuration) {
          $filter = array();
          $name = $configuration->getSearchIndex('name');
          $language = $configuration->getSearchIndex('language');
          if (null !== $name && $name !== '' && null !== $language && $language !== '' ) {
              $filter['names.' . $language] = new \MongoRegex('/.*'.$name.'.*/i');
          }
  
          $linkedToSite = $configuration->getSearchIndex('linkedToSite');
          if (null !== $linkedToSite && $linkedToSite !== '') {
              $filter['linkedToSite'] = (boolean) $linkedToSite;
          }
  
          $contentTypeId = $configuration->getSearchIndex('contentTypeId');
          if (null !== $contentTypeId && $contentTypeId !== '') {
              $filter['contentTypeId'] =new \MongoRegex('/.*'.$contentTypeId.'.*/i');
          }
  
          return $filter;
      }
docs: @param PaginateFinderConfiguration $configuration
  
  @return array