简体   繁体   English

Sharepoint 2010搜索结果和作者

[英]Sharepoint 2010 Search Results and Author

I would like to remove CreatedBy from being included in the Authors property. 我想从Creates属性中删除CreatedBy。 We are uploading documents to be indexed and createdby will never be an author of the document. 我们正在上传要被索引和创建的文档,永远不会是该文档的作者。 The metadata author should be the only author to appear for a search results and refinement panel. 元数据作者应该是出现在搜索结果和优化面板中的唯一作者。

I was able to modify the XSL for the core results and just removed the author from being displayed. 我能够修改XSL以获得核心结果,只是从显示中删除了作者。 Now, my issue is the refinement panel lists the createdby user an author. 现在,我的问题是优化面板列出了用户创建的作者。

I have removed the CreatedBy metadata property and attempted to modify the Author(Text) property to only included the metadataAuthor with no luck. 我删除了CreatedBy元数据属性,并尝试将Author(Text)属性修改为仅包含metadataAuthor,但运气不佳。

Any suggestions here? 有什么建议吗? - Thanks - 谢谢

I ended up modifying the Core Results XSL to exclude the first author: 我最终修改了Core Results XSL以排除第一作者:

<xsl:template name="DisplayAuthors">
  <xsl:param name="author" /> 
  <xsl:if test="string-length($author) &gt; 0"> 
   <xsl:value-of select="$Authors" />
   <xsl:choose>
   <xsl:when test="string-length(author_multival) &gt; 0"> 
   <xsl:for-each select="author_multival">
    <xsl:variable name="p" select="position()"/>
    <xsl:if test="$p &gt; 1">
       <xsl:value-of select="."/>
       <!--<xsl:text disable-output-escaping="yes">&#44;</xsl:text> 
       <xsl:text disable-output-escaping="yes">&#32;</xsl:text> -->
    </xsl:if>
  </xsl:for-each>
  </xsl:when>
  <xsl:otherwise>
   <xsl:value-of select="author"/>      
  </xsl:otherwise>
  </xsl:choose>
  </xsl:if>
</xsl:template>

And for the refinement panel I added a Custom Filter for authors as the list is pretty static. 在优化面板中,我添加了一个针对作者的自定义过滤器,因为该列表非常静态。 Any author not in the list are excluded from the refinement list. 不在列表中的任何作者都将从优化列表中排除。

you may able to do that. 您也许可以做到。 as crawled property has both together. 因为抓取的属性同时存在。

Office:4(Text) =Author, MetadataAuthor  

you may use custom crawled property to achieve that. 您可以使用自定义抓取的属性来实现。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM