0

CMIS search is there a way to search for all

In SQL it would be

select ID 
from mvTo
where name in ('john', 'sally', 'same') 
group by ID 
having count(*) = 3 

assume unique index on name

paparazzo
  • 44,497
  • 23
  • 105
  • 176
  • please read this two posts it may help you http://stackoverflow.com/questions/39458669/how-to-filter-folder-children-using-cmis-query/39467372#39467372 and http://stackoverflow.com/questions/39468515/how-to-do-mass-update-in-alfresco-using-cmis/39470100#39470100 – Yagami Light Sep 27 '16 at 07:22
  • This link states having is not supported https://community.alfresco.com/docs/DOC-5898-cmis-query-language – paparazzo Sep 27 '16 at 11:57

1 Answers1

1

If you have a single-value property, such as cmis:createdBy, you can write a query that matches on any value in a list, like this:

SELECT * FROM cmis:document where cmis:createdBy in ('jpotts', 'admin', 'tuser1')

If you have a multi-value property, and you want to match if any of the values match, you can use the ANY keyword, like:

SELECT * FROM cmis:document where ANY sc:someMultiValuedProp in ('val1', 'val2', 'val3')

Group by is not supported.

For more information on what you can do with CMIS queries, read the Query Language Definition section of the CMIS specification.

Jeff Potts
  • 10,468
  • 17
  • 40