code: public QueryRule createDisMaxQueryRuleForAttribute(
        Set<String> searchTerms, Collection<OntologyTerm> ontologyTerms) {
      List<String> queryTerms = new ArrayList<>();
  
      if (searchTerms != null) {
        queryTerms.addAll(
            searchTerms
                .stream()
                .filter(StringUtils::isNotBlank)
                .map(this::processQueryString)
                .collect(Collectors.toList()));
      }
  
      // Handle tags with only one ontologyterm
      ontologyTerms
          .stream()
          .filter(ontologyTerm -> !ontologyTerm.getIRI().contains(COMMA_CHAR))
          .forEach(ot -> queryTerms.addAll(parseOntologyTermQueries(ot)));
  
      QueryRule disMaxQueryRule = createDisMaxQueryRuleForTerms(queryTerms);
  
      // Handle tags with multiple ontologyterms
      ontologyTerms
          .stream()
          .filter(ontologyTerm -> ontologyTerm.getIRI().contains(COMMA_CHAR))
          .forEach(ot -> disMaxQueryRule.getNestedRules().add(createShouldQueryRule(ot.getIRI())));
  
      return disMaxQueryRule;
    }
docs: Create a disMaxJunc query rule based on the given search terms as well as the information from
  given ontology terms
  
  @return disMaxJunc queryRule