summaryrefslogtreecommitdiff
path: root/docs/admin
diff options
context:
space:
mode:
authorAlexandre Flament <alex@al-f.net>2020-11-27 19:32:45 +0100
committerAlexandre Flament <alex@al-f.net>2020-11-27 19:40:04 +0100
commitb4b81a5e1a74f03926e3c2e6f8c5fade99f7eabb (patch)
treef72272f8c132759a2e792765632352a38007d1ba /docs/admin
parent1cfe7f2a7543b2994a1afd0d81da1962d04423b0 (diff)
downloadsearxng-b4b81a5e1a74f03926e3c2e6f8c5fade99f7eabb.tar.gz
searxng-b4b81a5e1a74f03926e3c2e6f8c5fade99f7eabb.zip
[enh] settings.yml: add use_default_settings option (2nd version)
Diffstat (limited to 'docs/admin')
-rw-r--r--docs/admin/settings.rst67
1 files changed, 25 insertions, 42 deletions
diff --git a/docs/admin/settings.rst b/docs/admin/settings.rst
index cd944cc4c..532b99752 100644
--- a/docs/admin/settings.rst
+++ b/docs/admin/settings.rst
@@ -235,68 +235,51 @@ In the following example, the actual settings are the default settings defined i
.. code-block:: yaml
- use_default_settings: true
+ use_default_settings: True
server:
secret_key: "uvys6bRhKHUdFF5CqbJonSDSRN8H0sCBziNSrDGNVdpz7IeZhveVart3yvghoKHA"
- server:
bind_address: "0.0.0.0"
-With ``use_default_settings: True``, each settings can be override in a similar way with one exception, the ``engines`` section:
-
-* If the ``engines`` section is not defined in the user settings, searx uses the engines from the default setttings (the above example).
-* If the ``engines`` section is defined then:
-
- * searx loads only the engines declare in the user setttings.
- * searx merges the configuration according to the engine name.
+With ``use_default_settings: True``, each settings can be override in a similar way, the ``engines`` section is merged according to the engine ``name``.
-In the following example, only three engines are available. Each engine configuration is merged with the default configuration.
+In this example, searx will load all the engine and the arch linux wiki engine has a :ref:`token<private engines>`:
.. code-block:: yaml
- use_default_settings: true
+ use_default_settings: True
server:
secret_key: "uvys6bRhKHUdFF5CqbJonSDSRN8H0sCBziNSrDGNVdpz7IeZhveVart3yvghoKHA"
engines:
- - name: wikipedia
- - name: wikidata
- - name: ddg definitions
+ - name: arch linux wiki
+ tokens: ['$ecretValue']
-Another example where four engines are available. The arch linux wiki engine has a :ref:`token<private engines>`.
+It is possible to remove some engines from the default settings. The following example is similar to the above one, but searx doesn't load the the google engine:
.. code-block:: yaml
- use_default_settings: true
+ use_default_settings:
+ engines:
+ remove:
+ - google
server:
secret_key: "uvys6bRhKHUdFF5CqbJonSDSRN8H0sCBziNSrDGNVdpz7IeZhveVart3yvghoKHA"
engines:
- name: arch linux wiki
tokens: ['$ecretValue']
- - name: wikipedia
- - name: wikidata
- - name: ddg definitions
-
-automatic update
-----------------
-
-The following comand creates or updates a minimal user settings (a secret key is defined if it is not already the case):
-
-.. code-block:: sh
-
- make SEARX_SETTINGS_PATH=/etc/searx/settings.yml user-settings.update
-
-Set ``SEARX_SETTINGS_PATH`` to your user settings path.
-As soon the user settings contains an ``engines`` section, it becomes difficult to keep the engine list updated.
-The following command creates or updates the user settings including the ``engines`` section:
+As an alternative, it is possible to specify the engines to keep. In the following example, searx has only two engines:
-.. code-block:: sh
-
- make SEARX_SETTINGS_PATH=/etc/searx/settings.yml user-settings.update.engines
-
-After that ``/etc/searx/settings.yml``
-
-* has a ``secret key``
-* has a ``engine`` section if it is not already the case, moreover the command:
+.. code-block:: yaml
- * has deleted engines that do not exist in the default settings.
- * has added engines that exist in the default settings but are not declare in the user settings.
+ use_default_settings:
+ engines:
+ keep_only:
+ - google
+ - duckduckgo
+ server:
+ secret_key: "uvys6bRhKHUdFF5CqbJonSDSRN8H0sCBziNSrDGNVdpz7IeZhveVart3yvghoKHA"
+ engines:
+ - name: google
+ tokens: ['$ecretValue']
+ - name: duckduckgo
+ tokens: ['$ecretValue']