cancel
Showing results for 
Search instead for 
Did you mean: 

CMIS Query - contains with * wildcard

iv0id
Champ in-the-making
Champ in-the-making
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.
5 REPLIES 5

kaynezhang
World-Class Innovator
World-Class Innovator
Upgrade to a newer alfresco version ,both of the two queries(including using doc_test keyword) will return all of the three nodes

iv0id
Champ in-the-making
Champ in-the-making
thank you kaynezhang for your reply, will the 4.2.f version do the work ?

kaynezhang
World-Class Innovator
World-Class Innovator
It should work,you can download 4.2.f and give it a test.

iv0id
Champ in-the-making
Champ in-the-making
So i upgraded to 4.2.f and here is the results : for both keywords if i use only "keyword" it returns the last two nodes (doc_test_public_100_25-09-2014 and doc_test_private30-09-2014) but if i include the * it returns all the nodes. i'll keep this version for now since it respond to my needs

kaynezhang
World-Class Innovator
World-Class Innovator
OK good luck
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.