code: private String stemQuery(String queryString) {
      StringBuilder stringBuilder = new StringBuilder();
      Set<String> uniqueTerms =
          Sets.newHashSet(queryString.toLowerCase().trim().split(NON_WORD_SEPARATOR));
      uniqueTerms.removeAll(NGramDistanceAlgorithm.STOPWORDSLIST);
      for (String word : uniqueTerms) {
        if (StringUtils.isNotEmpty(word.trim()) && !(ELASTICSEARCH_RESERVED_WORDS.contains(word))) {
          String afterStem = Stemmer.stem(removeIllegalCharWithEmptyString(word));
          if (StringUtils.isNotEmpty(afterStem)) {
            stringBuilder.append(afterStem).append(SINGLE_WHITESPACE);
          }
        }
      }
      return stringBuilder.toString().trim();
    }
docs: A helper function to produce fuzzy match query with 80% similarity in elasticsearch because
  PorterStem does not work in some cases, e.g. the stemming results for placenta and placental
  are different, therefore would be missed by elasticsearch