【问题标题】:Google CSE: File uploading is not successfulGoogle CSE:文件上传不成功
【发布时间】:2014-11-06 11:35:38
【问题描述】:

当我尝试将自动建议的 xml 文件上传到 Google 的自定义站点搜索时,我遇到了上述错误。我尝试将文件缩减到最低限度,以查看是否可以隔离问题,但即使以下内容也无法上传:

<?xml version="1.0" encoding="utf-8"?>
<Autocompletions>
    <Autocompletion term="My term" type="1" />
</Autocompletions>

我是否遗漏了一些非常明显的东西?

亲切的问候, 卡尔

【问题讨论】:

    标签: google-custom-search


    【解决方案1】:

    事实证明,尽管 Google 提供了相反的信息,但“语言”属性是必需的,即使它的值为空白。我添加了,文件成功导入了。

    <?xml version="1.0" encoding="utf-8"?>
    <Autocompletions>
        <Autocompletion term="My term" type="1" language="" />
    </Autocompletions>
    

    【讨论】:

      【解决方案2】:

      确保您的编码是 UTF-8。此外,term="" 即 XML 文件中不应有空词。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2013-11-12
        • 2011-07-18
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-10-07
        相关资源
        最近更新 更多