SharePoint Search API从网站集中的所有文档库中获取项目 [英] SharePoint Search API To Get Items From All the Document Libraries in a Site Collection
问题描述
大家好,
任何人都可以帮助他构建SharePoint搜索API URL,以从特定网站集中的所有文档库中获取所有项目.
Can anyone help he to build SharePoint search API URL to get all the items from all the document libraries in a specific site collection.
我尝试了以下选项;
似乎这样是从所有文档库(包括站点资产"和页面")返回项目,我需要的只是来自用户定义的文档库的结果.
seems like this is returning items from all the document library including Site Assets and Site Pages, what I need was results only from user defined document libraries.
这是从所有网站集返回项目,而不是从一个指定的路径返回.
This is returning items form all the site collection, not from the one specified path.
预先感谢
推荐答案
阿努普,
使用ContentClass:STS_ListItem_DocumentLibrary时,它将返回基于文档库的所有库中的所有项目.
When you use ContentClass:STS_ListItem_DocumentLibrary, it will return all items from all libraries which are based on Document Library.
您要查询的这些库中的项目是否还有另一个属性,例如列?
Is there another property for items of these libraries that you want to query, like a column?
如果这些项目没有其他属性,作为一种解决方法,您可能需要在查询文本中键入这些库的所有路径,并使用OR进行串联.
If there is no another property for these items, as a workaround, you may need to type all paths of these libraries in query text and use OR to concatenate them.
或其他解决方法,创建一个网站栏并将其添加到要查询的所有库中,然后使用PowerShell cmdlet设置所有项目的值.之后,对您的内容源进行爬网.然后在您的查询文本中,使用网站"列托管属性 过滤项目.
Or another workaround, create a site column and add it to all libraries that you want to query, then use PowerShell cmdlets to set a value for all items. After that, crawl your content source. Then in your query text, use the site column managed property to filter items.
谢谢
温迪
这篇关于SharePoint Search API从网站集中的所有文档库中获取项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!