5Now you can query SQL servers using searx. The following ones are supported:
11All of the engines above are added to ``settings.yml`` just commented out, as you have to
12set the required attributes for the engines, e.g. ``database``. By default, the engines use
13``key-value`` template for displaying results. If you are not satisfied with the original result layout,
14you can use your owm template by placing the template under
15``searx/templates/{theme_name}/result_templates/{template_name}`` and setting
16``result_template`` attribute to ``{template_name}``.
18As mentioned in previous blog posts, if you do not wish to expose these engines on a
19public instance, you can still add them and limit the access by setting ``tokens``
20as described in the `blog post about private engines`_.
25The configuration of the new database engines are similar. You must put a valid
26SELECT SQL query in ``query_str``. At the moment you can only bind at most
27one parameter in your query. By setting the attribute ``limit`` you can
28define how many results you want from the SQL server. Basically, it
29is the same as the LIMIT keyword in SQL.
31Please, do not include LIMIT or OFFSET in your SQL query as the engines
32rely on these keywords during paging. If you want to configure the number of returned results
33use the option ``limit``.
38PostgreSQL is a powerful and robust open source database.
40Before configuring the PostgreSQL engine, you must install the dependency ``psychopg2``.
42You can find an example configuration below:
48 database : my_database
51 query_str : 'SELECT * from my_table WHERE my_column = %(query)s'
58MySQL is said to be the most popular open source database.
60Before enabling MySQL engine, you must install the package ``mysql-connector-python``.
62The authentication plugin is configurable by setting ``auth_plugin`` in the attributes.
63By default it is set to ``caching_sha2_password``.
65This is an example configuration for quering a MySQL server:
71 database : my_database
75 query_str : 'SELECT * from my_table WHERE my_column=%(query)s'
82SQLite is a small, fast and reliable SQL database engine. It does not require
85You can read from your database ``my_database`` using this example configuration:
92 database : my_database
93 query_str : 'SELECT * FROM my_table WHERE my_column=:query'
99The next step is to add support for more data stores, e.g. Redis and MongoDB.
104This development was sponsored by `Search and Discovery Fund`_ of `NLnet Foundation`_ .
106.. _PostgreSQL: https://www.postgresql.org/
107.. _MySQL: https://www.mysql.com/
108.. _SQLite: https://www.sqlite.org/index.html
109.. _blog post about private engines: private-engines.html#private-engines
110.. _Search and Discovery Fund: https://nlnet.nl/discovery
111.. _NLnet Foundation: https://nlnet.nl/
115| kvch // 2021.05.23 23:16
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list