【问题标题】:Using PageMap or custom Meta tags in Google Custom Search在 Google 自定义搜索中使用 PageMap 或自定义元标记
【发布时间】:2014-01-11 02:42:30
【问题描述】:

我的网站上有一个搜索引擎,它使用多个自定义字段进行搜索。我需要搜索 PDF 文件的内容,因此我正在实施 Google 自定义搜索引擎。但是,我仍然需要能够使用我的自定义过滤。

我正在尝试通过 PageMap 或带有自定义内容的元标记来执行此操作,但由于某种原因它不起作用。例如,在此页面中: http://che.org.il/?decision=%D7%99%D7%A9%D7%99%D7%91%D7%AA-%D7%9E%D7%9C%D7%92-18-%D7%AA%D7%A9%D7%A2%D7%92

我把这两种方法都放在了标题中:

<meta name="dec_sit" content="18-527" />
<meta name="dec_univ" content="" />
<meta name="dec_date" content="2013-04-30" />
<meta name="dec_category" content="46" />

<!--
<PageMap>
    <Databject type="metatags">
        <Attribute name="category">46</Attribute>
    <Attribute name="dec_date">2013-04-30</Attribute>
    <Attribute name="dec_univ"></Attribute>
    <Attribute name="dec_sit">18-527</Attribute>
</DataObject>
</PageMap>
-->

但是,当我尝试搜索属性 dec_sit 时,它不起作用: https://www.google.com/cse?cx=008755111893149603021:c5o41aeaazc&q=אודות+more:pagemap:metatags-dec_sit:18

可能是什么问题?

【问题讨论】:

  • 你得到这个答案了吗?

标签: google-custom-search


【解决方案1】:

您需要更改使用属性标签的方式。目前,您的属性标签在尝试解析 xml 时会中断。

<!--
<PageMap>
    <Databject type="metatags">
     <Attribute name="category" value="46" />
    <Attribute name="dec_date" value="2013-04-30" />
    <Attribute name="dec_univ" value="" />
    <Attribute name="dec_sit" value="18-527" />
</DataObject>
</PageMap>
-->

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-07-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-04-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多