Home

CMIS query for unique values in a property

You are here

2 posts / 0 new
Last post
CMIS query for unique values in a property

Can I use CMIS to query for the unique property values of an object type? Can I use the distinct or group by clause?

eg: select distinct cmis:name from dl:dataList OR select cmis:name from dl:dataList group by cmis:name

If not, what is the alternate in Alfresco because doing this outside Alfresco will be a big performance hit and it would sound like a big limitation for the Alfresco product.

Re: CMIS query for unique values in a property

Neither select distinct nor group by is supported by the CMIS specification. So it isn't really a limitation of the product--if it were in the spec we'd have to implement it. I suppose the best you can do is an order by and then iterate over the results, maintaining your own distinct list.

Jeff

Hire my team for your next project! Metaversant
Blog: ecmarchitect.com | Twitter: jeffpotts01
CMIS APIs: Apache Chemistry | CMIS and Apache Chemistry in Action
Alfresco tutorials: Alfresco Developer Series

forums index