如何在 Alfresco 中创建搜索操作

Sky*_*lue 6 alfresco alfresco-share alfresco-webscripts alfresco-enterprise

我正在使用 Alfresco Enterprise 6.2。与实时搜索类似,我正在为文档库中的文件夹创建搜索操作。

我已更新 custom-actions.js 如下:

onActionSearch: function dla_onActionSearch(record){
        window.open(Alfresco.constants.PAGECONTEXT +'dp/ws/faceted-search?', "_self");       
}
Run Code Online (Sandbox Code Playgroud)

我还添加了文件夹范围,faceted-search.get.js如下所示。我对值进行了硬编码folder1只是为了测试它是否有效:

  scopeOptions.push({
  id: "FCTSRCH_SET_FOLDER_SCOPE",
  name: "alfresco/menus/AlfCheckableMenuItem",
  config: {
    label: "folder",
    value: "folder1",
    group: "SEARCHLIST_SCOPE",
    publishTopic: "ALF_SEARCHLIST_SCOPE_SELECTION",
    checked: false,
    hashName: "scope",
    publishPayload: {
     label: "folder",
     value: "folder1"
    }
  }
});
Run Code Online (Sandbox Code Playgroud)

但是,它在执行搜索时不考虑文件夹范围。相反,它将“folder1”视为一个站点。如何在文件夹范围内正确执行搜索?

小智 2

请检查下面的小部件,它始终将范围视为 siteId。

https://dev.alfresco.com/resource/docs/aikau-jsdoc/AlfSearchList.js_.html