Here we give an example of how to create a query set to replace a TMDQ.
The following TMDQ selects all documents (cm:content) which have a dublincore aspect (cm:dublincore), a publisher (cm:publisher) equal to ‘Hachette Livre’ and a type (cm:type) equal to ‘Action’.
{
"query":{
"query":"select * from cmis:document as d join cm:dublincore as dc on d.cmis:objectId = dc.cmis:objectId where dc.cm:publisher = 'Hachette Livre' and dc.cm:type='Action'",
"language":"cmis"
}
}
The following Query Set would be able to support the above TMDQ. It also requires that at least one node in the system has the DublinCore aspect applied.
{
"version": "1",
"name": "doc_dublincore",
"properties": [
{
"name": "cm:publisher",
"isIndex": true
},
{
"name": "cm:type",
"isIndex": true
}
],
"aspects": [
{
"name": "cm:dublincore",
"isIndex": true
}
]
}