Updating related queries – Google Search Appliance Administrative API Developers Guide: Protocol User Manual
Page 52

Google Search Appliance: Administrative API Developer’s Guide: Protocol
52
The following example retrieves related queries:
<entry xmlns="http://www.w3.org/2005/Atom"
xmlns:gsa="http://schemas.google.com/gsa/2007">
<id>http://ent1:8000/feeds/synonym/default_frontend</id>
<updated>2008-12-15T06:41:20.954Z</updated>
<link href="http://sa42.example.com:8000/feeds/synonym/default_frontend"
rel="self" type="application/atom+xml"/>
<link href="http://sa42.example.com:8000/feeds/synonym/default_frontend"
rel="edit" type="application/atom+xml"/>
<gsa:content name="entryID">default_frontend</gsa:content>
<gsa:content name="2">stock,security</gsa:content>
<gsa:content name="numLines">3</gsa:content>
<gsa:content name="1">google,googol</gsa:content>
<gsa:content name="0">airplane,aircraft</gsa:content>
</entry>
Updating Related Queries
To change related queries, send an authenticated PUT request to the following URL:
http://Search_Appliance:8000/feeds/synonym/Front_End
The following example appends related queries:
<?xml version=’1.0’ encoding=’UTF-8’?>
<entry xmlns=’http://www.w3.org/2005/Atom’
xmlns:gsa=’http://schemas.google.com/gsa/2007’>
<gsa:content name=’updateMethod’>append</gsa:content>
<gsa:content name=’newLines’>
airplane,aircraft
google,googol
stock,security
</gsa:content>
</entry>
The following example updates related queries:
<?xml version=’1.0’ encoding=’UTF-8’?>
<entry xmlns=’http://www.w3.org/2005/Atom’
xmlns:gsa=’http://schemas.google.com/gsa/2007’>
<gsa:content name=’updateMethod’>update</gsa:content>
<gsa:content name=’startLine’>0</gsa:content>
<gsa:content name=’originalLines’>
airplane,aircraft
google,googol
</gsa:content>
<gsa:content name=’newLines’>
airplane,helicopter
,
</gsa:content>
</entry>
Note: To delete an existing setting, specify a line as a single comma (,).