I'm trying to 'hide' text file that is linked to my PDF in a different store, hoping it would not get listed in search results together with the PDF it is linked to. (I.e. I only want the PDF to be listed; currently I get listed both.)I hope it is possible in the first place…My intention has been to keep the txt-files stored in the other store in a folder structure reflecting the one my PDF files are in. The problem is I get following error when trying to create the hierarchy…
The association source type is incorrect:
Source Node: workspace://IndexesStore/3f8e4d82-2be9-4f55-9dcc-71d9eda431b8
Association: Association[ class=ClassDef[name={http://www.alfresco.org/model/content/1.0}folder], name={http://www.alfresco.org/model/content/1.0}contains, target class={http://www.alfresco.org/model/system/1.0}base, source role=null, target role=null]
Required Source Type: {http://www.alfresco.org/model/content/1.0}folder
Actual Source Type: {http://www.alfresco.org/model/system/1.0}store_root
I believe it is because I'm trying to create a folder in a storeRef, in other words I don't know how to create a root folder.This is how I'm creating the folders, including the root one.NodeRef parentNodeRef = nodeService.getRootNode(targetStore);
…
while(…)
{
…
folderRef = nodeService.createNode(parentNodeRef, ContentModel.ASSOC_CONTAINS, QName.createQName(NamespaceService.APP_MODEL_1_0_URI, newFolderName), ContentModel.TYPE_FOLDER)
}(I went through some Wiki examples but they usually create a folder within another folder.)Any ideas on what I am doing wrong, please? (Is it possible to hide content from search by placing it into alternate store?)