Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Not A Problem
-
OpenCMIS 0.10.0
-
None
-
SharePoint 2013 installation
Description
A CMIS query using the LIKE-predicate does not return any results when querying SharePoint 2013.
Knowing there is a document called 'Super Test.pdf'
Example CMIS query with LIKE-predicate does not return any result:
SELECT * FROM cmis:document WHERE cmis:name LIKE '%Test%'
Example CMIS query with equal-sign does return exact result:
SELECT * FROM cmis:document WHERE cmis:name = 'Super Test.pdf'
Example code:
String query = "SELECT * FROM cmis:document WHERE cmis:name LIKE '%"keyword"%'";
OperationContext operationContext = session.createOperationContext();
operationContext.setMaxItemsPerPage(maxItemsPerPage);
ItemIterable<QueryResult> qr = session.query(query, false, operationContext).skipTo(skipCount); //.getPage();
for (QueryResult hit : qr) {
String objectId = hit.getPropertyValueById(PropertyIds.OBJECT_ID);
System.out.println(objectId);
}