You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@chemistry.apache.org by "Geert Zijlmans (JIRA)" <ji...@apache.org> on 2014/03/05 11:15:43 UTC
[jira] [Commented] (CMIS-767) CMIS query LIKE-predicate does not
return any results from SharePoint 2013
[ https://issues.apache.org/jira/browse/CMIS-767?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13920715#comment-13920715 ]
Geert Zijlmans commented on CMIS-767:
-------------------------------------
Thanks, though I found the following blog item (http://social.technet.microsoft.com/Forums/sharepoint/en-US/1429000d-fa87-4ce0-948f-235c2630b926/does-sharepoint-2013-support-contains-and-like-for-cmis-query-statement?forum=sharepointgeneral) referring to this topic, which brought me here.
Let me file a bug with Microsoft as well
> CMIS query LIKE-predicate does not return any results from SharePoint 2013
> --------------------------------------------------------------------------
>
> Key: CMIS-767
> URL: https://issues.apache.org/jira/browse/CMIS-767
> Project: Chemistry
> Issue Type: Bug
> Components: opencmis-client
> Affects Versions: OpenCMIS 0.10.0
> Environment: SharePoint 2013 installation
> Reporter: Geert Zijlmans
> Labels: 2013, cmis,, like-predicate, paging, query,, sharepoint, skipping,
>
> 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);
> }
--
This message was sent by Atlassian JIRA
(v6.2#6252)