SharePoint 2010:限制搜索以在匹配其子项后返回文档集
在 SharePoint Server 2010 中,假设我设置了一个文档集并在其中放入了一些 Word 文档。每个 Word 文档都包含一个仅在 Word 文档正文中找到的常用短语。
当搜索每个Word文档中存在的这个常见短语时,有没有办法在搜索结果中仅返回文档集,而不是返回每个单独的Word文档?
In SharePoint Server 2010, say I set up a Document Set and put some Word documents in it. Each Word document contains a common phrase that is found only in the body of the Word Documents.
When searching for this common phrase that exists in each of the Word Documents, is there a way to return only the Document Set in the search results, instead of returning each individual Word document?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用此语法:
在此处找到此内容
Use this syntax:
Found this here
自定义 XSLT
如果短语始终相同,您可以专门为此搜索创建一个搜索页面。从帖子中不清楚您是否需要范围,您可以使用有限的搜索,即“此列表”类型的东西。您可以自定义核心结果 Web 部件以添加具有文档集名称/标题的列。更新 XSLT 以仅在搜索结果中显示项目的文档集名称/标题。这假设结果只是文档集,如果搜索将返回与其他项目混合的文档集,您仍然可以在 XSLT 中包含条件逻辑,以便仅在搜索项目是文档集时显示文档集标题/名称。
示例
合并具有相同架构的文档 - 或者在您的情况下,将相同架构中的类似元素组合起来。
(来自书中的解决方案 6.4)
执行集合操作,例如使用 XPath 对节点集进行并集。
(来自书中的解决方案7.1)
书籍推荐
XSLT Cookbook by Sal Mangano,由 O'Reilly 出版
Customize the XSLT
If the phrase is always the same, you can create a search page just for this search. From the post it is not clear whether you would need a scope, you could use a limited search, i.e. 'this list' type of thing. You can customize the core results web part to add the column with the doc set name/title. Update the XSLT to only show the doc set name/title of items in the search results. This assumes that the results are only doc sets, if the search will return doc sets mixed in with other items, you can still include conditional logic in the XSLT to only display the doc set title/name when the search item is a doc set.
Samples
Merging documents with identical schema -- or in your case, combining like elements in the same schema.
(from solution 6.4 in the book)
Perform set operations, like a union on node sets using XPath.
(from solution 7.1 in the book)
Book Recommendation
XSLT Cookbook by Sal Mangano, published by O'Reilly