SharePoint:从搜索中排除特定文件夹

时间:2018-04-23 12:55:36

标签: sharepoint

我一直在四处寻找,试图解决这个问题。

我有一个文档库,如下所示:site.sharepoint.com/Storage/Shared Documents/Products/

/Products/内,有许多不同的文件夹,例如/Products/Product1/ ,再在其中,我还有另外两个名为/Archive//Original/的文件夹。请注意,每个/Product/都有这两个文件夹。

我想要做的是从搜索中排除/Archive//Original/及其内容。由于每个文件夹都有这两个子文件夹,因此我无法排除特定路径,这使其更加复杂。

任何帮助都会非常适合

1 个答案:

答案 0 :(得分:0)

鉴于提供的结构

Shared Documents (library)
    |
    --Products (folder)
           |
           -- FileA.docx
           |  
           -- Product1 (folder)
               |
               --Archive (folder)
               |    |
               |    --File1_2018.docx
               |     
               --Original (folder)
                   |
                   --File1.docx

以下查询

IsDocument: 1 AND Path:https://site.sharepoint.com/Shared%20Documents/Products/Product*/Original/*.*

将返回结果:

File1.docx

其中

IsDocument: 1子查询告诉仅返回文件/页面

{weburl}/Shared Documents/Products/Product*/Original/*.*表达式告知包含与子文件夹Original对应的路径的结果

更新

就此而言,您可以使用限制文件夹深度的UrlDepth属性。

对于上面提供的示例,以下查询

IsDocument: 1 AND Path:https://site.sharepoint.com/Shared%20Documents/ AND UrlDepth=3

将返回以下结果

FileA.docx
相关问题