>我需要特定文件夹路径下的所有文档
我的查询是:
query = "SELECT cmis:name FROM cmis:document WHERE CONTAINS('PATH:"/app:Company Home/st:Sites/*"')"
出现以下异常:
org.apache.chemistry.opencmis.commons.exceptions.CmisRuntimeException: 05070198 Request failed 400 /solr4/alfresco/cmis?wt=json&fl=DBID%2Cscore&rows=100&df=TEXT&start=0&loc
le=en_IN&alternativeDic=DEFAULT_DICTIONARY&cmisVersion=CMIS_1_1&fq=%7B%21afts%7DAUTHORITY_FILTER_FROM_JSON&fq=%7B%21afts%7DTENANT_FILTER_FROM_JSON
at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.convertStatusCode(AbstractAtomPubService.java:487)
我的文档路径如下:
/Sites/site_name/documentLibrary/PIM Data/3600011/rnd/VphotometricDrawings.polar diagram/en
我不确定查询的 PATH 部分看起来是否正确,您可能需要对此进行研究,例如:
"从 CMI:文档中选择 * 其中 包含('路径:\"/app:company_home/st:sites/*\"')".
另请参阅以下链接:
http://docs.alfresco.com/4.1/references/API-JS-iso9075Encode.html
试试这个查询。它应该工作
String folder_query = "SELECT cmis:path,cmis:objectId,cmis:allowedChildObjectTypeIds FROM cmis:folder where CONTAINS('PATH:"/app:company_home/st:sites/cm:mysite/cm:myLibrary/"
+ your own path + "//*"')";
它将为您提供文件夹 ID。通过使用文件夹 ID,您可以访问您的文档。
String query = "Select cmis:contentStreamMimeType,cmis:objectId FROM cmis:document where IN_FOLDER('" + objectId
+ "') and cmis:contentStreamMimeType = 'application/pdf'";