Grouping records together, Providing content in the feed – Google Search Appliance Feeds Protocol Developers Guide User Manual
Page 11

Google Search Appliance: Feeds Protocol Developer’s Guide
11
Grouping Records Together
Record elements must be contained inside the group element. The group element also allows you to
apply an action to many records at once. For example, this:
<group action="delete">
<record url="http://www.corp.enterprise.com/hello01" mimetype="text/plain"/>
<record url="http://www.corp.enterprise.com/hello02" mimetype="text/plain"/>
<record url="http://www.corp.enterprise.com/hello03" mimetype="text/plain"/>
</group>
Is equivalent to this:
<record url="http://www.corp.enterprise.com/hello01" mimetype="text/plain
"action="delete"/>
<record url="http://www.corp.enterprise.com/hello02" mimetype="text/plain"
action="delete"/>
<record url="http://www.corp.enterprise.com/hello03" mimetype="text/plain"
action="delete"/>
However, if you define any actions for records as a group, the record’s definition always overrides the
group’s definition. For example:
<group action="delete">
<record url="http://www.corp.enterprise.com/hello01" mimetype="text/plain"/>
<record url="http://www.corp.enterprise.com/hello02" mimetype="text/plain"
action="add"/>
<record url="http://www.corp.enterprise.com/hello03" mimetype="text/plain"/>
</group>
In this example, hello01 and hello03 would be deleted, and hello02 would be updated.
Providing Content in the Feed
You add document content by placing it inside the record definition for your content feed. You can
compress content to improve performance, for more information, see “Content Compression” on
page 12.
For example, using text content:
<record url="..." mimetype="text/plain">
<content>Hello world. Here is some page content.</content>
</record>
You can also define content as HTML:
<record url="..." mimetype="text/html">
<content><![CDATA[<html> <title>hello world</title>
<body>
<p>Here is some page content.</p>
</body> </html>]]></content>
</record>
To include non-text documents such as .pdf or .doc files, you must encode the content by using
base64 encoding and specifying the appropriate mimetype. Using base64 encoding ensures that the
feed can be parsed as valid XML.