docs: public static void parseAndAddDictionaries(SolrClient client, CmsObject cms) {
  
          if ((null == client) || (null == cms)) {
              return;
          }
  
          // Set the correct cms context
          setCmsOfflineProject(cms);
  
          try {
              // Get all file resources in the default dictionary directory
              final List<CmsResource> resources = cms.getResourcesInFolder(
                  DEFAULT_DICTIONARY_DIRECTORY,
                  CmsResourceFilter.DEFAULT_FILES);
  
              for (final CmsResource resource : resources) {
                  final String resourceName = resource.getName();
                  // Check if the name of the file matches the dictionary naming scheme
                  String lang = null;
                  if (resourceName.matches(DICTIONARY_NAME_REGEX)) {
                      // Extract the language code that consists of two letters (de, en, es, ...)
                      lang = resourceName.substring(5, 7);
                  } else if (resourceName.matches(CUSTOM_DICTIONARY)) {
                      lang = resourceName.substring(12, 14);
                  }
  
                  if (null != lang) {
                      // Read the file
                      final CmsFile file = cms.readFile(resource);
  
                      // Parse file content and add it to the server
                      final List<SolrInputDocument> documents = new ArrayList<SolrInputDocument>();
  
                      readAndAddDocumentsFromStream(
                          client,
                          lang,
                          new ByteArrayInputStream(file.getContents()),
                          documents,
                          true);
  
                      // Add and commit the remaining documents to the server
                      addDocuments(client, documents, true);
                  }
              }
  
          } catch (CmsException e) {
              LOG.warn("Could not read from resource. ");
          } catch (IOException e) {
              LOG.warn("Could not successfully parse the dictionary. ");
          } catch (SolrServerException e) {
              LOG.warn("Exception while adding documents to Solr server. ");
          }
      }