<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Using special characters (greater than) in CMIS CONTAINS() in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/using-special-characters-greater-than-in-cmis-contains/m-p/134842#M36265</link>
    <description>&lt;P&gt;May be try escaping the angle brackets, at least basic escaping should work (&lt;SPAN&gt;\&amp;lt; and \&amp;gt; should convert to &amp;lt; and &amp;gt;&lt;/SPAN&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;SELECT * FROM si:myNodeType WHERE cm:name LIKE 'Some name' AND CONTAINS('\&amp;lt;myTag\&amp;gt;hello\&amp;lt;/myTag\&amp;gt;')
&lt;/PRE&gt;
&lt;P&gt;According to &lt;A href="https://hub.alfresco.com/t5/alfresco-content-services-forum/cmis-how-to-escape-dashes-in-property-names/m-p/82645/highlight/true#M4600" target="_self" rel="nofollow noopener noreferrer"&gt;this&amp;nbsp;&lt;/A&gt;special characters are not allowed in the string value. I am not sure if it is still the case.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 08 Mar 2022 22:01:26 GMT</pubDate>
    <dc:creator>abhinavmishra14</dc:creator>
    <dc:date>2022-03-08T22:01:26Z</dc:date>
    <item>
      <title>Using special characters (greater than) in CMIS CONTAINS()</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/using-special-characters-greater-than-in-cmis-contains/m-p/134841#M36264</link>
      <description>&lt;P&gt;Hello, I need to query SOLR data using CMIS. I need to look at a combination of node properties and the content. The content of the nodes are XML data and I need to find key/value pairs of certain values.&amp;nbsp;&lt;/P&gt;&lt;P&gt;With AFTS I can succesfully search in content like:&lt;/P&gt;&lt;PRE&gt;content:"&amp;lt;myTag&amp;gt;hello&amp;lt;/myTag&amp;gt;"&lt;/PRE&gt;&lt;P&gt;In CMIS, you can search in content in the same way using CONTAINS().&lt;/P&gt;&lt;P&gt;So I'm trying to do something like:&lt;/P&gt;&lt;PRE&gt;SELECT * FROM si:myNodeType WHERE cm:name LIKE 'Some name' AND CONTAINS('&amp;lt;myTag&amp;gt;hello&amp;lt;/myTag&amp;gt;')&lt;/PRE&gt;&lt;P&gt;This fails as it seems like the parser is not able to interpret the CONTAINS value literally:&lt;/P&gt;&lt;PRE&gt; Caused by: NoViableAltException(61@[445:1: ftsTest : ( ( ftsFieldGroupProximity )=&amp;gt; ftsFieldGroupProximity -&amp;gt; ^( PROXIMITY ftsFieldGroupProximity ) | ( ftsRange )=&amp;gt; ftsRange -&amp;gt; ^( RANGE ftsRange ) | ( ftsFieldGroup )=&amp;gt; ftsFieldGroup -&amp;gt; ftsFieldGroup | ( ftsTermOrPhrase )=&amp;gt; ftsTermOrPhrase | ( ftsExactTermOrPhrase )=&amp;gt; ftsExactTermOrPhrase | ( ftsTokenisedTermOrPhrase )=&amp;gt; ftsTokenisedTermOrPhrase | LPAREN ftsDisjunction RPAREN -&amp;gt; ftsDisjunction | template -&amp;gt; template );])
sirene-ass_1       |    at org.alfresco.repo.search.impl.parsers.FTSParser$DFA17.specialStateTransition(FTSParser.java:17490)
sirene-ass_1       |    at org.antlr.runtime.DFA.predict(DFA.java:80)
sirene-ass_1       |    at org.alfresco.repo.search.impl.parsers.FTSParser.ftsTest(FTSParser.java:2691)&lt;/PRE&gt;&lt;P&gt;If I leave out the tags and just search for 'hello' for instance, content search works fine. How can I force the parser to understand that I want to search for this exact string?&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2022 12:59:39 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/using-special-characters-greater-than-in-cmis-contains/m-p/134841#M36264</guid>
      <dc:creator>jecbm</dc:creator>
      <dc:date>2022-03-08T12:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: Using special characters (greater than) in CMIS CONTAINS()</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/using-special-characters-greater-than-in-cmis-contains/m-p/134842#M36265</link>
      <description>&lt;P&gt;May be try escaping the angle brackets, at least basic escaping should work (&lt;SPAN&gt;\&amp;lt; and \&amp;gt; should convert to &amp;lt; and &amp;gt;&lt;/SPAN&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;SELECT * FROM si:myNodeType WHERE cm:name LIKE 'Some name' AND CONTAINS('\&amp;lt;myTag\&amp;gt;hello\&amp;lt;/myTag\&amp;gt;')
&lt;/PRE&gt;
&lt;P&gt;According to &lt;A href="https://hub.alfresco.com/t5/alfresco-content-services-forum/cmis-how-to-escape-dashes-in-property-names/m-p/82645/highlight/true#M4600" target="_self" rel="nofollow noopener noreferrer"&gt;this&amp;nbsp;&lt;/A&gt;special characters are not allowed in the string value. I am not sure if it is still the case.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2022 22:01:26 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/using-special-characters-greater-than-in-cmis-contains/m-p/134842#M36265</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2022-03-08T22:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: Using special characters (greater than) in CMIS CONTAINS()</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/using-special-characters-greater-than-in-cmis-contains/m-p/134843#M36266</link>
      <description>&lt;P&gt;Escaping does not work. Interestingly enough, there is no error if I use &lt;EM&gt;multiple&lt;/EM&gt; backslashes, as in&amp;nbsp; CONTAINS('abc\\&amp;lt;') but no results are found either. I wonder what query is generated in that case.&lt;/P&gt;&lt;P&gt;The linked topic seems to refer to the behavior of the CMISParser class, whereas the CONTAINS() FTS value is parsed by CMISFTSQueryParser, so I wouldn't assume they are the same.&lt;/P&gt;&lt;P&gt;I have become aware that we are running version 1.2 of the search services. I wonder if more recent versions have solved the issue.&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 13:23:29 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/using-special-characters-greater-than-in-cmis-contains/m-p/134843#M36266</guid>
      <dc:creator>jecbm</dc:creator>
      <dc:date>2022-03-10T13:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: Using special characters (greater than) in CMIS CONTAINS()</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/using-special-characters-greater-than-in-cmis-contains/m-p/134844#M36267</link>
      <description>&lt;P&gt;It appears that I've figured it out. You have to escape the FTS statement as a whole, i.e :&lt;/P&gt;&lt;PRE&gt;SELECT * FROM si:myNodeType WHERE cm:name LIKE 'Some name' AND CONTAINS('\'&amp;lt;myTag&amp;gt;hello&amp;lt;/myTag&amp;gt;\'')&lt;/PRE&gt;</description>
      <pubDate>Fri, 11 Mar 2022 14:10:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/using-special-characters-greater-than-in-cmis-contains/m-p/134844#M36267</guid>
      <dc:creator>jecbm</dc:creator>
      <dc:date>2022-03-11T14:10:21Z</dc:date>
    </item>
    <item>
      <title>Re: Using special characters (greater than) in CMIS CONTAINS()</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/using-special-characters-greater-than-in-cmis-contains/m-p/134845#M36268</link>
      <description>&lt;P&gt;So escaping does work. Glad you could figure out.&lt;/P&gt;</description>
      <pubDate>Sat, 12 Mar 2022 19:35:57 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/using-special-characters-greater-than-in-cmis-contains/m-p/134845#M36268</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2022-03-12T19:35:57Z</dc:date>
    </item>
  </channel>
</rss>

