From f4c2ed82b5c2227c97564723c6242e142b63effb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9mi=20V=C3=A1nyi?= Date: Tue, 6 Sep 2016 18:13:20 +0200 Subject: [PATCH 1/6] add new search parameter time_range --- docs/dev/search_api.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/dev/search_api.rst b/docs/dev/search_api.rst index 59d3c825..c1bc6a13 100644 --- a/docs/dev/search_api.rst +++ b/docs/dev/search_api.rst @@ -1,7 +1,7 @@ Search API ========== -The search supports both ``GET`` and ``POST``. However, using ``GET`` the parameters of the request remain hidden. So it is advised to use ``GET`` for querying. +The search supports both ``GET`` and ``POST``. Furthermore, two enpoints ``/`` and ``/search`` are available for querying. @@ -29,3 +29,5 @@ Parameters +------------------+----------------------------------------------------------------------------------------------------+-----------------------------+ | ``pageno`` | Search page number | optional (default: ``1``) | +------------------+----------------------------------------------------------------------------------------------------+-----------------------------+ +| ``time_range`` | Time range of search | optional | ++------------------+----------------------------------------------------------------------------------------------------+-----------------------------+ From 898c994eedcd0dcc02cf56eb99c12ebd13ec52c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9mi=20V=C3=A1nyi?= Date: Tue, 6 Sep 2016 18:14:11 +0200 Subject: [PATCH 2/6] add generated files --- _sources/dev/search_api.txt | 4 +++- dev/search_api.html | 10 +++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/_sources/dev/search_api.txt b/_sources/dev/search_api.txt index 59d3c825..c1bc6a13 100644 --- a/_sources/dev/search_api.txt +++ b/_sources/dev/search_api.txt @@ -1,7 +1,7 @@ Search API ========== -The search supports both ``GET`` and ``POST``. However, using ``GET`` the parameters of the request remain hidden. So it is advised to use ``GET`` for querying. +The search supports both ``GET`` and ``POST``. Furthermore, two enpoints ``/`` and ``/search`` are available for querying. @@ -29,3 +29,5 @@ Parameters +------------------+----------------------------------------------------------------------------------------------------+-----------------------------+ | ``pageno`` | Search page number | optional (default: ``1``) | +------------------+----------------------------------------------------------------------------------------------------+-----------------------------+ +| ``time_range`` | Time range of search | optional | ++------------------+----------------------------------------------------------------------------------------------------+-----------------------------+ diff --git a/dev/search_api.html b/dev/search_api.html index eb583b41..e27aa7dd 100644 --- a/dev/search_api.html +++ b/dev/search_api.html @@ -41,12 +41,12 @@

Search API

-

The search supports both GET and POST. However, using GET the parameters of the request remain hidden. So it is advised to use GET for querying.

+

The search supports both GET and POST.

Furthermore, two enpoints / and /search are available for querying.

-
GET /
+
GET /
 
-
GET /search
+
GET /search
 
