
Google Search Appliance: Administrative API Developer’s Guide: Protocol 49
A KeyMatch configuration rule is in the following format:
Search_Terms,KeyMatch_Type,URL,Title
The
KeyMatch_Type
is one of the three values,
KeywordMatch
,
PhraseMatch
, and
ExactMatch
. The
Search_Terms
and
URL
fields cannot be empty. The KeyMatch configuration conforms to the CSV
format, which uses a comma to separate values.
Retrieving KeyMatch Settings
To get KeyMatch settings, send an authenticated
GET
request to the following URL:
http://Search_Appliance:8000/feeds/keymatch/
Front_End_Name?query=Search_String&startLine=Start_Line&maxLines=Max_Lines;
The following example retrieves KeyMatch settings—note that
gsa:content name="2"
(or
0
or
1
)
shows the use of the
line_number
property:
<?xml version="1.0" ?>
<entry xmlns="http://www.w3.org/2005/Atom"
xmlns:gsa="http://schemas.google.com/gsa/2007">
<id>http://ent1:8000/feeds/keymatch/default_frontend</id>
<updated>2008-12-05T03:13:19.806Z</updated>
<link href="http://ent1:8000/feeds/keymatch/default_frontend"
rel="self" type="application/atom+xml"/>
<link href="http://ent1:8000/feeds/keymatch/default_frontend"
rel="edit" type="application/atom+xml"/>
<gsa:content name="entryID">default_frontend</gsa:content>
<gsa:content name="2">
Google News,ExactMatch,http://news.google.com/,News
</gsa:content>
<gsa:content name="numLines">3</gsa:content>
<gsa:content name="1">
Google Search,PhraseMatch,http://www.google.com/,I’m Feeling Lucky!
</gsa:content>
<gsa:content name="0">
Python,KeywordMatch,http://www.python.org/,Python Programming Language
</gsa:content>
</entry>
startLine
The starting line number of the KeyMatch configuration to change. The
minimum value is
0
.
updateMethod
The method to change KeyMatch configurations. Possible values are:
•
update
. Update part of the KeyMatch configuration table to the new
configurations. You can also delete KeyMatch configurations using the
update
method, as shown in “Updating KeyMatch Settings” on page 50.
•
append
. Add a new KeyMatch configuration to the end of the KeyMatch
configuration table.
•
replace
. Delete all rules in the KeyMatch configuration table and then
append the new rules that you provide.
Property Description
Komentarze do niniejszej Instrukcji