首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Review中的aggregateRating

Review中的aggregateRating
EN

Stack Overflow用户
提问于 2017-10-11 19:52:04
回答 1查看 1.4K关注 0票数 1

我们试图使用aggregateRating标记,但是我们在SDTT中得到了这个警告

aggregateRating对象中的Review属性作为创造性的工作应用于评审本身。你是想用reviewRating代替。

我们希望聚合来自所有用户的评论,而不是使用reviewRating (我们已经将该评论用于我们自己的评论)。

有人知道如何修复这个错误吗?

JSON-LD (示例页):

代码语言:javascript
复制
<script type="application/ld+json">
{
    "@context": "http://schema.org",
    "@type": "Review",
    "name": "It",
    "datePublished": "2017-09-06",
    "description": "Based on Stephen King's 1986 novel, […]",
    "url": "https://dev.commonsensemedia.org/movie-reviews/it",
    "reviewBody": "Based on Stephen King's 1986 novel, […]",
    "author": {
        "@type": "Person",
        "name": "Jeffrey M. Anderson",
        "sameAs": "https://dev.commonsensemedia.org/users/jeffrey-m-anderson"
    },
    "itemReviewed": {
        "@type": "Movie",
        "name": "It",
        "sameAs": "http://www.imdb.com/title/tt1396484/",
        "datePublished": "2017-09-08",
        "image": {
            "@type": "ImageObject",
            "url": "image.jpg"
        },
        "director": {
            "@type": "Person",
            "name": "Andres Muschietti"
        },
        "actor": [
            {
                "@type": "Person",
                "name": "Bill Skarsg\u00e5rd"
            },
            {
                "@type": "Person",
                "name": "Jaeden Lieberher"
            },
            {
                "@type": "Person",
                "name": "Finn Wolfhard"
            }
        ]
    },
    "publisher": {
        "@type": "Organization",
        "name": "Common Sense Media",
        "sameAs": "https://www.commonsensemedia.org"
    },
    "reviewRating": {
        "@type": "Rating",
        "ratingValue": "4"
    },
    "aggregateRating": {
        "@type": "AggregateRating",
        "ratingValue": "4.04651",
        "bestRating": 5,
        "worstRating": 1,
        "reviewCount": "43",
        "name": "Parents say",
        "description": "All parent member reviews for It"
    }
}
</script>
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-10-13 11:07:13

当您将aggregateRating属性添加到Review项时,聚合评等是针对评审的,而不是针对评审项的。

如果聚合评等是针对评审项的,则必须将aggregateRating添加到此项目(例如,Movie)。

如果这是您想要的,您可以将aggregateRating移到Movie下,例如:

代码语言:javascript
复制
{
    "@context": "http://schema.org",
    "@type": "Review",

    "itemReviewed": {
        "@type": "Movie",

        "aggregateRating": {
          "@type": "AggregateRating"
        }

    }
}
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46696416

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档