chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geert Zijlmans (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CMIS-767) CMIS query LIKE-predicate does not return any results from SharePoint 2013
Date Wed, 05 Mar 2014 10:07:43 GMT
Geert Zijlmans created CMIS-767:
-----------------------------------

             Summary: 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


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)

Mime
View raw message