CMIS query is working in alfresco node browser but not in session.query()

465 Views Asked by At

I am using below code for retrieving some object based on creation date

String query = ContentCleaningUtil.buildQuery(fileNamePattern, uTCTimeString);
OperationContext opCon = session.createOperationContext();
opCon.setLoadSecondaryTypeProperties(true);
opCon.setMaxItemsPerPage(1000);
ItemIterable<QueryResult> results = session.query(query, false, opCon);

I am getting empty results.

The query String is:

SELECT * FROM cmis:document WHERE cmis:name LIKE '%.zip' AND cmis:creationDate > TIMESTAMP '2018-09-01T22:56:44.248Z'

But when I am firing same query in alfresco node browser setting query as cmis-alfresco, it is returning 2 desired objects.

In both case I am using store workspace://Spacestore

Can anyone please help on this.

0

There are 0 best solutions below