@@ -84,6 +84,10 @@ Search page number optional (default: 1) +time_range +Time range of search +optional +
From 09a46dacec72842e076fee6bb71ec90dfe5fce9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9mi=20V=C3=A1nyi?= Date: Tue, 6 Sep 2016 18:16:29 +0200 Subject: [PATCH 3/6] add embedded search to docs --- docs/admin/api.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/admin/api.rst b/docs/admin/api.rst index 94508a28..8d616224 100644 --- a/docs/admin/api.rst +++ b/docs/admin/api.rst @@ -76,3 +76,19 @@ Sample response ], "safe_search": 0 } + +Embed search bar +---------------- + +The search bar can be embedded into websites. Just paste the example into the HTML of the site. +URL of the searx instance and values are customizable. + +.. code:: html + +
+ + + + + +
From feb25d3a530cc073bb4b65f69ea361b8fd6afe47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9mi=20V=C3=A1nyi?= Date: Tue, 6 Sep 2016 18:22:37 +0200 Subject: [PATCH 4/6] add generated files --- _sources/admin/api.txt | 16 ++++++++++++++++ admin/api.html | 14 ++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/_sources/admin/api.txt b/_sources/admin/api.txt index 94508a28..8d616224 100644 --- a/_sources/admin/api.txt +++ b/_sources/admin/api.txt @@ -76,3 +76,19 @@ Sample response ], "safe_search": 0 } + +Embed search bar +---------------- + +The search bar can be embedded into websites. Just paste the example into the HTML of the site. +URL of the searx instance and values are customizable. + +.. code:: html + +
+ + + + + +
diff --git a/admin/api.html b/admin/api.html index 43139771..df29b7f6 100644 --- a/admin/api.html +++ b/admin/api.html @@ -113,6 +113,20 @@
+
+ From b7fda2702b2958f4abd1c8f88a067c86029f53e6 Mon Sep 17 00:00:00 2001 From: Noemi Vanyi Date: Sat, 10 Sep 2016 15:12:11 +0200 Subject: [PATCH 5/6] add possible values of time_range param --- docs/dev/search_api.rst | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/dev/search_api.rst b/docs/dev/search_api.rst index c1bc6a13..03bb6f3f 100644 --- a/docs/dev/search_api.rst +++ b/docs/dev/search_api.rst @@ -16,18 +16,18 @@ Furthermore, two enpoints ``/`` and ``/search`` are available for querying. Parameters `````````` -+------------------+----------------------------------------------------------------------------------------------------+-----------------------------+ -| Name | Description | | -+==================+====================================================================================================+=============================+ -| ``q`` | The search query, see :doc:`/user/search_syntax` | required | -+------------------+----------------------------------------------------------------------------------------------------+-----------------------------+ -| ``categories`` | Comma separated list, specifies the active search categories | optional | -+------------------+----------------------------------------------------------------------------------------------------+-----------------------------+ -| ``engines`` | Comma separated list, specifies the active search engines | optional | -+------------------+----------------------------------------------------------------------------------------------------+-----------------------------+ -| ``lang`` | Code of the language | optional (default: ``all``) | -+------------------+----------------------------------------------------------------------------------------------------+-----------------------------+ -| ``pageno`` | Search page number | optional (default: ``1``) | -+------------------+----------------------------------------------------------------------------------------------------+-----------------------------+ -| ``time_range`` | Time range of search | optional | -+------------------+----------------------------------------------------------------------------------------------------+-----------------------------+ ++------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+ +| Name | Description | | ++==================+====================================================================================================+==================================================+ +| ``q`` | The search query, see :doc:`/user/search_syntax` | required | ++------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+ +| ``categories`` | Comma separated list, specifies the active search categories | optional | ++------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+ +| ``engines`` | Comma separated list, specifies the active search engines | optional | ++------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+ +| ``lang`` | Code of the language | optional (default: ``all``) | ++------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+ +| ``pageno`` | Search page number | optional (default: ``1``) | ++------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+ +| ``time_range`` | Time range of search | optional (possible: ``day``, ``month``, ``year``)| ++------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+ From e2ce068eb772e0173eaad449215d3baabc519ccb Mon Sep 17 00:00:00 2001 From: Noemi Vanyi Date: Sat, 10 Sep 2016 15:12:47 +0200 Subject: [PATCH 6/6] generated files of parent --- _sources/dev/search_api.txt | 30 +++++++++++++++--------------- dev/search_api.html | 8 ++++---- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/_sources/dev/search_api.txt b/_sources/dev/search_api.txt index c1bc6a13..03bb6f3f 100644 --- a/_sources/dev/search_api.txt +++ b/_sources/dev/search_api.txt @@ -16,18 +16,18 @@ Furthermore, two enpoints ``/`` and ``/search`` are available for querying. Parameters `````````` -+------------------+----------------------------------------------------------------------------------------------------+-----------------------------+ -| Name | Description | | -+==================+====================================================================================================+=============================+ -| ``q`` | The search query, see :doc:`/user/search_syntax` | required | -+------------------+----------------------------------------------------------------------------------------------------+-----------------------------+ -| ``categories`` | Comma separated list, specifies the active search categories | optional | -+------------------+----------------------------------------------------------------------------------------------------+-----------------------------+ -| ``engines`` | Comma separated list, specifies the active search engines | optional | -+------------------+----------------------------------------------------------------------------------------------------+-----------------------------+ -| ``lang`` | Code of the language | optional (default: ``all``) | -+------------------+----------------------------------------------------------------------------------------------------+-----------------------------+ -| ``pageno`` | Search page number | optional (default: ``1``) | -+------------------+----------------------------------------------------------------------------------------------------+-----------------------------+ -| ``time_range`` | Time range of search | optional | -+------------------+----------------------------------------------------------------------------------------------------+-----------------------------+ ++------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+ +| Name | Description | | ++==================+====================================================================================================+==================================================+ +| ``q`` | The search query, see :doc:`/user/search_syntax` | required | ++------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+ +| ``categories`` | Comma separated list, specifies the active search categories | optional | ++------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+ +| ``engines`` | Comma separated list, specifies the active search engines | optional | ++------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+ +| ``lang`` | Code of the language | optional (default: ``all``) | ++------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+ +| ``pageno`` | Search page number | optional (default: ``1``) | ++------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+ +| ``time_range`` | Time range of search | optional (possible: ``day``, ``month``, ``year``)| ++------------------+----------------------------------------------------------------------------------------------------+--------------------------------------------------+ diff --git a/dev/search_api.html b/dev/search_api.html index e27aa7dd..f81d332f 100644 --- a/dev/search_api.html +++ b/dev/search_api.html @@ -53,9 +53,9 @@

Parameters

---+++ @@ -86,7 +86,7 @@ - +
Name
time_range Time range of searchoptionaloptional (possible: day, month, year)