title: JCR-SQL - contains function doesn't escape special characters?
body: <p>I have the following query string:</p>
  
  <p><code>SELECT jcr:title, jcr:created, jcr:description FROM cq:PageContent WHERE jcr:path LIKE '/content/.../%' AND CONTAINS (., '*') ORDER BY date ASC</code></p>
  
  <p>The problem is that the query is returning all nodes from the given path even though they don't have asterisk in any proeprty. I wanted to escape the asterisk character, but the result is the same. I've tried something like this:</p>
  
  <p><code>SELECT jcr:title, jcr:created, jcr:description FROM cq:PageContent WHERE jcr:path LIKE '/content/.../%' AND CONTAINS (., '\*') ORDER BY date ASC</code> </p>
  
  <p>or even something like this:</p>
  
  <p><code>SELECT jcr:title, jcr:created, jcr:description FROM cq:PageContent WHERE jcr:path LIKE '/content/.../%' AND CONTAINS (., '\*\*\*\*\*\*\*\*\*\*\*') ORDER BY date ASC</code></p>
  
  <p>In all these queries, the result is the same, even though none of these pages have property which contains the asterisk character (or 11 of them)</p>
  
  <p>The <a href="https://docs.adobe.com/docs/en/spec/jcr/1.0/6.6.5.2_jcr_contains_Function.html" rel="nofollow noreferrer">documentation of jcr:contains function</a> says:</p>
  
  <blockquote>
    <p>Within the searchexp literal instances of single quote (“'”), double quote (“"”) and hyphen (“-”) must be escaped with a backslash (“\”). Backslash itself must therefore also be escaped, ending up as double backslash (“\”).</p>
  </blockquote>
  
  <p>Other characters like <code>*</code> are not mentioned so it should work even without any escaping (?). Please let me understand why I'm getting such results here and how to properly escape such chars.</p>