How to define a keyword in OpenSearchDescription xml file?

348 Views Asked by At

I am trying to get an open search definition to work on subdomains.

I have added the correct line in the of the html.

Example:

<%@ page isELIgnored="false" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>title</title>
   <link rel="search"
        type="application/opensearchdescription+xml"
        href="http://www.example.org/opensearch.xml"
        title="Example" />
</head>
<body>

</body>
</html>

In opensearch.xml:

<?xml version="1.0" encoding="utf-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>Example</ShortName>
<Description>Search</Description>
<InputEncoding>UTF-8</InputEncoding>
<LongName>Search</LongName>
<Url type="text/html" method="get" template="http://www.example.org/search/{searchTerms}"/>
</OpenSearchDescription>

The search is correctly added to the omnibox settings in Google Chrome, when I visit http://www.example.org. The trigger keyword becomes "example.org".

However, when I visit http://subdomain.example.org, which has the same line in the , the search is added with trigger keyword "subdomain.example.org" instead of "example.org".

Is there a way around this?

I have not found any information on how to set the trigger keyword in the documentation at http://www.opensearch.org/Specifications/OpenSearch/1.1 .

I what to change the default keyword to something else. how can I do it?

0

There are 0 best solutions below