code: @Override
      public Set<String> search(String resourceLocation, Pattern pattern)
              throws IndexingFailure, ResourceDownloadError {
          if (resourceLocation == null) {
              throw new InvalidArgument("resourceLocation", resourceLocation);
          }
          if (pattern == null) {
              throw new InvalidArgument("pattern", pattern);
          }
  
          // check and open namespace for this resource location
          synchronized (resourceLocation) {
              if (!isOpen(resourceLocation)) {
                  String indexPath = doCompile(resourceLocation);
                  openNamespace(resourceLocation, indexPath);
              }
          }
  
          return doSearch(resourceLocation, pattern);
      }
docs: {@inheritDoc}