@Test public void testClean() { String test = "+-!(){}[]^\"~*?:&&||&|"; String expected = "\\+\\-\\!\\(\\)\\{\\}\\[\\]\\^\\\"\\~\\*\\?\\:\\&\\&\\|\\|&|"; assertEquals(expected, IndexUtils.clean(test)); }
public static String clean(String q) { q = q.replaceAll(charCleanerRegex, "\\\\$1"); q = q.replaceAll("\\&\\&", "\\\\&\\\\&"); q = q.replaceAll("\\|\\|", "\\\\|\\\\|"); return q; }
IndexUtils { public static String clean(String q) { q = q.replaceAll(charCleanerRegex, "\\\\$1"); q = q.replaceAll("\\&\\&", "\\\\&\\\\&"); q = q.replaceAll("\\|\\|", "\\\\|\\\\|"); return q; } }
IndexUtils { public static String clean(String q) { q = q.replaceAll(charCleanerRegex, "\\\\$1"); q = q.replaceAll("\\&\\&", "\\\\&\\\\&"); q = q.replaceAll("\\|\\|", "\\\\|\\\\|"); return q; } private  IndexUtils(); }
IndexUtils { public static String clean(String q) { q = q.replaceAll(charCleanerRegex, "\\\\$1"); q = q.replaceAll("\\&\\&", "\\\\&\\\\&"); q = q.replaceAll("\\|\\|", "\\\\|\\\\|"); return q; } private  IndexUtils(); static String clean(String q); static String serializeDate(Date date); static String serializeDateRange(Date startDate, Date endDate); }
IndexUtils { public static String clean(String q) { q = q.replaceAll(charCleanerRegex, "\\\\$1"); q = q.replaceAll("\\&\\&", "\\\\&\\\\&"); q = q.replaceAll("\\|\\|", "\\\\|\\\\|"); return q; } private  IndexUtils(); static String clean(String q); static String serializeDate(Date date); static String serializeDateRange(Date startDate, Date endDate);  }