I’ve been running into all sorts of issues trying to use CONTAINS to search for escaped characters… specifically, these characters (’, ", \) (single quote, double quote, backslash). I haven’t been able to find a way to make escaping these characters work 100%. For example…
Does anyone know the difference between these 2 queries and why one executes and the other errors out?
SELECT x FROM data WHERE CONTAINS(x, ‘\\’) <-- WORKS FINE
SELECT x FROM data WHERE CONTAINS(x, “\\”) <-- ERRORS OUT
Another example, trying to escape single and double quotes within each respective quotes…
SELECT x FROM data WHERE CONTAINS(x, ‘\’’) <-- ERRORS OUT
SELECT x FROM data WHERE CONTAINS(x, “\”") <-- WORKS FINE
What’s up with N1QL and these escapable characters? Any help or advise would be most appreciated.
Thanks!