code: private SpellCheckResponse performSpellcheckQuery(CmsSpellcheckingRequest request) {
  
          if ((null == request) || !request.isInitialized()) {
              return null;
          }
  
          final String[] wordsToCheck = request.m_wordsToCheck;
  
          final ModifiableSolrParams params = new ModifiableSolrParams();
          params.set("spellcheck", "true");
          params.set("spellcheck.dictionary", request.m_dictionaryToUse);
          params.set("spellcheck.extendedResults", "true");
  
          // Build one string from array of words and use it as query.
          final StringBuilder builder = new StringBuilder();
          for (int i = 0; i < wordsToCheck.length; i++) {
              builder.append(wordsToCheck[i] + " ");
          }
  
          params.set("spellcheck.q", builder.toString());
  
          final SolrQuery query = new SolrQuery();
          query.setRequestHandler("/spell");
          query.add(params);
  
          try {
              QueryResponse qres = m_solrClient.query(query);
              return qres.getSpellCheckResponse();
          } catch (Exception e) {
              LOG.debug("Exception while performing spellcheck query...", e);
          }
  
          return null;
      }
docs: Performs the actual spell check query using Solr.
  
  @param request the spell check request
  
  @return Results of the Solr spell check of type SpellCheckResponse or null if something goes wrong.