code: public static String escapeLuceneQuery(final CharSequence text) {
          if (text == null) {
              return null;
          }
          final int size = text.length() << 1;
          final StringBuilder buf = new StringBuilder(size);
          appendEscapedLuceneQuery(buf, text);
          return buf.toString();
      }
docs: Escapes the text passed in so that it is treated as data instead of
  control characters.
  
  @param text data to be escaped
  @return the escaped text.