<?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 Strange results in CONTAINS() CMIS search with wildcards in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/strange-results-in-contains-cmis-search-with-wildcards/m-p/73270#M23625</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, everyone&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have detected a strange behaviour in CMIS queries using CONTAINS() and wildcards.&lt;/P&gt;&lt;P&gt;For example, I have a folder named "Someco" and I want to find it by part of its name using wildcards:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;SELECT * from cmis:folder WHERE CONTAINS('cmis:name:"*Some*"')&lt;BR /&gt;‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This query find the the folder as is expected, but if I add a 'o' or an 'a' to the query as:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;SELECT * from cmis:folder WHERE CONTAINS('cmis:name:"*Someo*"')&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The modified query find my folder too, wich is incorrect as my folder does not contains "Someo" in its name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;¿Is there any way to correct this behaviour with the syntaxis of the query?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Feb 2018 12:01:33 GMT</pubDate>
    <dc:creator>juanh</dc:creator>
    <dc:date>2018-02-15T12:01:33Z</dc:date>
    <item>
      <title>Strange results in CONTAINS() CMIS search with wildcards</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/strange-results-in-contains-cmis-search-with-wildcards/m-p/73270#M23625</link>
      <description>Hi, everyoneI have detected a strange behaviour in CMIS queries using CONTAINS() and wildcards.For example, I have a folder named "Someco" and I want to find it by part of its name using wildcards&lt;IMG id="smileyfrustrated" class="emoticon emoticon-smileyfrustrated" src="https://migration33.stage.lithium.com/i/smilies/16x16_smiley-frustrated.png" alt="Smiley Frustrated" title="Smiley Frustrated" /&gt;ELECT * from cmis:folder WHERE CONTAINS('cmis:name:"*Some*"')‍‍‍This query find the the folder as is e</description>
      <pubDate>Thu, 15 Feb 2018 12:01:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/strange-results-in-contains-cmis-search-with-wildcards/m-p/73270#M23625</guid>
      <dc:creator>juanh</dc:creator>
      <dc:date>2018-02-15T12:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: Strange results in CONTAINS() CMIS search with wildcards</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/strange-results-in-contains-cmis-search-with-wildcards/m-p/73271#M23626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have tried to reproduce this an failed. Are you sure it is finding the same folder!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Feb 2018 12:23:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/strange-results-in-contains-cmis-search-with-wildcards/m-p/73271#M23626</guid>
      <dc:creator>andy1</dc:creator>
      <dc:date>2018-02-22T12:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: Strange results in CONTAINS() CMIS search with wildcards</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/strange-results-in-contains-cmis-search-with-wildcards/m-p/73272#M23627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Andy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Yes, I'm sure. It's an issue related to FTS word stemming but I don't know if I can deactivate it in some way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Feb 2018 16:42:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/strange-results-in-contains-cmis-search-with-wildcards/m-p/73272#M23627</guid>
      <dc:creator>juanh</dc:creator>
      <dc:date>2018-02-22T16:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: Strange results in CONTAINS() CMIS search with wildcards</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/strange-results-in-contains-cmis-search-with-wildcards/m-p/73273#M23628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems you are falling foul of localised stemming. The name of a document can be treated as an identifier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;PRE class=""&gt;&lt;CODE&gt;SELECT * from cmis:folder WHERE CONTAINS('=cmis:name:"*Some*"')&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or you could just use LIKE&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class=""&gt;&lt;CODE&gt;SELECT * from cmis:folder WHERE cmis:name LIKE '%Some%'&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Name is indexed in three ways&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Localised with stemming&lt;/LI&gt;&lt;LI&gt;Split on white space and then into token parts (using WordDelimiter factory)&lt;/LI&gt;&lt;LI&gt;As a single token (an identifier)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first two options are used together. You can not split on white space and do a wildcard match on the tokens. You will always get recall from the locale bit (the first way).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It has been suggested before that we support better control here, and it is on the list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From your example, I think you should be OK with LIKE or =&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Mar 2018 16:59:38 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/strange-results-in-contains-cmis-search-with-wildcards/m-p/73273#M23628</guid>
      <dc:creator>andy1</dc:creator>
      <dc:date>2018-03-01T16:59:38Z</dc:date>
    </item>
  </channel>
</rss>

