cancel
Showing results for 
Search instead for 
Did you mean: 

Find noderef of folder based on path without solr

yash_patel_c2
Star Contributor
Star Contributor

Hi Team,

I want to find noderef of the folder based on its path in java webscript. I have disabled solr in my Alfresco. How can I get it using cmis or any other way which does not use solr?

Thanks

2 REPLIES 2

afaust
Legendary Innovator
Legendary Innovator

WIthout SOLR, you essentially have to use Alfresco's Java API (either FileFolderService.resolveNamePath(), SearchService.selectNodes() or iteratively NodeService.getChildByName()) to resolve a path to a node reference. Depending on which API you use, there are some differences in semantics / limitations. E.g. FileFolderService only allows you to deal with - as the name suggests - files and folders, and any nodes not fitting into those two base types will be unsupported. It also limits you to the cm:contains association for paths. SearchService.selectNodes() requires you to use an XPath, and NodeService.getChildByName() requires you to split your path and iteratively perform the lookup - but both are unrestricted with regards to type of nodes and child associations supported.

kaynezhang
World-Class Innovator
World-Class Innovator

You can try to use getObjectByPath(String path) method of cmis Session interface