AnsweredAssumed Answered

Inconsistent CMIS query results using OR operator

Question asked by charlie.k on Jun 8, 2015
Hello,

I upgraded my Alfresco installation to 5.0.d (linux,  mysql, solr4) and noticed that CMIS queries which use OR operator behave strangely. If I have such a query it starts acting as if I am using "like" operator:

Query 1:
SELECT cmis:createdBy FROM cmis:document WHERE IN_FOLDER('<some id>')
Results: 2
test1
test2

Query 2:
SELECT cmis:createdBy FROM cmis:document WHERE IN_FOLDER('<some id>') AND cmis:createdBy = 'test'
Results: 0

Query 3:
SELECT cmis:createdBy FROM cmis:document WHERE IN_FOLDER('<some id>') AND (cmis:createdBy = 'test' OR cmis:createdBy = 'blablabla')
Results: 2
test1
test2

Query 1 and 2 gives me good results, but what happened to query 3? Tested this with my standard and custom fields - both times I get unexpected results. How do I fix query 3 so it gives me 0 results?

Is this an Alfresco bug? Maybe a patch is available? As it seems as a really huge bug.

Best regards
Charlie

Outcomes