Alfresco Cmis Query Not Search Site Title

cancel
Showing results for 
Search instead for 
Did you mean: 
suayb58
Active Member

Alfresco Cmis Query Not Search Site Title

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
kintu_barot
Senior Member

Re: Alfresco Cmis Query Not Search Site Title

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

Regards,

Kintu

ContCentric

Regards,
Kintu
jpotts
Professional

Re: Alfresco Cmis Query Not Search Site Title

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
Active Member

Re: Alfresco Cmis Query Not Search Site Title

Can this query be case sensetive?

jpotts
Professional

Re: Alfresco Cmis Query Not Search Site Title

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.