@@ -3,14 +3,13 @@ Engine overview
33
44
55searx is a `metasearch-engine <https://en.wikipedia.org/wiki/Metasearch_engine>`__,
6−so it is using different search engines to provide better results.
6+so it uses different search engines to provide better results.
77
8−Because there is no general search-api which can be used for every
9−search-engine, there must be build an adapter between searx and the
10−external search-engine. This adapters are stored in the folder
11−`*searx/engines* <https://github.com/asciimoo/searx/tree/master/searx/engines>`__,
12−and this site is build to make an general documentation about this
13−engines
8+Because there is no general search API which could be used for every
9+search engine, an adapter has to be built between searx and the
10+external search engines. Adapters are stored under the folder
11+`searx/engines
12+<https://github.com/asciimoo/searx/tree/master/searx/engines>`__.
1413
1514
1615.. contents::
@@ -19,17 +18,16 @@ engines
1918general engine configuration
2019----------------------------
2120
22−It is required to tell searx what results can the engine provide. The
23−arguments can be inserted in the engine file, or in the settings file
21+It is required to tell searx the type of results the engine provides. The
22+arguments can be set in the engine file or in the settings file
2423(normally ``settings.yml``). The arguments in the settings file override
25−the one in the engine file.
24+the ones in the engine file.
2625
27−Really, it is for most options no difference if there are contained in
28−the engine-file or in the settings. But there is a standard where to
29−place specific arguments by default.
26+It does not matter if an options is stored in the engine file or in the
27+settings. However, the standard way is the following:
3028
3129
32−engine-file
30+engine file
3331~~~~~~~~~~~
3432
3533+---------------------+-----------+-----------------------------------------+
@@ -60,27 +58,27 @@ settings.yml
6058overrides
6159~~~~~~~~~
6260
63−There are some options, with have default values in the engine, but are
64−often overwritten by the settings. If the option is assigned in the
65−engine-file with ``None`` it has to be redefined in the settings,
66−otherwise searx is not starting with that engine.
67−
68−The naming of that overrides can be wathever you want. But we recommend
69−the using of already used overrides if possible:
70−
71−+-----------------------+----------+--------------------------------------------------------------+
72−| argument | type | information |
73−+=======================+==========+==============================================================+
74−| base\_url | string | base-url, can be overwrite to use same engine on other url |
75−+-----------------------+----------+--------------------------------------------------------------+
76−| number\_of\_results | int | maximum number of results per request |
77−+-----------------------+----------+--------------------------------------------------------------+
78−| language | string | ISO code of language and country like en\_US |
79−+-----------------------+----------+--------------------------------------------------------------+
80−| api\_key | string | api-key if required by engine |
81−+-----------------------+----------+--------------------------------------------------------------+
82−
83−example-code
61+A few of the options have default values in the engine, but are
62+often overwritten by the settings. If ``None`` is assigned to an option
63+in the engine file, it has to be redefined in the settings,
64+otherwise searx will not start with that engine.
65+
66+The naming of that overrides is arbitrary. But the recommended
67+overrides are the following:
68+
69++-----------------------+----------+----------------------------------------------------------------+
70+| argument | type | information |
71++=======================+==========+================================================================+
72+| base\_url | string | base-url, can be overwritten to use same engine on other URL |
73++-----------------------+----------+----------------------------------------------------------------+
74+| number\_of\_results | int | maximum number of results per request |
75++-----------------------+----------+----------------------------------------------------------------+
76+| language | string | ISO code of language and country like en\_US |
77++-----------------------+----------+----------------------------------------------------------------+
78+| api\_key | string | api-key if required by engine |
79++-----------------------+----------+----------------------------------------------------------------+
80+
81+example code
8482~~~~~~~~~~~~
8583
8684.. code:: python
@@ -90,21 +88,20 @@ example-code
9088 paging = True
9189 language_support = True
9290
93−doing request
94−-------------
91+making a request
92+----------------
9593
96−To perform a search you have to specific at least a url on which the
97−request is performing
94+To perform a search an URL have to be specified. In addition to
95+specifying an URL, arguments can be passed to the query.
9896
9997passed arguments
10098~~~~~~~~~~~~~~~~
10199
102−This arguments can be used to calculate the search-query. Furthermore,
103−some of that parameters are filled with default values which can be
104−changed for special purpose.
100+These arguments can be used to construct the search query. Furthermore,
101+parameters with default value can be redefined for special purposes.
105102
106103+----------------------+------------+------------------------------------------------------------------------+
107−| argument | type | default-value, informations |
104+| argument | type | default-value, information |
108105+======================+============+========================================================================+
109106| url | string | ``''`` |
110107+----------------------+------------+------------------------------------------------------------------------+
@@ -132,27 +129,27 @@ changed for special purpose.
132129parsed arguments
133130~~~~~~~~~~~~~~~~
134131
135−The function ``def request(query, params):`` is always returning the
136−``params`` variable back. Inside searx, the following paramters can be
137−used to specific a search-request:
138−
139−+------------+-----------+----------------------------------------------------------+
140−| argument | type | information |
141−+============+===========+==========================================================+
142−| url | string | requested url |
143−+------------+-----------+----------------------------------------------------------+
144−| method | string | HTTP request methode |
145−+------------+-----------+----------------------------------------------------------+
146−| headers | set | HTTP header informations |
147−+------------+-----------+----------------------------------------------------------+
148−| data | set | HTTP data informations (parsed if ``method != 'GET'``) |
149−+------------+-----------+----------------------------------------------------------+
150−| cookies | set | HTTP cookies |
151−+------------+-----------+----------------------------------------------------------+
152−| verify | boolean | Performing SSL-Validity check |
153−+------------+-----------+----------------------------------------------------------+
154−
155−example-code
132+The function ``def request(query, params):`` always returns the
133+``params`` variable. Inside searx, the following paramters can be
134+used to specify a search request:
135+
136++------------+-----------+---------------------------------------------------------+
137+| argument | type | information |
138++============+===========+=========================================================+
139+| url | string | requested url |
140++------------+-----------+---------------------------------------------------------+
141+| method | string | HTTP request method |
142++------------+-----------+---------------------------------------------------------+
143+| headers | set | HTTP header information |
144++------------+-----------+---------------------------------------------------------+
145+| data | set | HTTP data information (parsed if ``method != 'GET'``) |
146++------------+-----------+---------------------------------------------------------+
147+| cookies | set | HTTP cookies |
148++------------+-----------+---------------------------------------------------------+
149+| verify | boolean | Performing SSL-Validity check |
150++------------+-----------+---------------------------------------------------------+
151+
152+example code
156153~~~~~~~~~~~~
157154
158155.. code:: python
@@ -171,10 +168,10 @@ example-code
171168
172169 return params
173170
174−returning results
175−-----------------
171+returned results
172+----------------
176173
177−Searx has the possiblity to return results in different media-types.
174+Searx is able to return results of different media-types.
178175Currently the following media-types are supported:
179176
180177- default
@@ -183,8 +180,8 @@ Currently the following media-types are supported:
183180- torrent
184181- map
185182
186−to set another media-type as default, you must set the parameter
187−``template`` to the required type.
183+To set another media-type as default, the parameter
184+``template`` must be set to the desired type.
188185
189186default
190187~~~~~~~
@@ -246,31 +243,31 @@ videos
246243torrent
247244~~~~~~~
248245
249−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
250−| result-parameter | information |
251−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
252−| template | is set to ```torrent.html``` |
253−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
254−| url | string, which is representing the url of the result |
255−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
256−| title | string, which is representing the title of the result |
257−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
258−| content | string, which is giving a general result-text |
259−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
260−| publishedDate | [datetime.datetime](https://docs.python.org/2/library/datetime.html#datetime-objects), represent when the result is published _(not implemented yet)_ |
261−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
262−| seed | int, number of seeder |
263−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
264−| leech | int, number of leecher |
265−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
266−| filesize | int, size of file in bytes |
267−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
268−| files | int, number of files |
269−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
270−| magnetlink | string, which is the [magnetlink](https://en.wikipedia.org/wiki/Magnet_URI_scheme) of the result |
271−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
272−| torrentfile | string, which is the torrentfile of the result |
273−+------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
246++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
247+| result-parameter | information |
248++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
249+| template | is set to ```torrent.html``` |
250++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
251+| url | string, which is representing the url of the result |
252++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
253+| title | string, which is representing the title of the result |
254++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
255+| content | string, which is giving a general result-text |
256++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
257+| publishedDate | `datetime.datetime <https://docs.python.org/2/library/datetime.html#datetime-objects>`__, represent when the result is published *(not implemented yet)* |
258++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
259+| seed | int, number of seeder |
260++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
261+| leech | int, number of leecher |
262++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
263+| filesize | int, size of file in bytes |
264++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
265+| files | int, number of files |
266++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
267+| magnetlink | string, which is the `magnetlink <https://en.wikipedia.org/wiki/Magnet_URI_scheme>`__ of the result |
268++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
269+| torrentfile | string, which is the torrentfile of the result |
270++------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------+
274271
275272
276273map