可以使用结构化数据查看人员吗?

时间:2015-03-29 12:06:02

标签: schema.org microdata rich-snippets

我的评论数据以people为中心。

我想用结构化数据来表示这些评论。

这样的事情:(from here

enter image description here

这就是我尝试的内容:(它是Google书籍示例here的一种变体)

<div itemscope itemtype="http://schema.org/Person">
  <h2>
    <span itemprop="honorificPrefix">Dr</span>
    <span itemprop="name">Joe Smith</span>
  </h2>
  <h3 itemprop="jobTitle">Doctor</h3>
  <div itemprop="description">Extra super Doctor</div>
  <div itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating">
    <div>Doctor rating:
      <span itemprop="ratingValue">88</span> out of 
      <span itemprop="bestRating">100</span> with
      <span itemprop="ratingCount">20</span> ratings
    </div>
  </div>
</div>

现在,当我在Google's testing tool中测试此代码时,出现错误:

  

Google无法识别对象的属性aggregateRating   类型为人。

那么这是否意味着没有办法对结构化数据的人进行评分?

2 个答案:

答案 0 :(得分:4)

aggregateRating property仅针对CreativeWork / Offer / Organization / Place / Product定义,但不适用于Person }。

备选方案:

  • AggregateRating定义了itemReviewed property,其中Thing为值,因此可以与Person一起使用:

    AggregateRatingitemReviewedPerson

  • 你可能还想考虑一下这个人是否真的被评为此人,而不是这个人提供的东西(即医疗检查等服务):

    PersonmakesOfferOffer
    OfferaggregateRatingAggregateRating

答案 1 :(得分:0)

您也可以尝试使用RDFa文档,设置foaf和架构前缀和URI,然后使用schema:ratingValue作为about =“person”的属性。谷歌肯定会在他们的测试网站上验证这种方法。但是,我不确定它是否以及如何在Google搜索中出现。

相关问题