on master help sign in
[doc] engines overview added
commit4af0e52e9412a1c757ae4825fdbd5123e0d2aa07 authorAdam Tauber <asciimoo@gmail.com> dateSat 28 Nov 2015, 19:26 (11 years ago) parentfebf725
7 files changed+1224−1
_sources/dev/engine_overview.txt+314 _sources/index.txt+1 dev/engine_overview.html+592 docs/dev/engine_overview.rst+314 docs/index.rst+1 index.html+1 searchindex.js+1−1
_sources/dev/engine_overview.txtnew file+314
@@ -0,0 +1,314 @@
1+Engine overview
2+===============
3+
4+
5+searx is a `metasearch-engine <https://en.wikipedia.org/wiki/Metasearch_engine>`__,
6+so it is using different search engines to provide better results.
7+
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
14+
15+
16+.. contents::
17+ :depth: 3
18+
19+general engine configuration
20+----------------------------
21+
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
24+(normally ``settings.yml``). The arguments in the settings file override
25+the one in the engine file.
26+
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.
30+
31+
32+engine-file
33+~~~~~~~~~~~
34+
35++---------------------+-----------+-----------------------------------------+
36+| argument | type | information |
37++=====================+===========+=========================================+
38+| categories | list | pages, in which the engine is working |
39++---------------------+-----------+-----------------------------------------+
40+| paging | boolean | support multible pages |
41++---------------------+-----------+-----------------------------------------+
42+| language\_support | boolean | support language choosing |
43++---------------------+-----------+-----------------------------------------+
44+
45+settings.yml
46+~~~~~~~~~~~~
47+
48++------------+----------+-----------------------------------------------+
49+| argument | type | information |
50++============+==========+===============================================+
51+| name | string | name of search-engine |
52++------------+----------+-----------------------------------------------+
53+| engine | string | name of searx-engine (filename without .py) |
54++------------+----------+-----------------------------------------------+
55+| shortcut | string | shortcut of search-engine |
56++------------+----------+-----------------------------------------------+
57+| timeout | string | specific timeout for search-engine |
58++------------+----------+-----------------------------------------------+
59+
60+overrides
61+~~~~~~~~~
62+
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
84+~~~~~~~~~~~~
85+
86+.. code:: python
87+
88+ # engine dependent config
89+ categories = ['general']
90+ paging = True
91+ language_support = True
92+
93+doing request
94+-------------
95+
96+To perform a search you have to specific at least a url on which the
97+request is performing
98+
99+passed arguments
100+~~~~~~~~~~~~~~~~
101+
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.
105+
106++----------------------+------------+------------------------------------------------------------------------+
107+| argument | type | default-value, informations |
108++======================+============+========================================================================+
109+| url | string | ``''`` |
110++----------------------+------------+------------------------------------------------------------------------+
111+| method | string | ``'GET'`` |
112++----------------------+------------+------------------------------------------------------------------------+
113+| headers | set | ``{}`` |
114++----------------------+------------+------------------------------------------------------------------------+
115+| data | set | ``{}`` |
116++----------------------+------------+------------------------------------------------------------------------+
117+| cookies | set | ``{}`` |
118++----------------------+------------+------------------------------------------------------------------------+
119+| verify | boolean | ``True`` |
120++----------------------+------------+------------------------------------------------------------------------+
121+| headers.User-Agent | string | a random User-Agent |
122++----------------------+------------+------------------------------------------------------------------------+
123+| category | string | current category, like ``'general'`` |
124++----------------------+------------+------------------------------------------------------------------------+
125+| started | datetime | current date-time |
126++----------------------+------------+------------------------------------------------------------------------+
127+| pageno | int | current pagenumber |
128++----------------------+------------+------------------------------------------------------------------------+
129+| language | string | specific language code like ``'en_US'``, or ``'all'`` if unspecified |
130++----------------------+------------+------------------------------------------------------------------------+
131+
132+parsed arguments
133+~~~~~~~~~~~~~~~~
134+
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
156+~~~~~~~~~~~~
157+
158+.. code:: python
159+
160+ # search-url
161+ base_url = 'https://example.com/'
162+ search_string = 'search?{query}&page={page}'
163+
164+ # do search-request
165+ def request(query, params):
166+ search_path = search_string.format(
167+ query=urlencode({'q': query}),
168+ page=params['pageno'])
169+
170+ params['url'] = base_url + search_path
171+
172+ return params
173+
174+returning results
175+-----------------
176+
177+Searx has the possiblity to return results in different media-types.
178+Currently the following media-types are supported:
179+
180+- default
181+- images
182+- videos
183+- torrent
184+- map
185+
186+to set another media-type as default, you must set the parameter
187+``template`` to the required type.
188+
189+default
190+~~~~~~~
191+
192++--------------------+------------------------------------------------------------------------------------------------------------------------------------+
193+| result-parameter | information |
194++====================+====================================================================================================================================+
195+| url | string, which is representing the url of the result |
196++--------------------+------------------------------------------------------------------------------------------------------------------------------------+
197+| title | string, which is representing the title of the result |
198++--------------------+------------------------------------------------------------------------------------------------------------------------------------+
199+| content | string, which is giving a general result-text |
200++--------------------+------------------------------------------------------------------------------------------------------------------------------------+
201+| publishedDate | `datetime.datetime <https://docs.python.org/2/library/datetime.html#datetime-objects>`__, represent when the result is published |
202++--------------------+------------------------------------------------------------------------------------------------------------------------------------+
203+
204+images
205+~~~~~~
206+
207+to use this template, the parameter
208+
209++--------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
210+| result-parameter | information |
211++====================+===========================================================================================================================================================+
212+| template | is set to ``images.html`` |
213++--------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
214+| url | string, which is representing the url to the result site |
215++--------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
216+| title | string, which is representing the title of the result *(partly implemented)* |
217++--------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
218+| content | *(partly implemented)* |
219++--------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
220+| publishedDate | `datetime.datetime <https://docs.python.org/2/library/datetime.html#datetime-objects>`__, represent when the result is published *(partly implemented)* |
221++--------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
222+| img\_src | string, which is representing the url to the result image |
223++--------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
224+| thumbnail\_src | string, which is representing the url to a small-preview image |
225++--------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
226+
227+videos
228+~~~~~~
229+
230++--------------------+------------------------------------------------------------------------------------------------------------------------------------+
231+| result-parameter | information |
232++====================+====================================================================================================================================+
233+| template | is set to ``videos.html`` |
234++--------------------+------------------------------------------------------------------------------------------------------------------------------------+
235+| url | string, which is representing the url of the result |
236++--------------------+------------------------------------------------------------------------------------------------------------------------------------+
237+| title | string, which is representing the title of the result |
238++--------------------+------------------------------------------------------------------------------------------------------------------------------------+
239+| content | *(not implemented yet)* |
240++--------------------+------------------------------------------------------------------------------------------------------------------------------------+
241+| publishedDate | `datetime.datetime <https://docs.python.org/2/library/datetime.html#datetime-objects>`__, represent when the result is published |
242++--------------------+------------------------------------------------------------------------------------------------------------------------------------+
243+| thumbnail | string, which is representing the url to a small-preview image |
244++--------------------+------------------------------------------------------------------------------------------------------------------------------------+
245+
246+torrent
247+~~~~~~~
248+
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++------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
274+
275+
276+map
277+~~~
278+
279++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
280+| result-parameter | information |
281++=========================+====================================================================================================================================+
282+| url | string, which is representing the url of the result |
283++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
284+| title | string, which is representing the title of the result |
285++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
286+| content | string, which is giving a general result-text |
287++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
288+| publishedDate | `datetime.datetime <https://docs.python.org/2/library/datetime.html#datetime-objects>`__, represent when the result is published |
289++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
290+| latitude | latitude of result (in decimal format) |
291++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
292+| longitude | longitude of result (in decimal format) |
293++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
294+| boundingbox | boundingbox of result (array of 4. values ``[lat-min, lat-max, lon-min, lon-max]``) |
295++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
296+| geojson | geojson of result (http://geojson.org) |
297++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
298+| osm.type | type of osm-object (if OSM-Result) |
299++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
300+| osm.id | id of osm-object (if OSM-Result) |
301++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
302+| address.name | name of object |
303++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
304+| address.road | street adress of object |
305++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
306+| address.house\_number | house number of object |
307++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
308+| address.locality | city, place of object |
309++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
310+| address.postcode | postcode of object |
311++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
312+| address.country | country of object |
313++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
314+
_sources/index.txt+1
@@ -34,6 +34,7 @@ Developer documentation
3434
3535 dev/contribution_guide
3636 dev/install/installation
37+ dev/engine_overview
3738 dev/search_api
3839 dev/plugins
3940 dev/translation
dev/engine_overview.htmlnew file+592
@@ -0,0 +1,592 @@
1+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3+
4+
5+<html xmlns="http://www.w3.org/1999/xhtml">
6+ <head>
7+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
8+
9+ <title>Engine overview &mdash; searx 0.8.0 documentation</title>
10+
11+ <link rel="stylesheet" href="../_static/style.css" type="text/css" />
12+ <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
13+
14+ <script type="text/javascript">
15+ var DOCUMENTATION_OPTIONS = {
16+ URL_ROOT: '../',
17+ VERSION: '0.8.0',
18+ COLLAPSE_INDEX: false,
19+ FILE_SUFFIX: '.html',
20+ HAS_SOURCE: true
21+ };
22+ </script>
23+ <script type="text/javascript" src="../_static/jquery.js"></script>
24+ <script type="text/javascript" src="../_static/underscore.js"></script>
25+ <script type="text/javascript" src="../_static/doctools.js"></script>
26+ <link rel="top" title="searx 0.8.0 documentation" href="../index.html" />
27+ <link rel="next" title="Search API" href="search_api.html" />
28+ <link rel="prev" title="Installation" href="install/installation.html" />
29+
30+
31+ <link media="only screen and (max-device-width: 480px)" href="../_static/small_flask.css" type= "text/css" rel="stylesheet" />
32+ <meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9">
33+
34+ </head>
35+ <body role="document">
36+
37+ <div class="document">
38+ <div class="documentwrapper">
39+ <div class="bodywrapper">
40+ <div class="body" role="main">
41+
42+ <div class="section" id="engine-overview">
43+<h1><a class="toc-backref" href="#id2">Engine overview</a><a class="headerlink" href="#engine-overview" title="Permalink to this headline">¶</a></h1>
44+<p>searx is a <a class="reference external" href="https://en.wikipedia.org/wiki/Metasearch_engine">metasearch-engine</a>,
45+so it is using different search engines to provide better results.</p>
46+<p>Because there is no general search-api which can be used for every
47+search-engine, there must be build an adapter between searx and the
48+external search-engine. This adapters are stored in the folder
49+<a class="reference external" href="https://github.com/asciimoo/searx/tree/master/searx/engines">*searx/engines*</a>,
50+and this site is build to make an general documentation about this
51+engines</p>
52+<div class="contents topic" id="contents">
53+<p class="topic-title first">Contents</p>
54+<ul class="simple">
55+<li><a class="reference internal" href="#engine-overview" id="id2">Engine overview</a><ul>
56+<li><a class="reference internal" href="#general-engine-configuration" id="id3">general engine configuration</a><ul>
57+<li><a class="reference internal" href="#engine-file" id="id4">engine-file</a></li>
58+<li><a class="reference internal" href="#settings-yml" id="id5">settings.yml</a></li>
59+<li><a class="reference internal" href="#overrides" id="id6">overrides</a></li>
60+<li><a class="reference internal" href="#example-code" id="id7">example-code</a></li>
61+</ul>
62+</li>
63+<li><a class="reference internal" href="#doing-request" id="id8">doing request</a><ul>
64+<li><a class="reference internal" href="#passed-arguments" id="id9">passed arguments</a></li>
65+<li><a class="reference internal" href="#parsed-arguments" id="id10">parsed arguments</a></li>
66+<li><a class="reference internal" href="#id1" id="id11">example-code</a></li>
67+</ul>
68+</li>
69+<li><a class="reference internal" href="#returning-results" id="id12">returning results</a><ul>
70+<li><a class="reference internal" href="#default" id="id13">default</a></li>
71+<li><a class="reference internal" href="#images" id="id14">images</a></li>
72+<li><a class="reference internal" href="#videos" id="id15">videos</a></li>
73+<li><a class="reference internal" href="#torrent" id="id16">torrent</a></li>
74+<li><a class="reference internal" href="#map" id="id17">map</a></li>
75+</ul>
76+</li>
77+</ul>
78+</li>
79+</ul>
80+</div>
81+<div class="section" id="general-engine-configuration">
82+<h2><a class="toc-backref" href="#id3">general engine configuration</a><a class="headerlink" href="#general-engine-configuration" title="Permalink to this headline">¶</a></h2>
83+<p>It is required to tell searx what results can the engine provide. The
84+arguments can be inserted in the engine file, or in the settings file
85+(normally <code class="docutils literal"><span class="pre">settings.yml</span></code>). The arguments in the settings file override
86+the one in the engine file.</p>
87+<p>Really, it is for most options no difference if there are contained in
88+the engine-file or in the settings. But there is a standard where to
89+place specific arguments by default.</p>
90+<div class="section" id="engine-file">
91+<h3><a class="toc-backref" href="#id4">engine-file</a><a class="headerlink" href="#engine-file" title="Permalink to this headline">¶</a></h3>
92+<table border="1" class="docutils">
93+<colgroup>
94+<col width="29%" />
95+<col width="15%" />
96+<col width="56%" />
97+</colgroup>
98+<thead valign="bottom">
99+<tr class="row-odd"><th class="head">argument</th>
100+<th class="head">type</th>
101+<th class="head">information</th>
102+</tr>
103+</thead>
104+<tbody valign="top">
105+<tr class="row-even"><td>categories</td>
106+<td>list</td>
107+<td>pages, in which the engine is working</td>
108+</tr>
109+<tr class="row-odd"><td>paging</td>
110+<td>boolean</td>
111+<td>support multible pages</td>
112+</tr>
113+<tr class="row-even"><td>language_support</td>
114+<td>boolean</td>
115+<td>support language choosing</td>
116+</tr>
117+</tbody>
118+</table>
119+</div>
120+<div class="section" id="settings-yml">
121+<h3><a class="toc-backref" href="#id5">settings.yml</a><a class="headerlink" href="#settings-yml" title="Permalink to this headline">¶</a></h3>
122+<table border="1" class="docutils">
123+<colgroup>
124+<col width="17%" />
125+<col width="14%" />
126+<col width="68%" />
127+</colgroup>
128+<thead valign="bottom">
129+<tr class="row-odd"><th class="head">argument</th>
130+<th class="head">type</th>
131+<th class="head">information</th>
132+</tr>
133+</thead>
134+<tbody valign="top">
135+<tr class="row-even"><td>name</td>
136+<td>string</td>
137+<td>name of search-engine</td>
138+</tr>
139+<tr class="row-odd"><td>engine</td>
140+<td>string</td>
141+<td>name of searx-engine (filename without .py)</td>
142+</tr>
143+<tr class="row-even"><td>shortcut</td>
144+<td>string</td>
145+<td>shortcut of search-engine</td>
146+</tr>
147+<tr class="row-odd"><td>timeout</td>
148+<td>string</td>
149+<td>specific timeout for search-engine</td>
150+</tr>
151+</tbody>
152+</table>
153+</div>
154+<div class="section" id="overrides">
155+<h3><a class="toc-backref" href="#id6">overrides</a><a class="headerlink" href="#overrides" title="Permalink to this headline">¶</a></h3>
156+<p>There are some options, with have default values in the engine, but are
157+often overwritten by the settings. If the option is assigned in the
158+engine-file with <code class="docutils literal"><span class="pre">None</span></code> it has to be redefined in the settings,
159+otherwise searx is not starting with that engine.</p>
160+<p>The naming of that overrides can be wathever you want. But we recommend
161+the using of already used overrides if possible:</p>
162+<table border="1" class="docutils">
163+<colgroup>
164+<col width="24%" />
165+<col width="11%" />
166+<col width="65%" />
167+</colgroup>
168+<thead valign="bottom">
169+<tr class="row-odd"><th class="head">argument</th>
170+<th class="head">type</th>
171+<th class="head">information</th>
172+</tr>
173+</thead>
174+<tbody valign="top">
175+<tr class="row-even"><td>base_url</td>
176+<td>string</td>
177+<td>base-url, can be overwrite to use same engine on other url</td>
178+</tr>
179+<tr class="row-odd"><td>number_of_results</td>
180+<td>int</td>
181+<td>maximum number of results per request</td>
182+</tr>
183+<tr class="row-even"><td>language</td>
184+<td>string</td>
185+<td>ISO code of language and country like en_US</td>
186+</tr>
187+<tr class="row-odd"><td>api_key</td>
188+<td>string</td>
189+<td>api-key if required by engine</td>
190+</tr>
191+</tbody>
192+</table>
193+</div>
194+<div class="section" id="example-code">
195+<h3><a class="toc-backref" href="#id7">example-code</a><a class="headerlink" href="#example-code" title="Permalink to this headline">¶</a></h3>
196+<div class="code python highlight-python"><div class="highlight"><pre><span class="c"># engine dependent config</span>
197+<span class="n">categories</span> <span class="o">=</span> <span class="p">[</span><span class="s">&#39;general&#39;</span><span class="p">]</span>
198+<span class="n">paging</span> <span class="o">=</span> <span class="bp">True</span>
199+<span class="n">language_support</span> <span class="o">=</span> <span class="bp">True</span>
200+</pre></div>
201+</div>
202+</div>
203+</div>
204+<div class="section" id="doing-request">
205+<h2><a class="toc-backref" href="#id8">doing request</a><a class="headerlink" href="#doing-request" title="Permalink to this headline">¶</a></h2>
206+<p>To perform a search you have to specific at least a url on which the
207+request is performing</p>
208+<div class="section" id="passed-arguments">
209+<h3><a class="toc-backref" href="#id9">passed arguments</a><a class="headerlink" href="#passed-arguments" title="Permalink to this headline">¶</a></h3>
210+<p>This arguments can be used to calculate the search-query. Furthermore,
211+some of that parameters are filled with default values which can be
212+changed for special purpose.</p>
213+<table border="1" class="docutils">
214+<colgroup>
215+<col width="21%" />
216+<col width="11%" />
217+<col width="68%" />
218+</colgroup>
219+<thead valign="bottom">
220+<tr class="row-odd"><th class="head">argument</th>
221+<th class="head">type</th>
222+<th class="head">default-value, informations</th>
223+</tr>
224+</thead>
225+<tbody valign="top">
226+<tr class="row-even"><td>url</td>
227+<td>string</td>
228+<td><code class="docutils literal"><span class="pre">''</span></code></td>
229+</tr>
230+<tr class="row-odd"><td>method</td>
231+<td>string</td>
232+<td><code class="docutils literal"><span class="pre">'GET'</span></code></td>
233+</tr>
234+<tr class="row-even"><td>headers</td>
235+<td>set</td>
236+<td><code class="docutils literal"><span class="pre">{}</span></code></td>
237+</tr>
238+<tr class="row-odd"><td>data</td>
239+<td>set</td>
240+<td><code class="docutils literal"><span class="pre">{}</span></code></td>
241+</tr>
242+<tr class="row-even"><td>cookies</td>
243+<td>set</td>
244+<td><code class="docutils literal"><span class="pre">{}</span></code></td>
245+</tr>
246+<tr class="row-odd"><td>verify</td>
247+<td>boolean</td>
248+<td><code class="docutils literal"><span class="pre">True</span></code></td>
249+</tr>
250+<tr class="row-even"><td>headers.User-Agent</td>
251+<td>string</td>
252+<td>a random User-Agent</td>
253+</tr>
254+<tr class="row-odd"><td>category</td>
255+<td>string</td>
256+<td>current category, like <code class="docutils literal"><span class="pre">'general'</span></code></td>
257+</tr>
258+<tr class="row-even"><td>started</td>
259+<td>datetime</td>
260+<td>current date-time</td>
261+</tr>
262+<tr class="row-odd"><td>pageno</td>
263+<td>int</td>
264+<td>current pagenumber</td>
265+</tr>
266+<tr class="row-even"><td>language</td>
267+<td>string</td>
268+<td>specific language code like <code class="docutils literal"><span class="pre">'en_US'</span></code>, or <code class="docutils literal"><span class="pre">'all'</span></code> if unspecified</td>
269+</tr>
270+</tbody>
271+</table>
272+</div>
273+<div class="section" id="parsed-arguments">
274+<h3><a class="toc-backref" href="#id10">parsed arguments</a><a class="headerlink" href="#parsed-arguments" title="Permalink to this headline">¶</a></h3>
275+<p>The function <code class="docutils literal"><span class="pre">def</span> <span class="pre">request(query,</span> <span class="pre">params):</span></code> is always returning the
276+<code class="docutils literal"><span class="pre">params</span></code> variable back. Inside searx, the following paramters can be
277+used to specific a search-request:</p>
278+<table border="1" class="docutils">
279+<colgroup>
280+<col width="15%" />
281+<col width="14%" />
282+<col width="72%" />
283+</colgroup>
284+<thead valign="bottom">
285+<tr class="row-odd"><th class="head">argument</th>
286+<th class="head">type</th>
287+<th class="head">information</th>
288+</tr>
289+</thead>
290+<tbody valign="top">
291+<tr class="row-even"><td>url</td>
292+<td>string</td>
293+<td>requested url</td>
294+</tr>
295+<tr class="row-odd"><td>method</td>
296+<td>string</td>
297+<td>HTTP request methode</td>
298+</tr>
299+<tr class="row-even"><td>headers</td>
300+<td>set</td>
301+<td>HTTP header informations</td>
302+</tr>
303+<tr class="row-odd"><td>data</td>
304+<td>set</td>
305+<td>HTTP data informations (parsed if <code class="docutils literal"><span class="pre">method</span> <span class="pre">!=</span> <span class="pre">'GET'</span></code>)</td>
306+</tr>
307+<tr class="row-even"><td>cookies</td>
308+<td>set</td>
309+<td>HTTP cookies</td>
310+</tr>
311+<tr class="row-odd"><td>verify</td>
312+<td>boolean</td>
313+<td>Performing SSL-Validity check</td>
314+</tr>
315+</tbody>
316+</table>
317+</div>
318+<div class="section" id="id1">
319+<h3><a class="toc-backref" href="#id11">example-code</a><a class="headerlink" href="#id1" title="Permalink to this headline">¶</a></h3>
320+<div class="code python highlight-python"><div class="highlight"><pre><span class="c"># search-url</span>
321+<span class="n">base_url</span> <span class="o">=</span> <span class="s">&#39;https://example.com/&#39;</span>
322+<span class="n">search_string</span> <span class="o">=</span> <span class="s">&#39;search?{query}&amp;page={page}&#39;</span>
323+
324+<span class="c"># do search-request</span>
325+<span class="k">def</span> <span class="nf">request</span><span class="p">(</span><span class="n">query</span><span class="p">,</span> <span class="n">params</span><span class="p">):</span>
326+ <span class="n">search_path</span> <span class="o">=</span> <span class="n">search_string</span><span class="o">.</span><span class="n">format</span><span class="p">(</span>
327+ <span class="n">query</span><span class="o">=</span><span class="n">urlencode</span><span class="p">({</span><span class="s">&#39;q&#39;</span><span class="p">:</span> <span class="n">query</span><span class="p">}),</span>
328+ <span class="n">page</span><span class="o">=</span><span class="n">params</span><span class="p">[</span><span class="s">&#39;pageno&#39;</span><span class="p">])</span>
329+
330+ <span class="n">params</span><span class="p">[</span><span class="s">&#39;url&#39;</span><span class="p">]</span> <span class="o">=</span> <span class="n">base_url</span> <span class="o">+</span> <span class="n">search_path</span>
331+
332+ <span class="k">return</span> <span class="n">params</span>
333+</pre></div>
334+</div>
335+</div>
336+</div>
337+<div class="section" id="returning-results">
338+<h2><a class="toc-backref" href="#id12">returning results</a><a class="headerlink" href="#returning-results" title="Permalink to this headline">¶</a></h2>
339+<p>Searx has the possiblity to return results in different media-types.
340+Currently the following media-types are supported:</p>
341+<ul class="simple">
342+<li>default</li>
343+<li>images</li>
344+<li>videos</li>
345+<li>torrent</li>
346+<li>map</li>
347+</ul>
348+<p>to set another media-type as default, you must set the parameter
349+<code class="docutils literal"><span class="pre">template</span></code> to the required type.</p>
350+<div class="section" id="default">
351+<h3><a class="toc-backref" href="#id13">default</a><a class="headerlink" href="#default" title="Permalink to this headline">¶</a></h3>
352+<table border="1" class="docutils">
353+<colgroup>
354+<col width="13%" />
355+<col width="87%" />
356+</colgroup>
357+<thead valign="bottom">
358+<tr class="row-odd"><th class="head">result-parameter</th>
359+<th class="head">information</th>
360+</tr>
361+</thead>
362+<tbody valign="top">
363+<tr class="row-even"><td>url</td>
364+<td>string, which is representing the url of the result</td>
365+</tr>
366+<tr class="row-odd"><td>title</td>
367+<td>string, which is representing the title of the result</td>
368+</tr>
369+<tr class="row-even"><td>content</td>
370+<td>string, which is giving a general result-text</td>
371+</tr>
372+<tr class="row-odd"><td>publishedDate</td>
373+<td><a class="reference external" href="https://docs.python.org/2/library/datetime.html#datetime-objects">datetime.datetime</a>, represent when the result is published</td>
374+</tr>
375+</tbody>
376+</table>
377+</div>
378+<div class="section" id="images">
379+<h3><a class="toc-backref" href="#id14">images</a><a class="headerlink" href="#images" title="Permalink to this headline">¶</a></h3>
380+<p>to use this template, the parameter</p>
381+<table border="1" class="docutils">
382+<colgroup>
383+<col width="11%" />
384+<col width="89%" />
385+</colgroup>
386+<thead valign="bottom">
387+<tr class="row-odd"><th class="head">result-parameter</th>
388+<th class="head">information</th>
389+</tr>
390+</thead>
391+<tbody valign="top">
392+<tr class="row-even"><td>template</td>
393+<td>is set to <code class="docutils literal"><span class="pre">images.html</span></code></td>
394+</tr>
395+<tr class="row-odd"><td>url</td>
396+<td>string, which is representing the url to the result site</td>
397+</tr>
398+<tr class="row-even"><td>title</td>
399+<td>string, which is representing the title of the result <em>(partly implemented)</em></td>
400+</tr>
401+<tr class="row-odd"><td>content</td>
402+<td><em>(partly implemented)</em></td>
403+</tr>
404+<tr class="row-even"><td>publishedDate</td>
405+<td><a class="reference external" href="https://docs.python.org/2/library/datetime.html#datetime-objects">datetime.datetime</a>, represent when the result is published <em>(partly implemented)</em></td>
406+</tr>
407+<tr class="row-odd"><td>img_src</td>
408+<td>string, which is representing the url to the result image</td>
409+</tr>
410+<tr class="row-even"><td>thumbnail_src</td>
411+<td>string, which is representing the url to a small-preview image</td>
412+</tr>
413+</tbody>
414+</table>
415+</div>
416+<div class="section" id="videos">
417+<h3><a class="toc-backref" href="#id15">videos</a><a class="headerlink" href="#videos" title="Permalink to this headline">¶</a></h3>
418+<table border="1" class="docutils">
419+<colgroup>
420+<col width="13%" />
421+<col width="87%" />
422+</colgroup>
423+<thead valign="bottom">
424+<tr class="row-odd"><th class="head">result-parameter</th>
425+<th class="head">information</th>
426+</tr>
427+</thead>
428+<tbody valign="top">
429+<tr class="row-even"><td>template</td>
430+<td>is set to <code class="docutils literal"><span class="pre">videos.html</span></code></td>
431+</tr>
432+<tr class="row-odd"><td>url</td>
433+<td>string, which is representing the url of the result</td>
434+</tr>
435+<tr class="row-even"><td>title</td>
436+<td>string, which is representing the title of the result</td>
437+</tr>
438+<tr class="row-odd"><td>content</td>
439+<td><em>(not implemented yet)</em></td>
440+</tr>
441+<tr class="row-even"><td>publishedDate</td>
442+<td><a class="reference external" href="https://docs.python.org/2/library/datetime.html#datetime-objects">datetime.datetime</a>, represent when the result is published</td>
443+</tr>
444+<tr class="row-odd"><td>thumbnail</td>
445+<td>string, which is representing the url to a small-preview image</td>
446+</tr>
447+</tbody>
448+</table>
449+</div>
450+<div class="section" id="torrent">
451+<h3><a class="toc-backref" href="#id16">torrent</a><a class="headerlink" href="#torrent" title="Permalink to this headline">¶</a></h3>
452+<table border="1" class="docutils">
453+<colgroup>
454+<col width="11%" />
455+<col width="89%" />
456+</colgroup>
457+<tbody valign="top">
458+<tr class="row-odd"><td>result-parameter</td>
459+<td>information</td>
460+</tr>
461+<tr class="row-even"><td>template</td>
462+<td>is set to <code class="docutils literal"><span class="pre">`torrent.html`</span></code></td>
463+</tr>
464+<tr class="row-odd"><td>url</td>
465+<td>string, which is representing the url of the result</td>
466+</tr>
467+<tr class="row-even"><td>title</td>
468+<td>string, which is representing the title of the result</td>
469+</tr>
470+<tr class="row-odd"><td>content</td>
471+<td>string, which is giving a general result-text</td>
472+</tr>
473+<tr class="row-even"><td>publishedDate</td>
474+<td>[datetime.datetime](<a class="reference external" href="https://docs.python.org/2/library/datetime.html#datetime-objects">https://docs.python.org/2/library/datetime.html#datetime-objects</a>), represent when the result is published _(not implemented yet)_</td>
475+</tr>
476+<tr class="row-odd"><td>seed</td>
477+<td>int, number of seeder</td>
478+</tr>
479+<tr class="row-even"><td>leech</td>
480+<td>int, number of leecher</td>
481+</tr>
482+<tr class="row-odd"><td>filesize</td>
483+<td>int, size of file in bytes</td>
484+</tr>
485+<tr class="row-even"><td>files</td>
486+<td>int, number of files</td>
487+</tr>
488+<tr class="row-odd"><td>magnetlink</td>
489+<td>string, which is the [magnetlink](<a class="reference external" href="https://en.wikipedia.org/wiki/Magnet_URI_scheme">https://en.wikipedia.org/wiki/Magnet_URI_scheme</a>) of the result</td>
490+</tr>
491+<tr class="row-even"><td>torrentfile</td>
492+<td>string, which is the torrentfile of the result</td>
493+</tr>
494+</tbody>
495+</table>
496+</div>
497+<div class="section" id="map">
498+<h3><a class="toc-backref" href="#id17">map</a><a class="headerlink" href="#map" title="Permalink to this headline">¶</a></h3>
499+<table border="1" class="docutils">
500+<colgroup>
501+<col width="16%" />
502+<col width="84%" />
503+</colgroup>
504+<thead valign="bottom">
505+<tr class="row-odd"><th class="head">result-parameter</th>
506+<th class="head">information</th>
507+</tr>
508+</thead>
509+<tbody valign="top">
510+<tr class="row-even"><td>url</td>
511+<td>string, which is representing the url of the result</td>
512+</tr>
513+<tr class="row-odd"><td>title</td>
514+<td>string, which is representing the title of the result</td>
515+</tr>
516+<tr class="row-even"><td>content</td>
517+<td>string, which is giving a general result-text</td>
518+</tr>
519+<tr class="row-odd"><td>publishedDate</td>
520+<td><a class="reference external" href="https://docs.python.org/2/library/datetime.html#datetime-objects">datetime.datetime</a>, represent when the result is published</td>
521+</tr>
522+<tr class="row-even"><td>latitude</td>
523+<td>latitude of result (in decimal format)</td>
524+</tr>
525+<tr class="row-odd"><td>longitude</td>
526+<td>longitude of result (in decimal format)</td>
527+</tr>
528+<tr class="row-even"><td>boundingbox</td>
529+<td>boundingbox of result (array of 4. values <code class="docutils literal"><span class="pre">[lat-min,</span> <span class="pre">lat-max,</span> <span class="pre">lon-min,</span> <span class="pre">lon-max]</span></code>)</td>
530+</tr>
531+<tr class="row-odd"><td>geojson</td>
532+<td>geojson of result (<a class="reference external" href="http://geojson.org">http://geojson.org</a>)</td>
533+</tr>
534+<tr class="row-even"><td>osm.type</td>
535+<td>type of osm-object (if OSM-Result)</td>
536+</tr>
537+<tr class="row-odd"><td>osm.id</td>
538+<td>id of osm-object (if OSM-Result)</td>
539+</tr>
540+<tr class="row-even"><td>address.name</td>
541+<td>name of object</td>
542+</tr>
543+<tr class="row-odd"><td>address.road</td>
544+<td>street adress of object</td>
545+</tr>
546+<tr class="row-even"><td>address.house_number</td>
547+<td>house number of object</td>
548+</tr>
549+<tr class="row-odd"><td>address.locality</td>
550+<td>city, place of object</td>
551+</tr>
552+<tr class="row-even"><td>address.postcode</td>
553+<td>postcode of object</td>
554+</tr>
555+<tr class="row-odd"><td>address.country</td>
556+<td>country of object</td>
557+</tr>
558+</tbody>
559+</table>
560+</div>
561+</div>
562+</div>
563+
564+
565+ </div>
566+ </div>
567+ </div>
568+ <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
569+ <div class="sphinxsidebarwrapper"><div class="sidebar_container body">
570+<h1>Searx</h1>
571+<ul>
572+ <li><a href="../index.html">Home</a></li>
573+ <li><a href="https://github.com/asciimoo/searx">Source</a></li>
574+ <li><a href="https://github.com/asciimoo/searx/wiki">Wiki</a></li>
575+ <li><a href="https://github.com/asciimoo/searx/wiki/Searx-instances">Public instances</a></li>
576+</ul>
577+<hr />
578+<ul>
579+ <li><a href="https://twitter.com/Searx_engine">Twitter</a></li>
580+ <li><a href="https://flattr.com/submit/auto?user_id=asciimoo&url=https://github.com/asciimoo/searx&title=searx&language=&tags=github&category=software">Flattr</a></li>
581+ <li><a href="https://gratipay.com/searx">Gratipay</a></li>
582+</ul>
583+</div>
584+ </div>
585+ </div>
586+ <div class="clearer"></div>
587+ </div>
588+ <div class="footer">
589+ &copy; Copyright 2015, Adam Tauber.
590+ </div>
591+ </body>
592+</html>
docs/dev/engine_overview.rstnew file+314
@@ -0,0 +1,314 @@
1+Engine overview
2+===============
3+
4+
5+searx is a `metasearch-engine <https://en.wikipedia.org/wiki/Metasearch_engine>`__,
6+so it is using different search engines to provide better results.
7+
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
14+
15+
16+.. contents::
17+ :depth: 3
18+
19+general engine configuration
20+----------------------------
21+
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
24+(normally ``settings.yml``). The arguments in the settings file override
25+the one in the engine file.
26+
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.
30+
31+
32+engine-file
33+~~~~~~~~~~~
34+
35++---------------------+-----------+-----------------------------------------+
36+| argument | type | information |
37++=====================+===========+=========================================+
38+| categories | list | pages, in which the engine is working |
39++---------------------+-----------+-----------------------------------------+
40+| paging | boolean | support multible pages |
41++---------------------+-----------+-----------------------------------------+
42+| language\_support | boolean | support language choosing |
43++---------------------+-----------+-----------------------------------------+
44+
45+settings.yml
46+~~~~~~~~~~~~
47+
48++------------+----------+-----------------------------------------------+
49+| argument | type | information |
50++============+==========+===============================================+
51+| name | string | name of search-engine |
52++------------+----------+-----------------------------------------------+
53+| engine | string | name of searx-engine (filename without .py) |
54++------------+----------+-----------------------------------------------+
55+| shortcut | string | shortcut of search-engine |
56++------------+----------+-----------------------------------------------+
57+| timeout | string | specific timeout for search-engine |
58++------------+----------+-----------------------------------------------+
59+
60+overrides
61+~~~~~~~~~
62+
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
84+~~~~~~~~~~~~
85+
86+.. code:: python
87+
88+ # engine dependent config
89+ categories = ['general']
90+ paging = True
91+ language_support = True
92+
93+doing request
94+-------------
95+
96+To perform a search you have to specific at least a url on which the
97+request is performing
98+
99+passed arguments
100+~~~~~~~~~~~~~~~~
101+
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.
105+
106++----------------------+------------+------------------------------------------------------------------------+
107+| argument | type | default-value, informations |
108++======================+============+========================================================================+
109+| url | string | ``''`` |
110++----------------------+------------+------------------------------------------------------------------------+
111+| method | string | ``'GET'`` |
112++----------------------+------------+------------------------------------------------------------------------+
113+| headers | set | ``{}`` |
114++----------------------+------------+------------------------------------------------------------------------+
115+| data | set | ``{}`` |
116++----------------------+------------+------------------------------------------------------------------------+
117+| cookies | set | ``{}`` |
118++----------------------+------------+------------------------------------------------------------------------+
119+| verify | boolean | ``True`` |
120++----------------------+------------+------------------------------------------------------------------------+
121+| headers.User-Agent | string | a random User-Agent |
122++----------------------+------------+------------------------------------------------------------------------+
123+| category | string | current category, like ``'general'`` |
124++----------------------+------------+------------------------------------------------------------------------+
125+| started | datetime | current date-time |
126++----------------------+------------+------------------------------------------------------------------------+
127+| pageno | int | current pagenumber |
128++----------------------+------------+------------------------------------------------------------------------+
129+| language | string | specific language code like ``'en_US'``, or ``'all'`` if unspecified |
130++----------------------+------------+------------------------------------------------------------------------+
131+
132+parsed arguments
133+~~~~~~~~~~~~~~~~
134+
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
156+~~~~~~~~~~~~
157+
158+.. code:: python
159+
160+ # search-url
161+ base_url = 'https://example.com/'
162+ search_string = 'search?{query}&page={page}'
163+
164+ # do search-request
165+ def request(query, params):
166+ search_path = search_string.format(
167+ query=urlencode({'q': query}),
168+ page=params['pageno'])
169+
170+ params['url'] = base_url + search_path
171+
172+ return params
173+
174+returning results
175+-----------------
176+
177+Searx has the possiblity to return results in different media-types.
178+Currently the following media-types are supported:
179+
180+- default
181+- images
182+- videos
183+- torrent
184+- map
185+
186+to set another media-type as default, you must set the parameter
187+``template`` to the required type.
188+
189+default
190+~~~~~~~
191+
192++--------------------+------------------------------------------------------------------------------------------------------------------------------------+
193+| result-parameter | information |
194++====================+====================================================================================================================================+
195+| url | string, which is representing the url of the result |
196++--------------------+------------------------------------------------------------------------------------------------------------------------------------+
197+| title | string, which is representing the title of the result |
198++--------------------+------------------------------------------------------------------------------------------------------------------------------------+
199+| content | string, which is giving a general result-text |
200++--------------------+------------------------------------------------------------------------------------------------------------------------------------+
201+| publishedDate | `datetime.datetime <https://docs.python.org/2/library/datetime.html#datetime-objects>`__, represent when the result is published |
202++--------------------+------------------------------------------------------------------------------------------------------------------------------------+
203+
204+images
205+~~~~~~
206+
207+to use this template, the parameter
208+
209++--------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
210+| result-parameter | information |
211++====================+===========================================================================================================================================================+
212+| template | is set to ``images.html`` |
213++--------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
214+| url | string, which is representing the url to the result site |
215++--------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
216+| title | string, which is representing the title of the result *(partly implemented)* |
217++--------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
218+| content | *(partly implemented)* |
219++--------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
220+| publishedDate | `datetime.datetime <https://docs.python.org/2/library/datetime.html#datetime-objects>`__, represent when the result is published *(partly implemented)* |
221++--------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
222+| img\_src | string, which is representing the url to the result image |
223++--------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
224+| thumbnail\_src | string, which is representing the url to a small-preview image |
225++--------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
226+
227+videos
228+~~~~~~
229+
230++--------------------+------------------------------------------------------------------------------------------------------------------------------------+
231+| result-parameter | information |
232++====================+====================================================================================================================================+
233+| template | is set to ``videos.html`` |
234++--------------------+------------------------------------------------------------------------------------------------------------------------------------+
235+| url | string, which is representing the url of the result |
236++--------------------+------------------------------------------------------------------------------------------------------------------------------------+
237+| title | string, which is representing the title of the result |
238++--------------------+------------------------------------------------------------------------------------------------------------------------------------+
239+| content | *(not implemented yet)* |
240++--------------------+------------------------------------------------------------------------------------------------------------------------------------+
241+| publishedDate | `datetime.datetime <https://docs.python.org/2/library/datetime.html#datetime-objects>`__, represent when the result is published |
242++--------------------+------------------------------------------------------------------------------------------------------------------------------------+
243+| thumbnail | string, which is representing the url to a small-preview image |
244++--------------------+------------------------------------------------------------------------------------------------------------------------------------+
245+
246+torrent
247+~~~~~~~
248+
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++------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------+
274+
275+
276+map
277+~~~
278+
279++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
280+| result-parameter | information |
281++=========================+====================================================================================================================================+
282+| url | string, which is representing the url of the result |
283++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
284+| title | string, which is representing the title of the result |
285++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
286+| content | string, which is giving a general result-text |
287++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
288+| publishedDate | `datetime.datetime <https://docs.python.org/2/library/datetime.html#datetime-objects>`__, represent when the result is published |
289++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
290+| latitude | latitude of result (in decimal format) |
291++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
292+| longitude | longitude of result (in decimal format) |
293++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
294+| boundingbox | boundingbox of result (array of 4. values ``[lat-min, lat-max, lon-min, lon-max]``) |
295++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
296+| geojson | geojson of result (http://geojson.org) |
297++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
298+| osm.type | type of osm-object (if OSM-Result) |
299++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
300+| osm.id | id of osm-object (if OSM-Result) |
301++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
302+| address.name | name of object |
303++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
304+| address.road | street adress of object |
305++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
306+| address.house\_number | house number of object |
307++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
308+| address.locality | city, place of object |
309++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
310+| address.postcode | postcode of object |
311++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
312+| address.country | country of object |
313++-------------------------+------------------------------------------------------------------------------------------------------------------------------------+
314+
docs/index.rst+1
@@ -34,6 +34,7 @@ Developer documentation
3434
3535 dev/contribution_guide
3636 dev/install/installation
37+ dev/engine_overview
3738 dev/search_api
3839 dev/plugins
3940 dev/translation
index.html+1
@@ -70,6 +70,7 @@
7070<ul>
7171<li class="toctree-l1"><a class="reference internal" href="dev/contribution_guide.html">How to contribute</a></li>
7272<li class="toctree-l1"><a class="reference internal" href="dev/install/installation.html">Installation</a></li>
73+<li class="toctree-l1"><a class="reference internal" href="dev/engine_overview.html">Engine overview</a></li>
7374<li class="toctree-l1"><a class="reference internal" href="dev/search_api.html">Search API</a></li>
7475<li class="toctree-l1"><a class="reference internal" href="dev/plugins.html">Plugins</a></li>
7576<li class="toctree-l1"><a class="reference internal" href="dev/translation.html">Translation</a></li>
searchindex.js+1−1
@@ -1 +1 @@
1−Search.setIndex({envversion:46,filenames:["dev/contribution_guide","dev/install/installation","dev/plugins","dev/search_api","dev/translation","index","user/search_syntax"],objects:{},objnames:{},objtypes:{},terms:{"break":0,"case":4,"char":0,"default":[0,1,2,3,5,6],"function":[0,2,3],"import":1,"new":[],"null":1,"return":2,"static":2,"switch":0,"true":[1,2],"while":[2,5],a2enmod:1,abbrev:6,about:[0,1,5],abov:[0,1],accept:[0,6],access_log:1,activ:[1,3],add:[],addit:1,addition:5,adopt:0,after:4,aggreg:5,all:[],allow:[1,6],alreadi:0,also:[0,6],alter:0,among:0,anonym:5,apache2:1,app:1,appli:1,applic:1,appreci:0,apt:1,asciimoo:1,aspect:0,attach:2,author:0,auto:4,avail:1,back:1,base_url:1,bash:1,becaus:0,behaviour:0,below:1,better:[1,2],between:4,bin:1,born:0,both:[0,3],browser:0,bugreport:0,build:1,call:2,callback:2,can:[0,1,2,4,5],capabl:0,care:0,categori:[3,6],certif:1,chainabl:6,chang:[1,4],chapter:0,chdir:1,chmod:1,choos:0,chown:1,client:4,clone:1,collect:5,com:[1,4],combin:1,come:0,comma:3,command:[1,4],compon:2,concern:0,conf:1,config:1,connect:5,consequ:0,content:1,context:2,convent:0,cooki:5,corner:0,count:1,coupl:1,cpu:1,creat:1,css:2,css_depend:2,cthulhu:6,ctx:2,current:[],custom:[0,6],customlog:1,data:5,ddg:6,debian:1,debug:1,def:2,default_on:2,demon:1,depend:1,descript:[2,3],deserv:0,dev:1,develop:[],deviat:0,differ:[0,2],digit:5,directori:4,disrespect:0,doc:4,doe:[0,5],doesn:0,domain:1,domin:0,don:0,duckduckgo:6,easili:0,edit:[1,4],educ:0,empti:4,enabl:[0,1],encrypt:5,engin:[],enough:0,enter:1,equival:3,error:4,error_log:1,essenti:1,etc:[0,1],everyth:1,exampl:[],except:0,execut:4,exist:0,exit:1,expand:0,expect:0,explain:0,extend:2,facil:0,fals:[1,2],fanci:0,featur:[],feedback:0,feel:2,file:[],fine:1,flask:2,follow:0,followsymlink:1,forget:0,fork:0,free:[],from:[],further:[],get:[],gid:1,git:1,github:1,goal:0,goe:0,good:0,grant:1,hack:0,hackerspac:6,handler:1,happen:0,happi:0,have:[1,3,4],here:[0,4],hex:1,highli:0,hour:1,http:[1,4,5],https_rewrit:2,imag:6,implement:[],includ:1,inclus:6,index:1,inform:5,ini:1,init:[],insid:2,instanc:1,intent:0,interfer:0,internet:5,interpret:1,interpretor:1,itself:0,js_depend:2,known:0,lack:0,lang:4,lc_messag:4,least:0,level:0,libapache2:1,libffi:1,libssl:1,libxslt:1,light:1,like:[1,2],line:0,list:[2,3,6],listen:1,local:[1,2,4],localhost:1,locat:1,mai:4,main:0,manner:0,map:4,mass:0,master:1,math:2,maximis:0,maximum:0,mayb:0,messag:4,messagespo:4,meta:0,method:3,might:0,misbehav:0,mod:1,modif:0,modifi:[4,6],modul:1,more:2,name:[2,3],necessari:1,need:0,net:5,nor:5,note:1,number:[1,3],object:2,observ:0,offer:5,okhin:1,on_result:2,onli:[],onlin:5,openssl:1,option:[1,2,3],organis:5,origin:1,other:[0,5],out:0,over:5,packag:1,page:[3,6],pageno:3,parallel:2,parti:5,path:1,pep8:0,perserv:0,pip:1,place:0,pleas:0,plugin:[],point:[],post:[0,1,2,3],post_search:2,pot:4,pre:2,pre_search:2,prefer:6,prefix:6,preserv:0,proce:1,profil:5,promot:5,protect:0,provid:0,pull:[0,1,4],push:4,pybabel:[1,4],python2:4,python:[0,1],pythonpath:1,quadratur:5,queri:[3,6],quit:0,qwer:6,rand:1,reconsid:0,reduc:0,rememb:0,replac:2,repo:0,repositori:1,request:[0,2],requir:[1,2,3],respec:0,respect:[],restart:1,result:[2,5],rewrit:1,right:[1,5],root:[1,4],round:0,run:[1,2,4],script:4,script_nam:1,search:[],searx:[],secur:5,sed:1,see:[2,3,6],select:6,self:5,separ:3,seper:0,server_nam:1,servic:1,set:[1,4],sethandl:1,setup:1,share:5,should:[0,1],simpli:0,sinc:0,singl:1,site:1,socket:1,softwar:5,solver:2,some:[0,1],someth:0,sourc:[],specif:1,specifi:3,ssl:[1,5],standard:0,start:1,stash:1,step:[1,4],store:5,submit:0,sudo:1,suggest:2,support:[0,3],sure:[0,1],syntax:[],taken:0,test:[0,1],thi:[0,1,2,4],thing:2,think:0,third:5,thu:0,tld:1,tool:0,tor:5,toward:0,track:5,transifex:[],try_fil:1,tupl:2,twice:1,txt:1,type:4,ubuntu:1,uid:1,ultrasecretkei:1,uncommon:0,unfortun:0,univers:1,unix:1,updat:[],upgrad:1,uri:1,user:[0,1,5],useradd:1,usr:1,usual:1,util:4,uwsgi_modifier1:1,uwsgi_param:1,uwsgi_pass:1,uwsgisocket:1,variou:[0,2],vendor:0,via:6,virtual:1,virtualenv:1,wai:0,warn:1,webapp:1,weird:0,welcom:0,which:[0,5],who:1,whole:[1,2],wide:0,width:0,wiki:0,wikipedia:6,word:2,work:[0,1],worker:1,world:0,wsgi:1,yml:1,you:[0,1,4,6],your:1,yourself:0,zlib1g:1},titles:["How to contribute","Installation","Plugins","Search API","Translation","Privacy-respecting free metasearch engine","Search syntax"],titleterms:{"new":4,add:4,admin:4,all:4,apach:1,api:3,basic:1,check:1,code:0,compil:4,configur:1,contribut:0,current:2,design:0,develop:5,direct:0,disabl:1,document:[0,5],endpoint:3,engin:5,entri:2,exampl:6,example_plugin:2,featur:5,file:4,free:5,from:1,further:5,get:4,hackabl:0,hook:2,host:1,how:[0,1],implement:2,init:4,instal:1,languag:4,log:1,metasearch:5,nginx:1,onli:4,paramet:3,plugin:2,point:2,prime:0,privaci:[0,5],project:4,read:5,respect:5,search:[3,6],searx:1,server:1,sourc:4,specifc:4,stuff:4,subdirectori:1,syntax:6,todo:2,transifex:4,translat:[0,4],updat:[1,4],upload:4,url:1,uwsgi:1,web:1}})
1+Search.setIndex({envversion:46,filenames:["dev/contribution_guide","dev/engine_overview","dev/install/installation","dev/plugins","dev/search_api","dev/translation","index","user/search_syntax"],objects:{},objnames:{},objtypes:{},terms:{"boolean":1,"break":0,"byte":1,"case":5,"char":0,"default":0,"function":[0,1,3,4],"import":2,"int":1,"new":[],"null":2,"return":[],"static":3,"switch":0,"true":[1,2,3],"while":[3,6],a2enmod:2,abbrev:7,about:[0,1,2,6],abov:[0,2],accept:[0,7],access_log:2,activ:[2,4],adapt:1,add:[],addit:2,addition:6,address:1,adopt:0,adress:1,after:5,agent:1,aggreg:6,all:[],allow:[2,7],alreadi:[0,1],also:[0,7],alter:0,alwai:1,among:0,anonym:6,anoth:1,apache2:2,api_kei:1,app:2,appli:2,applic:2,appreci:0,apt:2,arrai:1,asciimoo:2,aspect:0,assign:1,attach:3,author:0,auto:5,avail:2,back:[1,2],base:1,base_url:[1,2],bash:2,becaus:[0,1],behaviour:0,below:2,better:[1,2,3],between:[1,5],bin:2,born:0,both:[0,4],boundingbox:1,browser:0,bugreport:0,build:[1,2],calcul:1,call:3,callback:3,can:[0,1,2,3,5,6],capabl:0,care:0,categori:[1,4,7],certif:2,chainabl:7,chang:[1,2,5],chapter:0,chdir:2,chmod:2,choos:[0,1],chown:2,citi:1,client:5,clone:2,collect:6,com:[1,2,5],combin:2,come:0,comma:4,command:[2,5],compon:3,concern:0,conf:2,config:[1,2],connect:6,consequ:0,contain:1,content:2,context:3,convent:0,cooki:[1,6],corner:0,count:2,countri:1,coupl:2,cpu:2,creat:2,css:3,css_depend:3,cthulhu:7,ctx:3,current:[],custom:[0,7],customlog:2,data:[1,6],date:1,datetim:1,ddg:7,debian:2,debug:2,decim:1,def:[1,3],default_on:3,demon:2,depend:[1,2],descript:[3,4],deserv:0,dev:2,develop:[],deviat:0,differ:[0,1,3],digit:6,directori:5,disrespect:0,doc:[1,5],doe:[0,6],doesn:0,domain:2,domin:0,don:0,duckduckgo:7,easili:0,edit:[2,5],educ:0,empti:5,en_u:1,enabl:[0,2],encrypt:6,engin:[],enough:0,enter:2,equival:4,error:5,error_log:2,essenti:2,etc:[0,2],everi:1,everyth:2,exampl:[],except:0,execut:5,exist:0,exit:2,expand:0,expect:0,explain:0,extend:3,extern:1,facil:0,fals:[2,3],fanci:0,featur:[],feedback:0,feel:3,file:[],filenam:1,files:1,fill:1,fine:2,flask:3,folder:1,follow:[0,1],followsymlink:2,forget:0,fork:0,format:1,free:[],from:[],further:[],furthermor:1,geojson:1,get:[],gid:2,git:2,github:2,give:1,goal:0,goe:0,good:0,grant:2,hack:0,hackerspac:7,handler:2,happen:0,happi:0,have:[1,2,4,5],header:1,here:[0,5],hex:2,highli:0,hour:2,hous:1,house_numb:1,html:1,http:[1,2,5,6],https_rewrit:3,imag:[],img_src:1,implement:[],includ:2,inclus:7,index:2,inform:[1,6],ini:2,init:[],insert:1,insid:[1,3],instanc:2,intent:0,interfer:0,internet:6,interpret:2,interpretor:2,iso:1,itself:0,js_depend:3,kei:1,known:0,lack:0,lang:5,language_support:1,lat:1,latitud:1,lc_messag:5,least:[0,1],leech:1,leecher:1,level:0,libapache2:2,libffi:2,librari:1,libssl:2,libxslt:2,light:2,like:[1,2,3],line:0,list:[1,3,4,7],listen:2,local:[1,2,3,5],localhost:2,locat:2,lon:1,longitud:1,magnet_uri_schem:1,magnetlink:1,mai:5,main:0,make:1,manner:0,map:5,mass:0,master:2,math:3,max:1,maximis:0,maximum:[0,1],mayb:0,media:1,messag:5,messagespo:5,meta:0,method:[1,4],might:0,min:1,misbehav:0,mod:2,modif:0,modifi:[5,7],modul:2,more:3,most:1,multibl:1,must:1,name:[1,3,4],necessari:2,need:0,net:6,none:1,nor:6,normal:1,note:2,number:[1,2,4],number_of_result:1,object:[1,3],observ:0,offer:6,often:1,okhin:2,on_result:3,onli:[],onlin:6,openssl:2,option:[1,2,3,4],org:1,organis:6,origin:2,osm:1,other:[0,1,6],otherwis:1,out:0,over:6,overwrit:1,overwritten:1,packag:2,page:[1,4,7],pageno:[1,4],pagenumb:1,parallel:3,param:1,paramt:1,parti:6,partli:1,path:2,pep8:0,per:1,perform:1,perserv:0,pip:2,place:[0,1],pleas:0,plugin:[],point:[],possibl:1,post:[0,2,3,4],post_search:3,postcod:1,pot:5,pre:3,pre_search:3,prefer:7,prefix:7,preserv:0,preview:1,proce:2,profil:6,promot:6,protect:0,provid:[0,1],publish:1,publishedd:1,pull:[0,2,5],purpos:1,push:5,pybabel:[2,5],python2:5,python:[0,1,2],pythonpath:2,quadratur:6,queri:[1,4,7],quit:0,qwer:7,rand:2,random:1,realli:1,recommend:1,reconsid:0,redefin:1,reduc:0,rememb:0,replac:3,repo:0,repositori:2,repres:1,request:0,requir:[1,2,3,4],respec:0,respect:[],restart:2,result:[],rewrit:2,right:[2,6],road:1,root:[2,5],round:0,run:[2,3,5],same:1,script:5,script_nam:2,search:[],search_path:1,search_str:1,searx:[],secur:6,sed:2,see:[3,4,7],seed:1,seeder:1,select:7,self:6,separ:4,seper:0,server_nam:2,servic:2,set:[],sethandl:2,setup:2,share:6,shortcut:1,should:[0,2],simpli:0,sinc:0,singl:2,site:[1,2],size:1,small:1,socket:2,softwar:6,solver:3,some:[0,1,2],someth:0,sourc:[],special:1,specif:[1,2],specifi:4,ssl:[1,2,6],standard:[0,1],start:[1,2],stash:2,step:[2,5],store:[1,6],street:1,string:1,submit:0,sudo:2,suggest:3,support:[0,1,4],sure:[0,2],syntax:[],taken:0,tell:1,templat:1,test:[0,2],text:1,thi:[0,1,2,3,5],thing:3,think:0,third:6,thu:0,thumbnail:1,thumbnail_src:1,time:1,timeout:1,titl:1,tld:2,tool:0,tor:6,torrentfil:1,toward:0,track:6,transifex:[],try_fil:2,tupl:3,twice:2,txt:2,type:[1,5],ubuntu:2,uid:2,ultrasecretkei:2,uncommon:0,unfortun:0,univers:2,unix:2,unspecifi:1,updat:[],upgrad:2,uri:2,urlencod:1,user:[0,1,2,6],useradd:2,usr:2,usual:2,util:5,uwsgi_modifier1:2,uwsgi_param:2,uwsgi_pass:2,uwsgisocket:2,valid:1,valu:1,variabl:1,variou:[0,3],vendor:0,verifi:1,via:7,virtual:2,virtualenv:2,wai:0,want:1,warn:2,wathev:1,webapp:2,weird:0,welcom:0,what:1,when:1,where:1,which:[0,1,6],who:2,whole:[2,3],wide:0,width:0,wiki:[0,1],wikipedia:[1,7],without:1,word:3,work:[0,1,2],worker:2,world:0,wsgi:2,yet:1,yml:[],you:[0,1,2,5,7],your:2,yourself:0,zlib1g:2},titles:["How to contribute","Engine overview","Installation","Plugins","Search API","Translation","Privacy-respecting free metasearch engine","Search syntax"],titleterms:{"default":1,"new":5,"return":1,add:5,admin:5,all:5,apach:2,api:4,argument:1,basic:2,check:2,code:[0,1],compil:5,configur:[1,2],content:1,contribut:0,current:3,design:0,develop:6,direct:0,disabl:2,document:[0,6],endpoint:4,engin:[1,6],entri:3,exampl:[1,7],example_plugin:3,featur:6,file:[1,5],free:6,from:2,further:6,gener:1,get:5,hackabl:0,hook:3,host:2,how:[0,2],imag:1,implement:3,init:5,instal:2,languag:5,log:2,map:1,metasearch:6,nginx:2,onli:5,overrid:1,overview:1,paramet:4,pars:1,pass:1,plugin:3,point:3,prime:0,privaci:[0,6],project:5,read:6,request:1,respect:6,result:1,search:[4,7],searx:2,server:2,set:1,sourc:5,specifc:5,stuff:5,subdirectori:2,syntax:7,todo:3,torrent:1,transifex:5,translat:[0,5],updat:[2,5],upload:5,url:2,uwsgi:2,video:1,web:2,yml:1}})