简体   繁体   中英

Sharepoint 2010 Search Results and Author

I would like to remove CreatedBy from being included in the Authors property. 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. 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.

Any suggestions here? - Thanks

I ended up modifying the Core Results XSL to exclude the first author:

<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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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