opensearch.xml 1.1KB

123456789101112131415161718192021222324252627
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
  3. <ShortName>searx</ShortName>
  4. <Description>Search searx</Description>
  5. <InputEncoding>UTF-8</InputEncoding>
  6. <LongName>searx metasearch</LongName>
  7. {% if method == 'get' %}
  8. <Url type="text/html" method="get" template="{{ host }}?q={searchTerms}"/>
  9. {% if autocomplete %}
  10. <Url type="application/x-suggestions+json" method="get" template="{{ host }}autocompleter">
  11. <Param name="format" value="x-suggestions" />
  12. <Param name="q" value="{searchTerms}" />
  13. </Url>
  14. {% endif %}
  15. {% else %}
  16. <Url type="text/html" method="post" template="{{ host }}">
  17. <Param name="q" value="{searchTerms}" />
  18. </Url>
  19. {% if autocomplete %}
  20. <!-- TODO, POST REQUEST doesn't work -->
  21. <Url type="application/x-suggestions+json" method="get" template="{{ host }}autocompleter">
  22. <Param name="format" value="x-suggestions" />
  23. <Param name="q" value="{searchTerms}" />
  24. </Url>
  25. {% endif %}
  26. {% endif %}
  27. </OpenSearchDescription>