cancel
Showing results for 
Search instead for 
Did you mean: 

Alfresco Cmis Query Not Search Site Title

suayb58
Champ on-the-rise
Champ on-the-rise

Hello,Everyone.I'm trying to search the site through cmis query.But cmis query does not search the site title.cmis: title  cannot find site title .I'm waiting for your help on this.

{
"query": {
"query": "SELECT * FROM st:site where (cmis:name LIKE '%PJ001%' or cmis:description LIKE '%Proje Do%')",
"language": "cmis"
},
"include": ["allowableOperations","properties"],
"fields": ["id","aspectNames", "name", "properties","allowableOperations"],
"paging": {
"maxItems": "10",
"skipCount": "0"
}
}

4 REPLIES 4

kintu_barot
Star Collaborator
Star Collaborator

This may be helpful to you CMIS Query to get documents with a specific aspect property value 

Regards,

Kintu

ContCentric

Regards,
Kintu

jpotts
World-Class Innovator
World-Class Innovator

You say you want to search against title but I don't see it in your query. As Kintu points out, if you actually do want to search against title, you'll need to do a join because title is in the cm:titled aspect.

Here is a CMIS query that searches for sites with name, description or title like "%jtp%":

SELECT S.cmis:name, T.cm:title FROM st:site as S join cm:titled as T on S.cmisSmiley SurprisedbjectId = T.cmisSmiley SurprisedbjectId where (S.cmis:name LIKE '%jtp%' or T.cmis:description LIKE '%jtp%' or T.cm:title LIKE '%jtp%')

suayb58
Champ on-the-rise
Champ on-the-rise

Can this query be case sensetive?

jpotts
World-Class Innovator
World-Class Innovator

I believe the use of "LIKE" makes the query case-insensitive. If you use "=" instead then it becomes case-sensitive, but then you cannot use a wildcard.