docs: private static String escapeMetacharsIfAny(String key){
  
          char[] keyChars = key.toCharArray();
  
          // String.replace replaces all instances of the char sequence. So, it would try to escape the occurrence as many times as the occurrence frequency.
          // For ex: if a key as 2 '5star.rating.1', it would escape it twice resulting in 5star//.rating//.1.
          // So, we keep an list of already seen characters.
  
          Set<Character> charsAlreadySeen = new HashSet<>();
  
          for(char keychar: keyChars) {
  
              switch (keychar) {
  
                  case '(':
                  case '[':
                  case '{':
                  case '\\':
                  case '^':
                  case '$':
                  case '|':
                  case ')':
                  case '?':
                  case '+':
                  case '.':
  
                      if(!charsAlreadySeen.contains( keychar )){
  
                          key = key.replace(String.valueOf(keychar), "\\" + keychar);
  
                          charsAlreadySeen.add(keychar);
                      }
                      break;
  
                  default:
                      break;
              }
          }
          return key;
      }