0

On this page https://developers.google.com/search-appliance/documentation/64/feedsguide it talks about XML input feeds starting with:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE gsafeed PUBLIC "-//Google//DTD GSA Feeds//EN" "">
<gsafeed>
    <header>
        <datasource>sample_feed</datasource>
        <feedtype>full</feedtype>
    </header>
    <group>
        <record url="http://www.localhost.test.com/" action="add" mimetype="text/html">
            <content><![CDATA[ ...
    ...etc...

But oddly in the SalesForce connector, the OUTPUT of the SOAP XSLT (which I believe is then sent to Google) looks like:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<documents>
  <document>
    <spiheaders>
      <spiheader name="DEFAULT_MIMETYPE">text/html</spiheader>
      <spiheader name="PROPNAME_ACTION">add</spiheader>
      <spiheader name="PROPNAME_CONTENTURL">https://cs2.salesforce.com/500i0000002gIysAAE</spiheader>
      <spiheader name="PROPNAME_DISPLAYURL">https://cs2.salesforce.com/500i0000002gIysAAE</spiheader>
      <spiheader name="PROPNAME_DOCID">500i0000002gIysAAE</spiheader>
      <spiheader name="PROPNAME_ISPUBLIC">true</spiheader>
      <spiheader name="PROPNAME_MIMETYPE">text/html</spiheader>
      <spiheader name="PROPNAME_SEARCHURL"/>
      <spiheader name="PROPNAME_SECURITYTOKEN"/>
    </spiheaders>
    <metadata>
      <meta name="CaseNumber">00001000</meta>
    </metadata>
    <content encoding="none"><![CDATA[
        ...
...etc...

I believe SaleForce initially returns SOAP XML with its own fields, but then the connector applies the XSLT of your choice to convert it into XML destined for the Google Appliance.

So is the <gsafeed> just a newer dialect of GSA over some older <documents> dialect?

Note: I did search on google, but I keep finding the SalesForce specific doc. And search terms like "documents" aren't very helpful.

4

1 回答 1

1

你看到的是正确的。发送到 GSA 的提要 XML 包含记录。每个要馈送的文件将有一个记录条目。

通常,当您编写自定义连接器时,您会构建一个包含文档元数据(以及内容,如果它是内容提要)的文档列表,将其传递给连接器管理器,然后它将其转换为提要并将其发送到 GSA。您包含的第二个 XML 看起来像这样一个文档列表的 XML 表示。

因此,要回答您的问题,否 - gsafeed 不是 GSA 的新方言,而不是一些较旧的文档方言。

如果您想了解更多详细信息,请查看连接器开发人员指南。

于 2013-11-03T19:15:01.663 回答