Sledimo OpenSearch.org
legacy:
za čisti minimum, ki ga ne priporočamo: ===
- RSS/ATOM feed s poljema name + link
- zelo zaželeni opciji za minimum: description + image
modern:
za bolj kompleksno iskanje in izpis rezultatov (po semantičnih lastnostih)
- JSON+Shema.org minimalno z name,link,description + opcijski image
- dodati moramo polja v searchresultspage na schema.org
1. Open Search description document
- potrebno v vsakem primeru
- dodatno: 'autodetect' <link> v html/head
<?xml version="1.0" encoding="UTF-8"?> <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"> <ShortName>Web Search</ShortName> <Description>Use Example.com to search the Web.</Description> <Tags>example web</Tags> <Contact>admin@example.com</Contact> <Url type="application/rss+xml" template="http://example.com/?q={searchTerms}&pw={startPage?}&format=rss"/> <Url type="application/json" template="http://example.com/?q={searchTerms}&pw={startPage?}&format=json"/> </OpenSearchDescription>
2. Izpis rezultatov - legacy:
standardni RSS ali ATOM z OS dodatnimi polji
-> na naše potrebe tukaj manjka vsaj še slika - potrebno bi bilo dodat kak rss extension za media....
<?xml version="1.0" encoding="UTF-8"?> <rss version="2.0" xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"> <channel> <title>Example.com Search: New York history</title> <link>http://example.com/New+York+history</link> <description>Search results for "New York history" at Example.com</description> <opensearch:totalResults>4230000</opensearch:totalResults> <opensearch:startIndex>21</opensearch:startIndex> <opensearch:itemsPerPage>10</opensearch:itemsPerPage> <atom:link rel="search" type="application/opensearchdescription+xml" href="http://example.com/opensearchdescription.xml"/> <opensearch:Query role="request" searchTerms="New York History" startPage="1" /> <item> <title>New York History</title> <link>http://www.columbia.edu/cu/lweb/eguids/amerihist/nyc.html</link> <description> ... Harlem.NYC - A virtual tour and information on businesses ... with historic photos of Columbia's own New York neighborhood ... Internet Resources for the City's History. ... </description> </item> </channel> </rss>
3. Izpis rezultatov: modern
Propagirali bomo raje JSON+Shema.org format izpisa