summaryrefslogtreecommitdiff
path: root/searx/templates
diff options
context:
space:
mode:
authorThomas Pointhuber <thomas.pointhuber@gmx.at>2014-03-20 15:39:17 +0100
committerThomas Pointhuber <thomas.pointhuber@gmx.at>2014-03-20 15:39:17 +0100
commitcc7f3cb61798463036a886ae5f0ccd06aca5e625 (patch)
treee48ff073d1b50d8ffe471840f0ca8f437610fc0c /searx/templates
parent360543dec4b652950c67a7f1cc4027ee1b920a30 (diff)
initial implemention of autocompletion in opensearch.xml
Diffstat (limited to 'searx/templates')
-rw-r--r--searx/templates/opensearch.xml11
1 files changed, 10 insertions, 1 deletions
diff --git a/searx/templates/opensearch.xml b/searx/templates/opensearch.xml
index 68b030b3a..b99a9bb24 100644
--- a/searx/templates/opensearch.xml
+++ b/searx/templates/opensearch.xml
@@ -6,9 +6,18 @@
<LongName>searx metasearch</LongName>
{% if method == 'get' %}
<Url type="text/html" method="get" template="{{ host }}?q={searchTerms}"/>
+ <Url type="application/x-suggestions+json" method="get" template="{{ host }}autocompleter">
+ <Param name="format" value="x-suggestions" />
+ <Param name="q" value="{searchTerms}" />
+ </Url>
{% else %}
<Url type="text/html" method="post" template="{{ host }}">
- <Param name="q" value="{searchTerms}" />
+ <Param name="q" value="{searchTerms}" />
+ </Url>
+ <!-- TODO, POST REQUEST doesn't work -->
+ <Url type="application/x-suggestions+json" method="get" template="{{ host }}autocompleter">
+ <Param name="format" value="x-suggestions" />
+ <Param name="q" value="{searchTerms}" />
</Url>
{% endif %}
</OpenSearchDescription>