docs: protected static String toWildcardExpression( String likeExpression ) {
          if (likeExpression.isEmpty()) {
              return likeExpression;
          }
          final int sz = likeExpression.length();
          final StringBuilder buf = new StringBuilder(sz);
          int pos = -1;
          while (++pos < sz) {
              final char c = likeExpression.charAt(pos);
              char out;
              switch (c) {
                  case '%':
                  case '*':
                      buf.append('*');
                      continue;
                  case '_':
                  case '?':
                      buf.append('?');
                      continue;
                  case '\\':
                      if (++pos < sz) {
                          out = likeExpression.charAt(pos);
                          break;
                      }
                      // weird case with a trailing backslash, treat as "escaped nothing" i.e. skip it
                      continue;
                  default:
                      out = c;
              }
              if (LUCENE_SPECIAL_CHARACTERS.indexOf(out) >= 0) {
                  buf.append('\\');
              }
              buf.append(c);
          }
          return buf.toString();
      }