Reputation: 83
I have a java backed webscript. I use SearchService
method to get the NodeRef
of a folder stored in the Alfresco repository in this PATH
:
/app:company_home/app:dictionary/app:models\
I used the LANGUAGE_CMIS_STRICT
in the searchService method like this:
NodeRef activeModelRepositoryNodeRef=searchService.query(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE,
SearchService.LANGUAGE_CMIS_STRICT, "select * cmis:objectId where contains ('PATH:\"/app:company_home/app:dictionary/app:models\"')").getNodeRef(0);
to get the nodeRef of models
folder but i still getting this error in my log when i execute my query:
ERROR [extensions.webscripts.AbstractRuntime] [http-bio-8080-exec-19] Exception from executeScript: line 1:9 mismatched input 'cmis:objectId' expecting FROM ([@4,9:21='cmis:objectId',<37>,1:9]) in fromClause
Can anybody tell me what i made wrong, or telle me how to get a folder NodeRef
by using LANGUAGE_CMIS_STRICT
in SearchService
query (I don't want to use the LANGUAGE_LUCENE
).
Thanks for any help.
Upvotes: 1
Views: 1049
Reputation: 10538
This is not correct:
select * from cmis:objectId
The from clause should contain a valid type, like cmis:document or a custom type.
Maybe you meant something like:
select cmis:objectId from cmis:document
But I should also add that will return the CMIS Object ID, not the Alfresco node reference. Those are two different things, although they may look similar.
If you really want the Alfresco node ref look for a property called alfcmis:nodeRef.
Upvotes: 3