0

我无法将共享点搜索限制为仅检索文件夹。

我正在对搜索 api 运行休息请求

https://(sharepoint url)/ian/_api/search/query?querytext='metatest3'

这仅检索此集合中的文件夹,但是当我使用

https://(sharepoint url)/ian/_api/search/query?querytext='metatest3 and IsContainer:1'

这不会检索文件夹,也找不到任何结果。

我很困惑,因为当返回第一个 API 调用时,我有

<d:element m:type="SP.KeyValue">
    <d:Key>IsContainer</d:Key>
    <d:Value>true</d:Value>
    <d:ValueType>Edm.Boolean</d:ValueType>
</d:element>
4

1 回答 1

2

我们可以使用下面的 REST API 仅搜索文件夹。

https://(sharepoint url)/ian/_api/search/query?querytext='metatest3 contenttypeid:0x0120*'

或者

https://(sharepoint url)/ian/_api/search/query?querytext='metatest3 IsContainer:true'
于 2019-08-13T02:13:31.053 回答