code: public CmsGallerySearchResult searchByPath(String path, Locale locale) throws CmsException {
  
          I_CmsSearchDocument sDoc = m_index.getDocument(CmsSearchField.FIELD_PATH, path);
          CmsGallerySearchResult result = null;
          if ((sDoc != null) && (sDoc.getDocument() != null)) {
              result = new CmsGallerySearchResult(sDoc, m_cms, 100, locale);
          } else {
              CmsResource res = m_cms.readResource(path, CmsResourceFilter.IGNORE_EXPIRATION);
              result = new CmsGallerySearchResult(m_cms, res);
          }
          return result;
      }
docs: Searches by structure id.<p>
  
  @param path the resource path
  @param locale the locale for which the search result should be returned
  
  @return the search result
  
  @throws CmsException if something goes wrong