CMIS predicate for unset property when searching in SOLR?

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

CMIS predicate for unset property when searching in SOLR?

When I perform a database search using CMIS, I can check if a certain property has been set or has a null value using IS NULL, i.e.

cm:myProperty IS NULL

This finds a number of nodes where the property is never initialized or has been explicitly set to null. However, when I point the same query to SOLR, it finds nothing. The data should have been indexed succesfully, so it seems I need to express my query in some other way. With AFTS I can check if the value has been set to anything with the negation of EXISTS, i.e.

NOT EXISTS:'cm:myProperty'

However, I'd rather not use AFTS. Is there any way to make this work with CMIS?

2 Replies
s3rg3d
Partner

Re: CMIS predicate for unset property when searching in SOLR?

Same question 2 years later. Does anybody have an idea on how to do that ?

angelborroy
Alfresco Employee

Re: CMIS predicate for unset property when searching in SOLR?

In CMIS you cannot search for an unset property.

As an alternative, you can check by an unset aspect:

SELECT * FROM cmis:document WHERE not CONTAINS('ASPECT:\'cm:titled\'')
Hyland Developer Evangelist