问题
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 withPerson
:AggregateRating
→itemReviewed
→Person
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