Search folder empty

cancel
Showing results for 
Search instead for 
Did you mean: 
franciscoduarte
Member II

Search folder empty

Hello,

I created a folder through the ModuleImporter:

<?xml version="1.0" encoding="UTF-8"?>
<view:view xmlns:view="http://www.alfresco.org/view/repository/1.0">
<view:reference xmlns:rule="http://www.alfresco.org/model/rule/1.0"
xmlns:cm="http://www.alfresco.org/model/content/1.0"
xmlns:sys="http://www.alfresco.org/model/system/1.0"
view:pathref="/app:company_home/st:sites/cm:example-site/cm:documentLibrary/cm:ParentFolder">
<view:associations>
<cm:contains>
<cm:folder view:childName="cm:Folder_x0020_Example">
<view:aspects>
<cm:titled/>
<cm:auditable/>
<sys:referenceable/>
<cm:taggable/>
<sys:localized/>
</view:aspects>
<view:acl/>
<view:properties>
<cm:title>
<view:mlvalue view:locale="en">Folder Example</view:mlvalue>
</cm:title>
<cm:taggable>
<view:value view:isNull="true"/>
</cm:taggable>
<cm:description>
<view:mlvalue view:locale="en">Folder for examples</view:mlvalue>
</cm:description>
<cm:creator>admin</cm:creator>
<sys:node-uuid>0e1ac905-07bc-476c-bd6b-f2dndc1a6c1b</sys:node-uuid>
<cm:name>Folder Example</cm:name>
<sys:store-protocol>workspace</sys:store-protocol>
<sys:store-identifier>SpacesStore</sys:store-identifier>
<sys:locale>en_GB_</sys:locale>
<cm:modifier>admin</cm:modifier>
</view:properties>
</cm:folder>
</cm:contains>
</view:associations>
</view:reference>
</view:view>

 But when I try to get the folder using this from the Java API:

this.searchService.selectNodes(rootNodeRef, "/app:company_home/st:sites/cm:example-site/cm:documentLibrary/cm:ParentFolder/cm:Folder_x0020_Example", new QueryParameterDefinition[0], this.namespaceService,
true);

 I get an empty list! Is there any property that I should specify in the xml that would make this folder discoverable?

Folders that have not been created through ModuleImporter are discoverable.

 

Best regards,

Francisco Duarte

1 Reply
franciscoduarte
Member II

Re: Search folder empty

I think I figured the issue. In this line:

<cm:folder view:childName="cm:Folder_x0020_Example">

I added the _x0020_ to represent the white space but it seems that I shouldn't have done that.

If I create a folder like this:

<cm:folder view:childName="cm:Folder Example2">

The folder is returned. Is there a way to change the childname?