code: public CmsGallerySearchResultList getResult(CmsGallerySearchParameters params) throws CmsException {
  
          CmsGallerySearchResultList result = null;
          if ((m_cms == null) || (m_index == null)) {
              throw new CmsException(Messages.get().container(Messages.ERR_SEARCH_NOT_INITIALIZED_0));
          }
          result = m_index.gallerySearch(m_cms, params);
  
          if (result.size() > 0) {
  
              result.calculatePages(params.getResultPage(), params.getMatchesPerPage());
  
          } else {
              result = new CmsGallerySearchResultList();
          }
  
          return result;
      }
docs: Returns the gallery search result list.<p>
  
  @param params the gallery search parameters
  
  @return the gallery search result list
  
  @throws CmsException if the search failed