It is possible to review a Person with structured data?

半城伤御伤魂 提交于 2020-01-14 19:23:06

问题


I have review data centered around people.

I would like to represent these reviews with structured data.

Something like this: (from here)

This is what I tried: (It's a variation of the Google's Book example 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>

Now when I test this code in Google's testing tool, I get the error:

The property aggregateRating is not recognized by Google for an object of type Person.

So does this mean that there is there no way to rate people with structured data?


回答1:


The aggregateRating property is only defined for CreativeWork/Offer/Organization/Place/Product, but not for Person.

Alternatives:

  • AggregateRating defines the itemReviewed property, which expects a Thing as value, so it can be used with Person:

    AggregateRatingitemReviewedPerson

  • You might also want to consider if it’s really the person that gets rated here, and not something that this person offers (i.e., a service like a medical examination):

    Person → makesOffer → Offer
    Offer → aggregateRating → AggregateRating




回答2:


You also might try using an RDFa document, set the foaf and schema prefixes and URIs, and then use schema:ratingValue as a property of the about="person". Google definitely will validate this approach on their testing site. However, I'm uncertain if and how it would appear in a Google search.



来源:https://stackoverflow.com/questions/29328882/it-is-possible-to-review-a-person-with-structured-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!