02-24-2021 07:07 AM
Is it possible to compare property values using the fts (or cmis) query language? I have tried the following:
{ "query": { "query": "TYPE:'my:type' AND (cm:name != my:prop)", "language": "afts" }, "include": ["properties"], "paging": { "maxItems": "1000", "skipCount": "0" } }
And :
{ "query": { "query": "SELECT * FROM my:type WHERE my:prop IS NOT NULL AND my:prop <> cm:name", "language": "cmis" }, "include": ["properties"], "paging": { "maxItems": "1000", "skipCount": "0" } }
02-25-2021 10:35 AM
AFTS on SOLR could theoretically support something like this using conditions with query functions, but you could very likely not use the short prefix names, which need translation to proper field names by Alfresco, and likely only work in those "typical" and supported use cases of regular searches.
CMIS QL should support this as column references can be used on either side of an operator. Though of course you cannot use cm:name and have to use cmis:name, and obviously have to deal with table aliases when doing joins on aspects and stuff.
In any case, I seriously doubt anyone else has every tried any of those approaches. My money is on "FTS = no way", and "CMIS = maybe if you correct your query"
Explore our Alfresco products with the links below. Use labels to filter content by product module.