Untitled

mail@pastecode.io avatar
unknown
java
4 years ago
813 B
4
Indexable
Never
if (!StringUtils.isEmpty(rewrittenQueryTerm)) {
      String[] wordsSplitUpOnSpaceArray = rewrittenQueryTerm.split("\\s+");
      if (wordsSplitUpOnSpaceArray != null && wordsSplitUpOnSpaceArray.length > 0) {
        StringBuilder filterForManuals = new StringBuilder();
        filterForManuals.append("OR(text:manualchildpage:AND(");
        for (int i = 0; i < wordsSplitUpOnSpaceArray.length; i++) {
          filterForManuals.append("\"").append(wordsSplitUpOnSpaceArray[i]).append("\"");
          if (i != wordsSplitUpOnSpaceArray.length - 1) {
            filterForManuals.append(",");
          }
        }
        filterForManuals.append("),NOT(homepagesource_s:OR(\"spd\",\"htmlmanual\")))");
        filterWithInternalFil = mergeConditions(filterWithInternalFil, filterForManuals.toString(), "AND");
}