我的审查数据围绕people https://schema.org/Person.
我想用结构化数据来表示这些评论。
像这样的东西:(从这里 http://moz.com/ugc/getting-the-most-out-of-schemaorg-microformats)
这就是我尝试过的:(这是 Google 图书示例的变体here https://developers.google.com/structured-data/rich-snippets/reviews#marking_up_an_aggregate_rating)
<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>
现在当我在中测试这段代码时谷歌的测试工具 https://developers.google.com/structured-data/testing-tool/,我收到错误:
Google 无法识别某个对象的aggregateRating 属性
类型为 Person。
那么这是否意味着没有办法利用结构化数据对人进行评分呢?
The aggregateRating财产 http://schema.org/aggregateRating仅定义为CreativeWork
/Offer
/Organization
/Place
/Product
,但不适合Person
.
备择方案:
-
AggregateRating http://schema.org/AggregateRating定义了itemReviewed财产 http://schema.org/itemReviewed,它期望Thing
作为值,所以它可以与Person
:
AggregateRating
→ itemReviewed
→ Person
-
您可能还想考虑是否真的是在这里进行评级的人,而不是这个人提供的东西(即,像体检这样的服务):
Person
→ makesOffer http://schema.org/makesOffer → Offer
Offer
→ aggregateRating http://schema.org/aggregateRating → AggregateRating
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)