Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Schema.org 谷歌自定义搜索引擎的搜索结果中不包括PageMap_Schema.org_Google Custom Search_Json Ld_Google Rich Snippets_Structured Data - Fatal编程技术网

Schema.org 谷歌自定义搜索引擎的搜索结果中不包括PageMap

Schema.org 谷歌自定义搜索引擎的搜索结果中不包括PageMap,schema.org,google-custom-search,json-ld,google-rich-snippets,structured-data,Schema.org,Google Custom Search,Json Ld,Google Rich Snippets,Structured Data,我有一个自定义搜索引擎和自己的React客户端,它使用CSE json API呈现搜索结果。我想使用结构化数据显示丰富的结果,所以我在源HTML文件中添加了一个页面映射。但是谷歌的搜索结果不包含页面地图中的任何数据 结构化数据通常用于过滤搜索结果。这里我关心的是在自定义搜索结果中接收结构化数据这一更简单的问题,因此我可以自己呈现它 以下是my CSE中一个站点的示例源HTML页面: 查看来源: 它的标题中有一个PageMap(以及使用schema.org的产品的ld+json): 问题:我做错了

我有一个自定义搜索引擎和自己的React客户端,它使用CSE json API呈现搜索结果。我想使用结构化数据显示丰富的结果,所以我在源HTML文件中添加了一个页面映射。但是谷歌的搜索结果不包含页面地图中的任何数据

结构化数据通常用于过滤搜索结果。这里我关心的是在自定义搜索结果中接收结构化数据这一更简单的问题,因此我可以自己呈现它

以下是my CSE中一个站点的示例源HTML页面:

查看来源:

它的标题中有一个PageMap(以及使用schema.org的产品的ld+json):

问题:我做错了什么?这是包含页面地图的正确方式吗?我的pagemap字段是否应该合并到每个结果项中的pagemap对象中

更多详情:

此页面的结构化数据测试工具会找到ld+json,但找不到页面映射:

RichResults测试还显示ld+json数据,但不显示PageMap

这是一篇文章,展示了一个自定义页面地图在搜索结果中的显示。这就是我希望看到的。这仅仅是付费水平的一个特征吗

谷歌的这篇文章说:“请注意,目前CSE不支持JSON-LD。”


PageMap似乎是结构化数据的首选方法。一定有办法让它发挥作用。

我没有足够的耐心。18个html文件中的一个现在与我的大部分页面地图数据一起显示在搜索结果中。它们都有相同的格式,所以我可能需要等待更多的时间,等待谷歌以同样的方式处理它们

     "pagemap": {
        "cse_thumbnail": [
          {
            "src": "https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcRtbYjjezl1LjCPxzWlcqP8qqUwOZ31ap1fvMz9w5tq1YYY8_pSL4ITR6E",
            "width": "203",
            "height": "249"
          }
        ],
        "cse_image": [
          {
            "src": "http://www.johndimm.com/eleventh-hour/papyritec/images/nanotile01.jpg"
          }
        ]
      }
由于某种原因,其中一个字段仍然丢失。文档对象有描述、评级和产品名称,但没有产品id

但这回答了我的问题。这里描述的设置确实有效,自定义页面映射数据或多或少地传递给搜索结果

      "pagemap": {
        "thumbnail": [
          {
            "src": "Oryzasil.png",
            "width": "300"
          }
        ],
        "document": [
          {
            "rating": "4.0",
            "description": "Silicon based aerogel blanket. Super low thermal conductivity: 0.020 W/mK at 10mm. Comes in different thickness of 3mm, 5mm, and 10mm. Contact us for a product recommendation. Used predominantly in oil and gas industries.",
            "product_name": "Silicon hydrophobic aerogel"
          }
        ],
        "metatags": [
          {
            "viewport": "width=device-width, initial-scale=1.0, maximum-scale=1.0, \n  user-scalable=no"
          }
        ],
        "cse_image": [
          {
            "src": "http://www.johndimm.com/eleventh-hour/papyritec/images/Oryzasil.png",
            "width": "247",
            "type": "1",
            "height": "204"
          }
        ]
      }

你应该编辑你的帖子以删除API密钥。谢谢Andy。搜索结果的链接不再有效,但此链接可以:
      "pagemap": {
        "thumbnail": [
          {
            "src": "Oryzasil.png",
            "width": "300"
          }
        ],
        "document": [
          {
            "rating": "4.0",
            "description": "Silicon based aerogel blanket. Super low thermal conductivity: 0.020 W/mK at 10mm. Comes in different thickness of 3mm, 5mm, and 10mm. Contact us for a product recommendation. Used predominantly in oil and gas industries.",
            "product_name": "Silicon hydrophobic aerogel"
          }
        ],
        "metatags": [
          {
            "viewport": "width=device-width, initial-scale=1.0, maximum-scale=1.0, \n  user-scalable=no"
          }
        ],
        "cse_image": [
          {
            "src": "http://www.johndimm.com/eleventh-hour/papyritec/images/Oryzasil.png",
            "width": "247",
            "type": "1",
            "height": "204"
          }
        ]
      }