Github user anujgandharv commented on a diff in the pull request: https://github.com/apache/jena/pull/406#discussion_r183507712 --- Diff: jena-text-es/src/main/java/org/apache/jena/query/text/es/TextIndexES.java --- @@ -422,6 +422,27 @@ public EntityDefinition getDocDef() { } private String parse(String fieldName, String qs, String lang) { + //Escape special characters if any in the query string + qs = qs.replaceAll("\\:", "\\\\:") --- End diff -- So this is indeed a bit of a style question. But keeping that aside, under the hood, ```str.replaceAll()``` is equivalent to ```Pattern.compile(regex).matcher(str).replaceAll(repl)``` I can rewrite the ```str.replaceAll``` like above, but I genuinely do not see any major gains. You get to make the final call. :) Changing it is quite trivial from my side. Its more the logistics that I would like to avoid, if possible.
---