AnsweredAssumed Answered

CMIS Query - contains with * wildcard

Question asked by iv0id on Oct 17, 2014
Latest reply on Oct 21, 2014 by kaynezhang
Hello,

I've been using cmis query lately and i'm facing a problem using the CONTAINS() predicate function.
So, lets say we have the following documents that are all of the same type :

<ul>
<li>doc_test_100_25-09-2014 </li>
<li>doc_test_public_100_25-09-2014</li>
<li>doc_test_private30-09-2014</li>
</ul>

<strong>Query 1 : </strong>
When i execute this query :
SELECT D.cmis:name FROM cmis:document D WHERE CONTAINS(D,'cmis:name:test')

i get "doc_test_public_100_25-09-2014" and "doc_test_private30-09-2014" as results

<strong>Query 2 : </strong>
But when append "*" to the query
SELECT D.cmis:name FROM cmis:document D WHERE CONTAINS(D,'cmis:name:test*')
i get all the documents as a results

Why in the "Query 1" i get only the last two documents (even the first document contains also the word "test") and in the "Query 2" i get all the documents.

in the same logic if i use the word "doc_test" in the contains function it returns the last two documents but if is use "doc_test*" it doesn't return any results.

Outcomes