Repository navigation
Expand file tree
/
Copy pathprotocol.html
More file actions
536 lines (489 loc) · 25.2 KB
/
Copy pathprotocol.html
File metadata and controls
536 lines (489 loc) · 25.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Search the web together">
<meta name="author" content="searsia.org">
<link rel="icon" href="images/searsia.png">
<title>Searsia - Protocol</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/searsia-doc.css" rel="stylesheet">
</head>
<body class="searsia-doc">
<div class="container">
<!-- Static navbar -->
<nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html">Searsia</a>
</div>
<div id="navbar" class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a href="about.html">About</a></li>
<li><a href="start.html">Start</a></li>
<li class="active"><a href="protocol.html">Protocol</a></li>
<li><a href="people.html">People</a></li>
<li><a href="/blog/">Blog</a></li>
</ul>
<div class="col-sm-3 pull-right">
<form id="searsia-form" class="navbar-form" action="search.html" method="get">
<div class="input-group input-group-sm">
<input type="text" class="form-control" placeholder="search" name="q" id="query">
<div class="input-group-btn">
<button class="btn btn-default" type="submit"><span class="glyphicon glyphicon-search"></span></button>
</div>
</div>
</form>
</div>
</div><!--/.nav-collapse -->
</div><!--/.container-fluid -->
</nav>
<!-- Main component for a primary marketing message or call to action -->
<div class="row">
<div class="col-md-8">
<h1>Protocol <img src="images/searsia.png" alt=""></h1>
<p>
The Searsia protocol is a RESTful interface. The calls follow the <a href="start.html">API
templates introduced before</a>, that take a query and output JSON search results with three fields:
<code>"resource"</code> containing the resource definition; <code>"hits"</code> containing
the search results, and <code>"searsia"</code> containing the version number.
</p>
<p>The resource definition tells Searsia <em>how</em> to get search results from an external
source. Searsia copies resource definitions from other Searsia search engines, or from
files from the local file system.
</p>
<p>
This page explains how to configure Searsia by creating search engine definition files.
Searsia can add search engines that follow Searsia's JSON format,
as well as several other formats, including HTML.
</p>
<h2 id="adding-index">Adding the main engine</h2>
<p>
We will start by adding the main engine by making a file <code>index.json</code>.
The minimum information needed to add a search engine are:
</p>
<ol>
<li> The engine's definition (called <code>"resource"</code>), which needs the engine's identifier (<code>"id"</code>) that should match the file name, hence: <code>"index"</code> (excluding the file name extension).</li>
<li> The Searsia version number (<code>"searsia"</code>), which
will be <code>v1.0.0</code>.
<li> An API template (<code>"apitemplate"</code>) for getting the search results, or alternatively, the search results themselves, called <code>"hits"</code>. In this case, we add three hits containing each only an engine identifier (called <code>"rid"</code> for "resource identifier"): <code>"engine1"</code>, <code>"engine2"</code>, and <code>"engine3"</code></li>
</ol>
<p>The file <code>index.json</code> contains:</p>
<pre>
{
"resource": {
"id": "index",
"name": "My Engine"
},
"searsia": "v1.0.0",
"hits": [
{ "rid": "engine1" },
{ "rid": "engine2" },
{ "rid": "engine3" }
]
}
</pre>
<p>We can test our engine definition <code>index.json</code> as follows:</p>
<p>
<code class="block"> java -jar searsiaserver.jar -m index.json -t json</code>
</p>
<p>which gives the following output:</p>
<code class="result">
Searsia server v1.0.2<br>
Testing: index (My Engine)<br>
{"hits": [
{"rid": "engine1"},
{"rid": "engine2"},
{"rid": "engine3"}
]}<br>
Warning: less than 10 results for query: searsia; see "testquery" or "rerank".<br>
Test succeeded.
</code>
<p>
So, our test succeeded. Instead of testing the JSON output of a single engine,
we might also test all engines in the federated search engine as follows:
</p>
<p>
<code class="block"> java -jar searsiaserver.jar -m index.json -t all</code>
</p>
<p>which results in 3 errors, because we have not yet added the engines <code>engine1</code>, <code>engine2</code> and <code>engine3</code>.
</p>
<code class="result">
Searsia server v1.0.2<br>
Testing: index (My Engine)<br>
Warning: less than 10 results for query: searsia; see "testquery" or "rerank".<br>
Testing: engine1<br>
Test failed: FileNotFoundException: engine1.json (No such file or directory)<br>
Testing: engine2<br>
Test failed: FileNotFoundException: engine2.json (No such file or directory)<br>
Testing: engine3<br>
Test failed: FileNotFoundException: engine3.json (No such file or directory)<br>
ERROR: Test failed: 3 engines failed.
</code>
<p>
Let's add some more example engines below.
</p>
<h2 id="adding-searsia">Adding a Searsia engine</h2>
<p>
To add an external Searsia resource (an engine that implements the Searsia protocol, returning results of mime-type <code>application/searsia+json</code>), add the engines API template to the resource definition.
</p>
<p>The file <code>engine1.json</code> contains:</p>
<pre>
{
"resource": {
"id": "engine1",
"name": "Sheet Music",
"favicon": "https://drsheetmusic.com/images/drsheetmusic-note.png",
"apitemplate": "https://drsheetmusic.com/searsia/index.json?q={searchTerms?}&page={startPage?}"
},
"searsia": "v1.0.0",
}
</pre>
<p> The search engine definition may again be tested with:</p>
<p>
<code class="block"> java -jar searsiaserver.jar -m engine1.json -t json</code>
</p>
<h2 id="adding-html">Adding an HTML engine</h2>
<p>
Searsia can provide search results by
<a target="_blank" href="https://en.wikipedia.org/wiki/Data_scraping">scraping</a>
the HTML that search engines return for their end users. To add an HTML
resource, use <code>text/html</code> in the field
<code><a href="#field-mime-type">"mimetype"</a></code>.
As the field <code><a href="#field-api-template">"apitemplate"</a></code>,
take the resource's URL from your browser after querying the search engine,
replacing the query in the url by <code>{searchTerms}</code>. If the URL
does not contain a query, the search engine probably uses a
<a target="_blank" href="https://en.wikipedia.org/wiki/POST_%28HTTP%29">POST
request</a>. To find out what the POST request is, we recommend
<a target="_blank" href="https://addons.mozilla.org/en-US/firefox/addon/live-http-headers/">Live HTTP Headers</a> for Firefox.
Put the POST string, replacing the query by <code>{searchTerms}</code> in the
field <code><a href="#field-post-string">"post"</a></code>.
For a JSON post request, additionally use
<code><a href="#field-post-encoding">"postencode"</a>: "application/json"</code>
</p>
<p id="scraping">
Searsia uses <a target="_blank" href="https://en.wikipedia.org/wiki/XPath">XPath 1.0</a> to extract the search results from the web page. XPath is a query language for selecting elements of semi-structured data. Suppose the search results are displayed as list elements on the page, then these are encode as <code><li></code> ... <code></li></code> on the page, and they can be extracted from the page with the XPath query <code>//li</code>. To find the most likely XPath query, we recommend <a target="_blank" href="http://dolf.trieschnigg.nl/srf/">Search Result Finder</a> for Firefox. Fill in the XPath query in the field <code><a href="#field-item-xpath">"itempath"</a></code>. To tell Searsia how to extract the components of the search result, add <code><a href="#field-extractors">"extractors"</a></code> for the fields <code>title</code>, <code>description</code>, <code>link</code>, or any other field you like (the client also supports <code>image</code>).
</p>
<p>
We recommend to incrementally define your HTML search engine by first
adding a random <code>"itempath"</code> XPath query, for instance
<code>//foobar</code>. Add a test query <code><a href="">"testquery"</a></code> for which you are sure the search engine gives at least 10 results.
</p>
<p>First attempt to incrementally define <code>engine2.json</code>:</p>
<pre>
{
"resource": {
"id": "engine2",
"name": "Djoerd's Page",
"apitemplate": "http://wwwhome.cs.utwente.nl/~hiemstra/?s={searchTerms}",
"mimetype": "text/html",
"testquery": "federated",
"itempath": "//foobar"
},
"searsia": "v1.0.0",
}
</pre>
<p>
Then test <code>engine2.json</code> with <code>-t xml</code> as follows.
(This first attempt will not work, because the <code>"itempath"</code>
is not yet correct, and the <code>"extractors"</code> that select the
title, description and URL are still missing.)
</p>
<p>
<code class="block"> java -jar searsiaserver.jar -m engine2.json -t xml</code>
</p>
<p>Tip: nicely format the XML with a tool like
<a href="http://xmlsoft.org/xmllint.html" target="_blank">xmllint</a>.</p>
<p>Because the API template and mimetype are correct, this test outputs
the HTML search result page converted to XML. We can now see that the
search results on this page are using <h3> header tags. These
header tags contain the search title (XPath extractor: <code>.</code>),
it contains the URL in the <a> anchor tag's href attribute
(XPath extractor: <code>./a/@href</code>), and the first text node that
follows is the description (XPath extractor:
<code>./following-sibling::text()[1]</code>).
</p>
<p>After editing, the file <code>engine2.json</code> contains:</p>
<pre>
{
"resource": {
"id": "engine2",
"name": "Djoerd's Page",
"apitemplate": "http://wwwhome.cs.utwente.nl/~hiemstra/?s={searchTerms}",
"mimetype": "text/html",
"testquery": "federated",
"itempath": "//h3",
"extractors": {
"title": ".",
"url": "./a/@href",
"description": "./following-sibling::text()[1]"
}
},
"searsia": "v1.0.0",
}
</pre>
<p> Testing the engine with JSON output gives the following result:</p>
<p>
<code class="block"> java -jar searsiaserver.jar -m engine2.json -t json</code>
</p>
<p>
<code class="result">
Searsia server v1.0.2<br>
Warning: Mother changed to http://wwwhome.cs.utwente.nl/~hiemstra/?s={searchTerms}<br>
Testing: engine2 (Djoerd's Page)<br>
{ "hits": [<br>
{<br>
"title": "Federated Search for Sheet Music",<br>
"description": "Dr. Sheet Music is a federated search engine for sheet music.",<br>
"url": "http://www.cs.utwente.nl/~hiemstra/2017/federated-search-for-sheet-music.html"<br>
},<br>
(...)<br>
]}<br>
Test succeeded.<br>
</code>
<h2 id="adding-xml">Adding an XML or JSON resource</h2>
<p>
To add an XML resource, fill in <code>application/xml</code> in the field
<code><a href="#field-mime-type">"mimetype"</a></code>. Then proceed as
<a href="#adding-html">above</a>. The Firefox Search Result Finder cannot
be used in this case.
</p>
<p>To add a JSON resource, fill in <code>application/json</code> in the
field <code><a href="#field-mime-type">"mimetype"</a></code>. Searsia also
uses XPath queries to interpret JSON output, by internally converting JSON
to XML, where each JSON attribute name is converted to an XML element;
JSON lists are converted to repeated XML elements with the JSON list's
name. As above, test the resource with the <code>-t xml</code> switch
for debugging.
</p>
<p>
The following example selects only the hits from a JSON search engine
(Actually, a search engine that produces Searsia's JSON)
that have a URL. This definition selects part of the search results,
because a Searsia engine might also show results without a URL, and
it might show more fields than the once selected here:
</p>
<p>The file <code>engine3.json</code> contains:</p>
<pre>
{
"resource": {
"id": "engine3",
"name": "UT Search",
"apitemplate": "https://search.utwente.nl/searsia/index?q={searchTerms}",
"mimetype": "application/json",
"testquery": "campus",
"itempath": "//hits[./url]",
"extractors": {
"title": "./title",
"url": "./url",
"description": "./description"
}
},
"searsia": "v1.0.0",
}
</pre>
<p> Now we can test all engines as follows: </p>
<p>
<code class="block">
java -jar searsiaserver.jar -m index.json -t all
</code>
</p>
<p>
<code class="result">
Searsia server v1.0.2<br>
Testing: index (My Engine)<br>
Warning: less than 10 results for query 'searsia'; see "testquery" or "rerank".<br>
Testing: engine1 (Sheet Music)<br>
Testing: engine2 (Djoerd's Page)<br>
Testing: engine3 (UT Search)<br>
Test succeeded.
</code>
</p>
<h2 id="examples">Examples</h2>
<p>
Searsia supports many API's by including API keys as secret
<em><a href="#field-parameters">parameters</a></em> that will not be
shared, as well as the possibility to add custom HTTP
<em><a href="#field-headers">headers</a></em>.
Look at the API of UT Search at
<a target="_blank" href="https://search.utwente.nl/searsia/index.json">University of
Twente Searsia API</a> for examples of Searsia's resource configurations,
including several examples that use HTML scrapers, and examples for
accessing the API's of Google, Twitter, Facebook, Flickr, Instagram, and
more. If you believe that Searsia is unable to get search results from
an existing resource that should be supported, please post your question
under <a target="_blank" href="https://github.com/searsia/searsiaserver/issues">Searsia
Server Issues</a>. Please, note that Searsia is not meant to scrape sites
that do not want to be scraped, and therefore does not contain ways to
circumvent for instance session cookies.
</p>
<p>
While the Searsia resource configurations provide a way to get the search
results for a great variety of existing search engines, Searsia also
provides a flexible way to structure the search results from these engines.
The search results, i.e., the objects in the <code>"hits"</code> list,
may contain any attribute that seems appropriate, for instance an
attribute <code>"phone_number"</code> for a telephone directory or
an attribute <code>"nr_of_citations"</code> for a search engine
that searches scientific papers. The following attributed are reserved:
</p>
<ul>
<li><code>"title"</code>: The title of the search results, that can be
clicked to go to the web page that was found. Usually, the title is equals
to the title of the web page that was found. The title is the only
attribute that is mandatory.</li>
<li><code>"url"</code>: The link to the web page that was found.</li>
<li><code>"description"</code>: A small summary describing the result.
This might be a snippet from the web site containing the query, or some
other summary.</li>
<li><code>"image"</code>: The url of a (thumbnail) image, to be
displayed with the search result.</li>
</ul>
<p>
The <a href="resultsdemo.html">Results demo mockup</a> below shows 7 ways to present
the search results from
<a target="_blank" href="https://en.wikipedia.org/w/api.php?action=opensearch&format=xml&search=informat&namespace=0" rel="nofollow">Wikipedia's search suggestions</a>,
that is the mockup shows the same search results 7 times using different
configurations.
</p>
<div class="panel panel-default" style="margin-top:2em">
<div class="embed-responsive embed-responsive-resultsdemo">
<iframe class="embed-responsive-item" src="resultsdemo.html"></iframe>
</div>
</div>
<p>
The 7 results presentations are achieved as follows:
</p>
<ul>
<li>
<a href="searsia/wiki--wikididyoumean.json"><strong>wikididyoumean</strong></a>,
which' name is <em>"Did you mean:"</em>,
returns a single search result, that contains the title as well as
<code>"tags":"#suggestion"</code>, which tells the client to display the
result as a query suggestion.
</li>
<li>
<a href="searsia/wiki--wikifull.json"><strong>wikifull</strong></a>
(<em>Wikipedia Pages</em>)
returns title, description and URL. In this configuration, the domain of
<code>"urltemplate"</code> (wikipedia.net) does not match the results'
domains (wikipedia.org). Therefore, the client displays the URLs for each
aggregated result. The <code>"urltemplate"</code> is the url that the
user will use to search on the site, whereas the <code>"apitemplate"</code>
will be used by the server.
</li>
<li>
<a href="searsia/wiki--wikiimage.json"><strong>wikiimage</strong></a>
(<em>Wikipedia Images</em>) returns title and image and
<code>"tags":"#image"</code>, which tells the client to display the
results as an image result. Note how the XPath functions <code>concat()</code>
and <code>substring-after()</code> are used to create a custom image URL.
</li>
<li>
<a href="searsia/wiki--wikismall2.json"><strong>wikismall2</strong></a>,
which is called <em>Search Wikipedia for</em>, does not return URLs, which makes the client
infer the URL from the <code>"title"</code> and the <code>"urltemplate"</code>,
effectively creating a search engine that spawns a search on Wikipedia.
</li>
<li>
<a href="searsia/wiki--wikifull2.json"><strong>wikifull2</strong></a>
(<em>Wikipedia Again</em>) returns full search results with a thumbnail image, much
like the Wikipedia Pages engine above.
</li>
<li>
<a href="searsia/wiki--wikismall.json"><strong>wikismall</strong></a>
(<em>Wikipedia Small</em>) returns search results with <code>"tags":"#small"</code>,
telling the client to display the results on a single line.
</li>
<li>
<a href="searsia/wiki--wikirelated.json"><strong>wikirelated</strong></a> is called
<em>Related searches:</em>; It returns only the titles and <code>"tags":"#small"</code>.
The header <em>Related searches:</em> cannot be clicked because the resource does
not configure the <code>"urltemplate"</code> for the end user.
</li>
</ul>
<p>
Note that each configuration uses the same <code>"apitemplate"</code>: Each
of the 7 results effectively use the exact same search engine.
Please <strong>do not</strong> use this example in a actual server configuration.
Note that the configuration of the mockup, if used in an actual Searsia Server,
would send each query 7 times(!) to Wikipedia.
</p>
<h2 id="fields">An overview of all resource fields</h2>
<p>
The table below contains a quick reference for all fields that are supported inside the <code>"resource"</code> field:
</p>
<table class="table table-bordered">
<tr><th>Parameter</th><th>Explanation</th></tr>
<tr id="field-apitemplate"><td style="white-space:nowrap">"apitemplate" *</td>
<td>A URL specified following the <a href="#adding-searsia">searsia URL template syntax</a>, to be used by the server.</td></tr>
<tr id="field-deleted"><td>"deleted"</td>
<td>A boolean. Value: <code>true</code> (no quotes) if the resource is deleted (only used in files; the server will use HTTP status 410, Gone) </td></tr>
<tr id="field-extractors"><td>"extractors"</td>
<td>Field names and XPath queries for selecting parts of search results such as the title, url, and description. For example, the <code>title</code> would typically be selected as the first anchor text in a search result, i.e., <code>(.//a)[1]</code>. The XPath queries are evaluated with respect to an Item XPath context node, and they typically start with <code>.</code> (the 'self' axis step).
</td></tr>
<tr id="field-favicon"><td>"favicon"</td>
<td>The url of the icon image, to be displayed to the user. Icons should have equal width and height.
Icons are preferably png files, not smaller than 48x48 pixels. </td></tr>
<tr id="field-headers"><td>"headers"</td>
<td>HTTP headers to be sent to the API Template, consisting of a field name (without ':') and the field value. Like API Template and Post String, the field value may include parameters. </td></tr>
<tr id="field-id"><td>"id" *</td>
<td>A unique string identifying this resource. Should be locally unique (within the server). </td></tr>
<tr id="field-itempath"><td>"itempath"</td>
<td>An <a target="_blank" href="https://en.wikipedia.org/wiki/XPath">XPath 1.0</a> query that selects the search results from an HTML or XML result. XPath is also used to select results from JSON results, assuming a standard conversion to XML, where JSON lists are converted to repeated XML elements. </td></tr>
<tr id="field-maxqueriesperday"><td style="white-space:nowrap">"maxqueriesperday"</td>
<td>The maximum amount of queries per day that the search engine is allowed to query. If the maximum per day is reached, the engine gives an HTTP status 503, Service Unavailable. Default: 1000.</td></tr>
<tr id="field-mimetype"><td>"mimetype"</td>
<td>The format returned by the API Template. Supported formats are: <code>application/searsia+json</code>, <code>text/html</code>, <code>application/xml</code>, <code>application/json</code>. If omitted, the mime type <code>application/searsia+json</code> is assumed.</td></tr>
<tr id="field-name"><td>"name"</td>
<td>A short name for this resource, to be displayed to the user. </td></tr>
<tr id="field-post"><td>"post"</td>
<td>Only set if the API template HTTP method is POST, empty if the HTTP method is GET. Like the template, the post string may include parameters, delimited by curly brackets.</td></tr>
<tr id="field-postencode"><td>"postencode"</td>
<td>Will encode the <a href="#field-post">post string</a> using a certain mime-type. Possible values: <code>application/x-www-form-urlencoded</code> (default) or <code>application/json</code>. </td></tr>
<tr><td id="field-prior">"prior"</td>
<td>A value between 0 and 1 indicating the prior score of a resource to be selected (prior to knowing the query). This score is added to the score that is computed for the result's match with the query. (Integer, so no quotes)</td></tr>
<tr id="field-privateparameters"><td>"privateparameters"</td>
<td>Secret parameter names and their values. Occurrences of the parameter names in the API Template, Post String or Headers will be replaced by the value. The server will not share the parameter names and values with other clients, so it is safe to use them for API keys and secrets. </td></tr>
<tr id="field-rerank"><td>"rerank"</td><td>Specifies a ranking algorithm or filter that is used to rerank/refilter the search results. Currently, <code>random</code> (randomly reorder the returned results), <code>best</code> (reorder by best match of query with result title and description), and <code>bestrandom</code> (reorder by best match, supplemented with random results if less than 10 matching results are found) are supported. All other strings are treated as <code>best</code>.</td></tr>
<tr id="field-signature"><td>"signature"</td><td>Used to sign API requests. Takes a function and optionally a private parameter. Possible value: <code>HmacSHA256({key})</code> (used for Amazon's affiliate program).</td></tr>
<tr id="field-testquery"><td>"testquery"</td>
<td>A query for which a search gives a non-empty result. If not set, the system should give a non-empty result for the query <code>searsia</code>.</td></tr>
<tr id="field-usertemplate"><td style="white-space:nowrap">"usertemplate"</td>
<td>A url specified following the <a href="#adding-searsia">Opensearch url template syntax</a>, to be used by users. The mime type of this url must be <code>text/html</code> or <code>application/xml+xhtml</code>. </td></tr>
</table>
<p>* mandatory fields</p>
<h2>Trouble shooting</h2>
<p>
If your error is: <code>SLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target</code>:
Your Java version does not have the right SSL certificate to connect to the site.
Updating Java might solve this problem. If not,
get the certificate in Firefox by clicking on the lock in the browser address bar.
Choose "More Information", "View Certificate", "General Details", "Export" and
save the certificate (for instance as MySite.crt).
Then, on your machine, locate your java certificate files; On Ubuntu 18.04, they
can be found here: <code>/usr/lib/jvm/default-java/lib/security/cacerts</code>.
Then update your certificates as follows:
<code> sudo keytool -import -noprompt -trustcacerts -alias MySite -file MySite.crt -keystore /usr/lib/jvm/default-java/lib/security/cacerts</code>
(use the password: changeit)
</p>
</div>
</div>
<footer>
<hr>
<p><strong>Next:</strong> The <a href="people.html">People</a> that contributed to Searsia.</p>
</footer>
</div> <!-- /container -->
<script src="js/jquery.min.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>