on master help sign in
docs(admin): moved settings description from wiki to docs
f602cb8Markus Heiser
docs/admin/engines.rst+1−2
@@ -6,8 +6,7 @@ Engines
6
6
7.. sidebar:: Further reading ..
7.. sidebar:: Further reading ..
8
8
9− - :ref:`engines generic`
9+ - :ref:`settings engine`
10− - :ref:`configured engines`
11 - :ref:`engine settings`
10 - :ref:`engine settings`
12 - :ref:`engine file`
11 - :ref:`engine file`
13
12
docs/admin/index.rst+1
@@ -6,6 +6,7 @@ Administrator documentation
6 :maxdepth: 1
6 :maxdepth: 1
7
7
8 installation
8 installation
9+ settings
9 api
10 api
10 architecture
11 architecture
11 filtron
12 filtron
docs/admin/settings.rstnew file+181
@@ -0,0 +1,181 @@
1+.. _settings.yml:
2+
3+================
4+``settings.yml``
5+================
6+
7+.. sidebar:: Further reading ..
8+
9+ - :ref:`search API`
10+
11+This page describe the options possibilities of the settings.yml file.
12+
13+.. _settings global:
14+
15+Global Settings
16+===============
17+
18+.. code:: yaml
19+
20+ server:
21+ port : 8888
22+ secret_key : "ultrasecretkey" # change this!
23+ debug : False # debug mode, only for development
24+ request_timeout : 2.0 # seconds
25+ base_url : False # set custom base_url (or False)
26+ themes_path : "" # custom ui themes path
27+ default_theme : oscar # ui theme
28+ useragent_suffix : "" # suffix of searx_useragent, could contain
29+ # informations like admins email address
30+ image_proxy : False # proxying image results through searx
31+ default_locale : "" # default interface locale
32+
33+ # uncomment below section if you want to use a proxy
34+
35+ #outgoing_proxies :
36+ # http : http://127.0.0.1:8080
37+ # https: http://127.0.0.1:8080
38+
39+ # uncomment below section only if you have more than one network interface
40+ # which can be the source of outgoing search requests
41+
42+ #source_ips:
43+ # - 1.1.1.1
44+ # - 1.1.1.2
45+
46+ locales:
47+ en : English
48+ de : Deutsch
49+ he : Hebrew
50+ hu : Magyar
51+ fr : Français
52+ es : Español
53+ it : Italiano
54+ nl : Nederlands
55+ ja : 日本語 (Japanese)
56+ tr : Türkçe
57+ ru : Russian
58+ ro : Romanian
59+
60+
61+``port`` :
62+ Port number of the searx web application if you run it directly using ``python
63+ searx/webapp.py``. Doesn't apply to searx running on Apache or Nginx.
64+
65+``secret_key`` :
66+ Used for cryptography purpose.
67+
68+``debug`` :
69+ Allow a more detailed log if you run searx directly. Display *detailed* error
70+ messages in the browser too, so this must be deactivated in production.
71+
72+``request_timeout`` :
73+ Global timeout of the requests made to others engines in seconds. A bigger
74+ timeout will allow to wait for answers from slow engines, but in consequence
75+ will slow searx reactivity (the result page may take the time specified in the
76+ timeout to load)
77+
78+``base_url`` :
79+ The base URL where searx is deployed. Used to create correct inbound links.
80+
81+``themes_path`` :
82+ Path to where the themes are located. If you didn't develop anything, leave it
83+ blank.
84+
85+``default_theme`` :
86+ Name of the theme you want to use by default on you searx instance.
87+
88+``useragent_suffix`` :
89+ Suffix to the user-agent searx uses to send requests to others engines. If an
90+ engine wish to block you, a contact info here may be useful to avoid that.
91+
92+``image_proxy`` :
93+ Allow your instance of searx of being able to proxy images. Uses memory space.
94+
95+``default_locale`` :
96+ Aearx interface language. If blank, the locale is detected by using the
97+ browser language. If it doesn't work, or you are deploying a language
98+ specific instance of searx, a locale can be defined using an ISO language
99+ code, like ``fr``, ``en``, ``de``.
100+
101+.. _requests proxies: http://docs.python-requests.org/en/latest/user/advanced/#proxies
102+.. _PR SOCKS support: https://github.com/kennethreitz/requests/pull/478
103+
104+``outgoing_proxies`` :
105+ Define a proxy you wish to use, see `requests proxies`_. SOCKS proxies are
106+ not supported / see `PR SOCKS support`.
107+
108+``source_ips`` :
109+ If you use multiple nework interfaces, define from which IP the requests must
110+ be made.
111+
112+``locales`` :
113+ Locales codes and their names. Available translations of searx interface.
114+
115+
116+.. _settings engine:
117+
118+Engine settings
119+===============
120+
121+.. sidebar:: Further reading ..
122+
123+ - :ref:`engines-dev`
124+
125+.. code:: yaml
126+
127+ - name : bing
128+ engine : bing
129+ shortcut : bi
130+ base_url : 'https://{language}.wikipedia.org/'
131+ categories : general
132+ timeout : 3.0
133+ api_key : 'apikey'
134+ disabled : True
135+ language : en_US
136+
137+``name`` :
138+ Name that will be used accross searx to define this engine. In settings, on
139+ the result page...
140+
141+``engine`` :
142+ Name of the python file used to handle requests and responses to and from this
143+ search engine.
144+
145+``shortcut`` :
146+ Code used to execute bang requests (in this case using ``!bi`` or ``?bi``)
147+
148+``base_url`` : optional
149+ Part of the URL that should be stable accross every request. Can be useful to
150+ use multiple sites using only one engine, or updating the site URL without
151+ touching at the code.
152+
153+``categories`` : optional
154+ Define in which categories this engine will be active. Most of the time, it is
155+ defined in the code of the engine, but in a few cases it is useful, like when
156+ describing multiple search engine using the same code.
157+
158+``timeout`` : optional
159+ Timeout of the search with the current search engine. **Be careful, it will
160+ modify the global timeout of searx.**
161+
162+``api_key`` : optional
163+ In a few cases, using an API needs the use of a secret key. How to obtain them
164+ is described in the file.
165+
166+``disabled`` : optional
167+ To disable by default the engine, but not deleting it. It will allow the user
168+ to manually activate it in the settings.
169+
170+``language`` : optional
171+ If you want to use another language for a specific engine, you can define it
172+ by using the full ISO code of language and country, like ``fr_FR``, ``en_US``,
173+ ``de_DE``.
174+
175+``weigth`` : default ``1``
176+ Weighting of the results of this engine.
177+
178+.. note::
179+
180+ A few more options are possible, but they are pretty specific to some
181+ engines, and so won't be described here.
docs/dev/search_api.rst+4−3
@@ -1,3 +1,5 @@
1+.. _search API:
2+
1==========
3==========
2Search API
4Search API
3==========
5==========
@@ -16,10 +18,9 @@ Parameters
16
18
17.. sidebar:: Further reading ..
19.. sidebar:: Further reading ..
18
20
21+ - :ref:`engines-dev`
22+ - :ref:`settings.yml`
19 - :ref:`engines generic`
23 - :ref:`engines generic`
20− - :ref:`configured engines`
21− - :ref:`engine settings`
22− - :ref:`engine file`
23
24
24``q`` : required
25``q`` : required
25 The search query. This string is passed to external search services. Thus,
26 The search query. This string is passed to external search services. Thus,